Commit 3e3f4a1c authored by Mathieu Maret's avatar Mathieu Maret

Header deps compilation

parent 671e1951
# Used to generated .d file that deal with header dependencies
CPPFLAGS = -MMD
AS=nasm
ASFLAGS += -f elf32
LDFLAGS += -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-exceptions -fno-non-call-exceptions -fno-weak -fno-rtti -fno-stack-protector
......@@ -9,6 +11,7 @@ asmsrc=$(wildcard *.asm)
asmobj=$(asmsrc:%.asm=%.o)
csrc=$(wildcard *.c)
cobj=$(csrc:%.c=%.o)
deps = $(csrc:%.c=%.d)
kernel:$(asmobj) $(cobj) linker.ld
$(CXX) $(LDFLAGS) $(cobj) $(asmobj) -o $@ -T linker.ld
......@@ -30,4 +33,8 @@ test:kernel
qemu-system-x86_64 -fda $<
clean:
$(RM) kernel $(asmobj) $(cobj)
$(RM) kernel $(asmobj) $(cobj) $(deps)
ifneq ($(MAKECMDGOALS),clean)
-include $(deps)
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment