summaryrefslogtreecommitdiff
path: root/lib/make/make.configuration
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-23 12:52:48 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-23 12:52:48 +0000
commit3b1a3bd716ea28094155432c5ed21f7b30744025 (patch)
treefe2a50d62da8a8ccfcfaaaebed6e90d25dfecd0b /lib/make/make.configuration
parent447499d1a39510f637c102552330619145ed7201 (diff)
Added some verion number stuff.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@769 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/make.configuration')
-rw-r--r--lib/make/make.configuration14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/make/make.configuration b/lib/make/make.configuration
index 77909373..f60caf21 100644
--- a/lib/make/make.configuration
+++ b/lib/make/make.configuration
@@ -55,15 +55,25 @@ ifneq ($(strip $(THORNS)),)
endif
# Build the executable
-$(EXE): $(CONFIG)/make.thornlist $(patsubst %,$(CCTK_LIBDIR)/lib%.a,$(notdir $(THORNS) $(CACTUSLIBS)))
+$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctk_version.h $(patsubst %,$(CCTK_LIBDIR)/lib%.a,$(notdir $(THORNS) $(CACTUSLIBS)))
@echo $(DIVIDER)
@echo Creating $(EXE) from $(THORNS)
- $(CC) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$(TOP)$(DIRSEP)datestamp.o $(subst /,$(DIRSEP),$(DATESTAMP))
+ $(CC) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$(TOP)$(DIRSEP)datestamp.o -I$(CONFIG) $(subst /,$(DIRSEP),$(DATESTAMP))
$(LD) $(CREATEEXE)$(OPTIONSEP)$(subst /,$(DIRSEP),$@) $(LDFLAGS) $(EXTRAFLAGS) $(subst /,$(DIRSEP), $(TOP)/datestamp.o) $(CACTUSLIBLINKLINE) $(LIBDIRS:%=-L%) $(LIBS:%=-l%)
@echo $(DIVIDER)
@echo All done !
@echo $(DIVIDER)
+# Version file
+$(CONFIG)/cctk_version.h: $(CCTK_HOME)/Makefile
+ echo "#ifndef _CCTK_VERSION_H_" > $@
+ echo "#define _CCTK_VERSION_H_" >> $@
+ echo "#define CCTK_VERSION_MAJOR $(CCTK_VERSION_MAJOR)" >> $@
+ echo "#define CCTK_VERSION_MINOR $(CCTK_VERSION_MINOR)" >> $@
+ echo "#define CCTK_VERSION_OTHER $(CCTK_VERSION_OTHER)" >> $@
+ echo "#define CCTK_VERSION $(CCTK_VERSION)" >> $@
+ echo "#endif /* _CCTK_VERSION_H_*/" >> $@
+
# Build a thorn library
# Libraries go into the appropriate library directory
# Each thorn's object files go into $(BUILD_DIR)/<thorn>