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