Mercurial > hg > forks > dxa
diff Makefile @ 5:b91c47026822
Make version information a compile-time define.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 25 Feb 2015 04:19:28 +0200 |
parents | a07eb3757bf0 |
children | cfa260872b23 |
line wrap: on
line diff
--- a/Makefile Wed Feb 25 04:15:07 2015 +0200 +++ b/Makefile Wed Feb 25 04:19:28 2015 +0200 @@ -3,12 +3,12 @@ TARGETS = dxa OBJECTS = scan.o vector.o dump.o table.o label.o main.o -VERSION = 0.1.3 +DXA_VERSION = 0.1.3++2 # choose the compiler and flags CC = gcc -CFLAGS = -g -O2 -W -Wall +CFLAGS = -g -O2 -W -Wall -DDXA_VERSION="\"$(DXA_VERSION)\"" INSTALL = install PREFIX = /usr/local @@ -32,7 +32,7 @@ rm -f $(OBJECTS) $(TARGETS) core dist: clean - cd ..;tar cvf dxa-$(VERSION).tar dxa-$(VERSION);gzip dxa-$(VERSION).tar + cd .. && tar cvf $dxa-$(DXA_VERSION).tar dxa-$(DXA_VERSION) && xz -9 dxa-$(DXA_VERSION).tar install: all @for fn in $(TARGETS); do echo " INSTALL $$fn $(PREFIX)/bin/"; $(INSTALL) -m 755 "$$fn" $(PREFIX)/bin/; done