Start to generate version.h

This commit is contained in:
Ian Gulliver
2016-03-07 17:18:23 -08:00
parent 3ef52b16b5
commit b7de1adca2
2 changed files with 7 additions and 0 deletions

3
adsbus/.gitignore vendored
View File

@@ -33,3 +33,6 @@
# Binaries
adsbus
# Generated
version.h

View File

@@ -24,6 +24,10 @@ clean:
%.o: %.c *.h
$(COMP) -c $(CFLAGS) $< -o $@
version.h:
echo "#define GIT_LAST_CHANGE \"$$(git log --format=%H -n 1)\"" > version.h
echo "#define GIT_LOCAL_CLEAN $$(git diff --exit-code > /dev/null && echo true || echo false)" >> version.h
adsb.pb-c.c: ../proto/adsb.proto
protoc-c --c_out=./ --proto_path=$(dir $<) $<