diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-03-14 19:56:18 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-04-10 10:12:43 -0400 |
commit | 30cd5880addf928908817f5e433ea993c83db912 (patch) | |
tree | 5587789d55132e41ee71f841b7cc8df824e41ad2 /Makefile | |
parent | 230a127bc8fdf638a0ecccecf43cfed425f30468 (diff) | |
download | mirror-ponymix-30cd5880addf928908817f5e433ea993c83db912.tar.gz mirror-ponymix-30cd5880addf928908817f5e433ea993c83db912.tar.bz2 mirror-ponymix-30cd5880addf928908817f5e433ea993c83db912.zip |
add version function, wire it up from the makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,6 +1,13 @@ +V=1 +VDEVEL=$(shell test -d .git && git describe 2>/dev/null) + +ifneq "$(VDEVEL)" "" +V=$(VDEVEL) +endif + CXX := $(CXX) -std=c++11 -base_CXXFLAGS = -Wall -Wextra -pedantic -O2 -g +base_CXXFLAGS = -Wall -Wextra -pedantic -O2 -g -DPONYMIX_VERSION=\"$(V)\" base_LIBS = -lm libpulse_CXXFLAGS = $(shell pkg-config --cflags libpulse) @@ -35,6 +42,5 @@ install: ponymix clean: $(RM) ponymix pulse.o -V=$(shell if test -d .git; then git describe; fi) dist: git archive --format=tar --prefix=ponymix-$(V)/ HEAD | gzip -9 > ponymix-$(V).tar.gz |