1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:37:45 +00:00

Add basic automatic dependency management to Makefiles.

This commit is contained in:
Andreas Kling 2019-02-02 04:41:59 +01:00
parent 7e64154d3f
commit 5e0b7f1a56
13 changed files with 33 additions and 15 deletions

1
Kernel/.gitignore vendored
View file

@ -1,4 +1,5 @@
*.o
*.d
.floppy-image
Boot/boot.bin
kernel

View file

@ -86,7 +86,7 @@ INCLUDE_FLAGS = -I.. -I.
DEFINES = -DSERENITY -DKERNEL -DSANITIZE_PTRS
CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(KERNEL_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(KERNEL_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
CXX = clang
LD = ld
LDFLAGS = -T linker.ld --strip-debug -melf_i386 --gc-sections --build-id=none -z norelro -z now
@ -111,6 +111,8 @@ $(BOOTLOADER): Boot/boot.asm
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
clean:
@echo "CLEAN"; rm -f $(KERNEL) $(OBJS) $(BOOTLOADER) $(IMAGE)
-include $(OBJS:%.o=%.d)
clean:
@echo "CLEAN"; rm -f $(KERNEL) $(OBJS) $(BOOTLOADER) $(IMAGE) *.d