diff --git a/AK/.gitignore b/AK/.gitignore index e9b985837a..ff8bc6b4e4 100644 --- a/AK/.gitignore +++ b/AK/.gitignore @@ -1,2 +1,3 @@ akit-test *.o +*.d diff --git a/Kernel/.gitignore b/Kernel/.gitignore index 8431799f13..69c0ff7371 100644 --- a/Kernel/.gitignore +++ b/Kernel/.gitignore @@ -1,4 +1,5 @@ *.o +*.d .floppy-image Boot/boot.bin kernel diff --git a/Kernel/Makefile b/Kernel/Makefile index 3c572674b5..5fe43e0b44 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -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 diff --git a/LibC/.gitignore b/LibC/.gitignore index 1f6ba4783d..196c9f02af 100644 --- a/LibC/.gitignore +++ b/LibC/.gitignore @@ -1,2 +1,3 @@ *.o +*.d LibC.a diff --git a/LibC/Makefile b/LibC/Makefile index 90dbd15ed5..7704012171 100644 --- a/LibC/Makefile +++ b/LibC/Makefile @@ -59,7 +59,7 @@ INCLUDE_FLAGS = -I.. -I. DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS -CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) CXX = clang LD = ld AR = ar @@ -73,6 +73,8 @@ $(LIBRARY): $(OBJS) .cpp.o: @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< -clean: - @echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) +-include $(OBJS:%.o=%.d) + +clean: + @echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) *.d diff --git a/LibGUI/.gitignore b/LibGUI/.gitignore index 0e4334e117..2786c2d53d 100644 --- a/LibGUI/.gitignore +++ b/LibGUI/.gitignore @@ -1,2 +1,3 @@ *.o +*.d LibGUI.a diff --git a/LibGUI/Makefile b/LibGUI/Makefile index f38bdc94be..22d6a0bd76 100644 --- a/LibGUI/Makefile +++ b/LibGUI/Makefile @@ -32,7 +32,7 @@ INCLUDE_FLAGS = -I../LibC -I.. -I. DEFINES = -DSERENITY -DUSERLAND -DSANITIZE_PTRS -DLIBGUI -CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(LIBC_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) CXX = clang LD = ld AR = ar @@ -46,6 +46,8 @@ $(LIBRARY): $(OBJS) .cpp.o: @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< -clean: - @echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) +-include $(OBJS:%.o=%.d) + +clean: + @echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) *.d diff --git a/SharedGraphics/.gitignore b/SharedGraphics/.gitignore index 5761abcfdf..6142305dc1 100644 --- a/SharedGraphics/.gitignore +++ b/SharedGraphics/.gitignore @@ -1 +1,2 @@ *.o +*.d diff --git a/Terminal/.gitignore b/Terminal/.gitignore index 1e2b6ab46c..1029333f8d 100644 --- a/Terminal/.gitignore +++ b/Terminal/.gitignore @@ -1,2 +1,3 @@ *.o +*.d Terminal diff --git a/Terminal/Makefile b/Terminal/Makefile index 40e66f47fe..8ccc36fc8e 100644 --- a/Terminal/Makefile +++ b/Terminal/Makefile @@ -14,7 +14,7 @@ INCLUDE_FLAGS = -I.. -I. -I../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) CXX = clang LD = ld AR = ar @@ -28,6 +28,8 @@ $(APP): $(OBJS) .cpp.o: @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< -clean: - @echo "CLEAN"; rm -f $(APPS) $(OBJS) +-include $(OBJS:%.o=%.d) + +clean: + @echo "CLEAN"; rm -f $(APPS) $(OBJS) *.d diff --git a/Userland/.gitignore b/Userland/.gitignore index 61deb7d2ef..d6ac23a048 100644 --- a/Userland/.gitignore +++ b/Userland/.gitignore @@ -1,4 +1,5 @@ *.o +*.d id sh ps diff --git a/Userland/Makefile b/Userland/Makefile index d4b28b9fec..863f658741 100644 --- a/Userland/Makefile +++ b/Userland/Makefile @@ -69,7 +69,7 @@ INCLUDE_FLAGS = -I.. -I. -I../LibC DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND -CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) +CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) CXX = clang LD = ld AR = ar @@ -167,6 +167,8 @@ chmod: chmod.o .cpp.o: @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< -clean: - @echo "CLEAN"; rm -f $(APPS) $(OBJS) +-include $(OBJS:%.o=%.d) + +clean: + @echo "CLEAN"; rm -f $(APPS) $(OBJS) *.d diff --git a/WindowServer/.gitignore b/WindowServer/.gitignore index 5761abcfdf..6142305dc1 100644 --- a/WindowServer/.gitignore +++ b/WindowServer/.gitignore @@ -1 +1,2 @@ *.o +*.d