mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Compilation: Let the code know about package config
This commit adds support for putting package configuration options into header files. This is needed to prepare reading config files from /etc. Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
parent
17e1171464
commit
8636312cab
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,5 +12,6 @@ latex/
|
|||||||
make.log
|
make.log
|
||||||
make.log.new
|
make.log.new
|
||||||
localconf
|
localconf
|
||||||
|
lib/configure.h
|
||||||
scripts/beesd
|
scripts/beesd
|
||||||
scripts/beesd@.service
|
scripts/beesd@.service
|
||||||
|
@ -23,8 +23,12 @@ CRUCIBLE_OBJS = \
|
|||||||
libcrucible.so: $(CRUCIBLE_OBJS) -luuid
|
libcrucible.so: $(CRUCIBLE_OBJS) -luuid
|
||||||
|
|
||||||
include ../makeflags
|
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
|
@mkdir -p .depends
|
||||||
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
||||||
|
|
||||||
@ -32,7 +36,7 @@ depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep)
|
|||||||
cat $^ > $@.new
|
cat $^ > $@.new
|
||||||
mv -f $@.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
|
echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > $@.new
|
||||||
mv -f $@.new $@
|
mv -f $@.new $@
|
||||||
|
|
||||||
|
6
lib/configure.h.in
Normal file
6
lib/configure.h.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef _CONFIGURE_H
|
||||||
|
|
||||||
|
#define ETC_PREFIX "@ETC_PREFIX@"
|
||||||
|
|
||||||
|
#define _CONFIGURE_H
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user