]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - Makefile
Not defining GMQCC_VERSION_ in gmqcc.h but checking if they're defiend and #error...
[xonotic/gmqcc.git] / Makefile
index 482f13259bbe680707736a88b146e96553df5bdb..fdc20a739b0b15ad96b173700c0d72fc127589eb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,10 @@ BINDIR := $(PREFIX)/bin
 DATADIR := $(PREFIX)/share
 MANDIR := $(DATADIR)/man
 
+GMQCC_MAJOR=0
+GMQCC_MINOR=2
+GMQCC_PATCH=0
+
 CC     ?= clang
 CFLAGS += -Wall -Wextra -I. -pedantic-errors
 #turn on tons of warnings if clang is present
@@ -33,6 +37,9 @@ OBJ_T = test.o util.o con.o
 OBJ_C = main.o lexer.o parser.o
 OBJ_X = exec-standalone.o util.o con.o
 
+CFLAGS += -DGMQCC_VERSION_MAJOR=$(GMQCC_MAJOR)
+CFLAGS += -DGMQCC_VERSION_MINOR=$(GMQCC_MINOR)
+CFLAGS += -DGMQCC_VERSION_PATCH=$(GMQCC_PATCH)
 
 default: gmqcc
 %.o: %.c