diff --git a/adsbus/.gitignore b/adsbus/.gitignore index 55c3eac..e4375ec 100644 --- a/adsbus/.gitignore +++ b/adsbus/.gitignore @@ -33,3 +33,6 @@ # Binaries adsbus + +# Generated +version.h diff --git a/adsbus/Makefile b/adsbus/Makefile index 61b62c4..b9953dd 100644 --- a/adsbus/Makefile +++ b/adsbus/Makefile @@ -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 $<) $<