diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,6 +1,6 @@ # Makefile for mdns-repeater -HGVERSION=$(shell hg id -i) +HGVERSION=$(shell hg parents --template "{latesttag}.{latesttagdistance}") CFLAGS=-Wall @@ -17,9 +17,17 @@ CFLAGS+= -DHGVERSION="\"${HGVERSION}\"" all: mdns-repeater +mdns-repeater.o: _hgversion + mdns-repeater: mdns-repeater.o +# version checking rules +.PHONY: dummy +_hgversion: dummy + @echo $(HGVERSION) | cmp -s $@ - || echo $(HGVERSION) > $@ + clean: -$(RM) *.o + -$(RM) _hgversion -$(RM) mdns-repeater |