X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=Makefile;h=23c8eafe33e16eb5ea3ee3f16c9bf0d1dd7aa10d;hp=1a2f7341865eb90a822bccce0edae32380f29789;hb=094e9170ca5f9b59443c171967cdc78f1c07044c;hpb=d1e8a437c1fab4535f82c4c214ec3330ac32e48d diff --git a/Makefile b/Makefile index 1a2f734..23c8eaf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -csrc = $(wildcard src/*.c) $(wildcard src/libc/*.c) +csrc = $(wildcard src/*.c) $(wildcard src/libc/*.c) $(wildcard src/test/*.c) ssrc = $(wildcard src/*.s) $(wildcard src/libc/*.s) $(wildcard src/boot/*.s) -obj = $(csrc:.c=.o) $(ssrc:.s=.o) +Ssrc = $(wildcard src/*.S) +obj = $(csrc:.c=.o) $(ssrc:.s=.o) $(Ssrc:.S=.o) dep = $(obj:.o=.d) elf = test bin = test.bin @@ -8,7 +9,7 @@ bin = test.bin warn = -pedantic -Wall #opt = -O2 dbg = -g -inc = -Isrc -Isrc/libc +inc = -Isrc -Isrc/libc -Isrc/test gccopt = -fno-pic -ffreestanding -nostdinc -fno-builtin CFLAGS = $(ccarch) -march=i386 $(warn) $(opt) $(dbg) $(gccopt) $(inc) $(def) @@ -40,6 +41,9 @@ $(bin): $(elf) $(elf): $(obj) $(LD) -o $@ $(obj) -Map link.map $(LDFLAGS) +%.o: %.S + $(CC) -o $@ $(CFLAGS) -c $< + -include $(dep) %.d: %.c