stdio: puts() and vprintf()
[neatlibc.git] / Makefile
blob58c02343aaaf69a873742b528f2eb73f11967519
1 # output architecture: x64, x86, arm
2 OUT = x64
4 # default assemblers
5 ASx64 = fasm
6 ASx86 = fasm
7 ASarm = neatas
9 CC = ncc
10 AS = $(AS$(OUT))
11 CFLAGS = -O2 -I.
13 all: start.o libc.a
15 %.o: %.s
16 $(AS) $^ >/dev/null
17 %.o: %.c
18 $(CC) -c $(CFLAGS) $^
20 OBJS1 = $(patsubst %.c,%.o,$(wildcard *.c))
21 OBJS2 = $(patsubst %.s,%.o,$(wildcard $(OUT)/*.s))
23 start.o: $(OUT)/start.o
24 cp $(OUT)/start.o .
25 libc.a: $(OBJS1) $(OBJS2)
26 $(AR) rcs $@ $(OBJS1) $(OBJS2)
28 clean:
29 rm -f *.o *.a x86/*.o arm/*.o x64/*.o