Commit 61ac1c16 by Francois Gygi

Add optional VERSION macro in qb.C and Makefile

parent 0ed5ed88
......@@ -58,6 +58,9 @@ OBJECTS=qb.o AtomSet.o Atom.o Species.o \
Function3d.o Function3dHandler.o \
$(PLTOBJECTS)
CXXFLAGS += -DTARGET='"$(TARGET)"'
# to include VERSION info in release string, use:
# env VERSION=`git describe` make
CXXFLAGS += -DVERSION='"$(VERSION)"'
$(EXEC): $(OBJECTS)
$(LD) $(DFLAGS) -o $@ $^ $(LDFLAGS)
lib: $(OBJECTS)
......
......@@ -157,7 +157,11 @@ int main(int argc, char **argv, char **envp)
cout << " I http://qboxcode.org I\n";
cout << " ============================\n\n";
cout << "\n";
cout << "<release> " << release() << " " << TARGET << " </release>" << endl;
cout << "<release> " << release() << " " << TARGET;
#ifdef VERSION
cout << " " << VERSION;
#endif
cout << " </release>" << endl;
// Identify executable name, checksum, size and link date
if ( getlogin() != 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment