]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Revert "Not defining GMQCC_VERSION_ in gmqcc.h but checking if they're defiend and...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 17 Dec 2012 15:45:37 +0000 (16:45 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 17 Dec 2012 15:46:03 +0000 (16:46 +0100)
This reverts commit a473979cf5a807f4cb6cc14bc9d4acc06c28c538.

-- because visual studio sucks

Makefile
gmqcc.h

index fdc20a739b0b15ad96b173700c0d72fc127589eb..482f13259bbe680707736a88b146e96553df5bdb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,6 @@ 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
@@ -37,9 +33,6 @@ 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
diff --git a/gmqcc.h b/gmqcc.h
index 86d0584a4321b027cd8136f3774d2e32e5bc4ea1..9a07d7aabe662ce90ba42c8116842a8d4116e305 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
 #      pragma warning(disable : 4700 ) /* uninitialized local variable used                       */
 #endif
 
-#if !defined(GMQCC_VERSION_MAJOR) \
- || !defined(GMQCC_VERSION_MINOR) \
- || !defined(GMQCC_VERSION_PATCH)
-#   error GMQCC_VERSION_ macros missing
-#endif
-
+#define GMQCC_VERSION_MAJOR 0
+#define GMQCC_VERSION_MINOR 2
+#define GMQCC_VERSION_PATCH 0
 #define GMQCC_VERSION_BUILD(J,N,P) (((J)<<16)|((N)<<8)|(P))
 #define GMQCC_VERSION \
     GMQCC_VERSION_BUILD(GMQCC_VERSION_MAJOR, GMQCC_VERSION_MINOR, GMQCC_VERSION_PATCH)