Added an asynchronous sys_null_async() call and wrappers
[akaros.git] / lib / Makefrag
1 NATIVECC := ivycc
2
3 OBJDIRS += lib
4
5 LIB_SRCFILES :=         lib/console.c \
6                         lib/libmain.c \
7                         lib/null.c \
8                         lib/exit.c \
9                         lib/panic.c \
10                         lib/printf.c \
11                         lib/printfmt.c \
12                         lib/readline.c \
13                         lib/string.c \
14                         lib/syscall.c \
15                         lib/asynccall.c
16
17
18
19
20 LIB_OBJFILES := $(patsubst lib/%.c, $(OBJDIR)/lib/%.o, $(LIB_SRCFILES))
21 LIB_OBJFILES := $(patsubst lib/%.S, $(OBJDIR)/lib/%.o, $(LIB_OBJFILES))
22
23 $(OBJDIR)/lib/%.o: lib/%.c
24         @echo + cc[USER] $<
25         @mkdir -p $(@D)
26         $(V)$(NATIVECC) -nostdinc $(USER_CFLAGS) -c -o $@ $<
27
28 $(OBJDIR)/lib/%.o: lib/%.S
29         @echo + as[USER] $<
30         @mkdir -p $(@D)
31         $(V)$(NATIVECC) -nostdinc $(USER_CFLAGS) -c -o $@ $<
32
33 $(OBJDIR)/lib/libjos.a: $(LIB_OBJFILES)
34         @echo + ar $@
35         $(V)$(AR) r $@ $(LIB_OBJFILES)