mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
lib: simplify dependency generation
We don't need to run all the dependencies first, Make can do those in parallel. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
495218104a
commit
4df1b2c834
11
lib/Makefile
11
lib/Makefile
@ -32,22 +32,15 @@ BEES_LDFLAGS = $(LDFLAGS)
|
||||
configure.h: configure.h.in
|
||||
$(TEMPLATE_COMPILER)
|
||||
|
||||
.depends:
|
||||
mkdir -p $@
|
||||
|
||||
.depends/%.dep: %.cc configure.h Makefile | .depends
|
||||
%.dep: %.cc configure.h Makefile
|
||||
$(CXX) $(BEES_CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
||||
|
||||
depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep)
|
||||
cat $^ > $@.new
|
||||
mv -f $@.new $@
|
||||
include $(CRUCIBLE_OBJS:%.o=%.dep)
|
||||
|
||||
.version.cc: configure.h Makefile ../makeflags $(CRUCIBLE_OBJS:.o=.cc) ../include/crucible/*.h
|
||||
echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > $@.new
|
||||
if ! cmp "$@.new" "$@"; then mv -fv $@.new $@; fi
|
||||
|
||||
include depends.mk
|
||||
|
||||
%.o: %.cc ../makeflags
|
||||
$(CXX) $(BEES_CXXFLAGS) -o $@ -c $<
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user