mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 17:46:16 +02:00
Makefile: fix dependency generation
Let's generalize the depends.mk target so we can easily move files around later. While doing it, let's also fix the "gcc -M" call to use explicit target names and not clobber it with preprocessor output. Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
@ -25,8 +25,8 @@ libcrucible.so: $(CRUCIBLE_OBJS)
|
||||
include ../makeflags
|
||||
|
||||
depends.mk: *.cc
|
||||
for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done > depends.mk.new
|
||||
mv -fv depends.mk.new depends.mk
|
||||
for x in $^; do $(CXX) $(CXXFLAGS) -M -MG -MT "$${x/%.cc/.o}" "$$x"; done > $@.new
|
||||
mv -fv $@.new $@
|
||||
|
||||
.version.cc: Makefile ../makeflags *.cc ../include/crucible/*.h
|
||||
echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > .version.new.cc
|
||||
|
Reference in New Issue
Block a user