diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-02 04:41:59 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-02 04:41:59 +0100 |
commit | 5e0b7f1a565ffd90c80da3965b2f706e7d55ce42 (patch) | |
tree | fbe80f035283b2da318acaabcb1e097bee861dec | |
parent | 7e64154d3fdbdebc31addbcd11000c98acb36536 (diff) | |
download | serenity-5e0b7f1a565ffd90c80da3965b2f706e7d55ce42.zip |
Add basic automatic dependency management to Makefiles.
-rw-r--r-- | AK/.gitignore | 1 | ||||
-rw-r--r-- | Kernel/.gitignore | 1 | ||||
-rw-r--r-- | Kernel/Makefile | 6 | ||||
-rw-r--r-- | LibC/.gitignore | 1 | ||||
-rw-r--r-- | LibC/Makefile | 6 | ||||
-rw-r--r-- | LibGUI/.gitignore | 1 | ||||
-rw-r--r-- | LibGUI/Makefile | 6 | ||||
-rw-r--r-- | SharedGraphics/.gitignore | 1 | ||||
-rw-r--r-- | Terminal/.gitignore | 1 | ||||
-rw-r--r-- | Terminal/Makefile | 6 | ||||
-rw-r--r-- | Userland/.gitignore | 1 | ||||
-rw-r--r-- | Userland/Makefile | 6 | ||||
-rw-r--r-- | WindowServer/.gitignore | 1 |
13 files changed, 28 insertions, 10 deletions
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 $< +-include $(OBJS:%.o=%.d) + clean: - @echo "CLEAN"; rm -f $(KERNEL) $(OBJS) $(BOOTLOADER) $(IMAGE) + @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 $< +-include $(OBJS:%.o=%.d) + clean: - @echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) + @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 $< +-include $(OBJS:%.o=%.d) + clean: - @echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) + @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 $< +-include $(OBJS:%.o=%.d) + clean: - @echo "CLEAN"; rm -f $(APPS) $(OBJS) + @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 $< +-include $(OBJS:%.o=%.d) + clean: - @echo "CLEAN"; rm -f $(APPS) $(OBJS) + @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 |