diff --git a/.gitignore b/.gitignore index 72e65cb..90b2be0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,6 @@ latex/ make.log make.log.new localconf +lib/configure.h scripts/beesd scripts/beesd@.service diff --git a/lib/Makefile b/lib/Makefile index 21460f7..3217578 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -23,8 +23,12 @@ CRUCIBLE_OBJS = \ libcrucible.so: $(CRUCIBLE_OBJS) -luuid include ../makeflags +include ../Defines.mk -.depends/%.dep: %.cc Makefile +configure.h: configure.h.in + $(TEMPLATE_COMPILER) + +.depends/%.dep: %.cc configure.h Makefile @mkdir -p .depends $(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $< @@ -32,7 +36,7 @@ depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep) cat $^ > $@.new mv -f $@.new $@ -.version.cc: Makefile ../makeflags *.cc ../include/crucible/*.h +.version.cc: configure.h Makefile ../makeflags *.cc ../include/crucible/*.h echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > $@.new mv -f $@.new $@ diff --git a/lib/configure.h.in b/lib/configure.h.in new file mode 100644 index 0000000..8038b1b --- /dev/null +++ b/lib/configure.h.in @@ -0,0 +1,6 @@ +#ifndef _CONFIGURE_H + +#define ETC_PREFIX "@ETC_PREFIX@" + +#define _CONFIGURE_H +#endif