]> git.hungrycats.org Git - bees/commitdiff
src: simplify Makefile
authorZygo Blaxell <bees@furryterror.org>
Mon, 23 Jan 2023 02:50:07 +0000 (21:50 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sat, 28 Jan 2023 03:16:02 +0000 (22:16 -0500)
Make can build dependencies in parallel, so let Make do that.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/Makefile

index 997b8c89d12a32ecca389422f21a14166817d587..a894424aeea2955e5ddb97367f05290dbafd8f62 100644 (file)
@@ -28,17 +28,10 @@ bees-usage.c: bees-usage.txt Makefile
        (echo 'const char *BEES_USAGE = '; sed -r 's/^(.*)$$/"\1\\n"/' < bees-usage.txt; echo ';') > bees-usage.new.c
        mv -f bees-usage.new.c bees-usage.c
 
-.depends:
-       mkdir -p $@
-
-.depends/%.dep: %.cc Makefile | .depends
+%.dep: %.cc Makefile
        $(CXX) $(BEES_CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
 
-depends.mk: $(ALL_OBJS:%.o=.depends/%.dep)
-       cat $^ > $@.new
-       mv -f $@.new $@
-
-include depends.mk
+include $(ALL_OBJS:%.o=%.dep)
 
 %.o: %.c ../makeflags
        $(CC) $(BEES_CFLAGS) -o $@ -c $<