]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Some testing for valgrind in the makefile
authorDale Weiler <killfieldengine@gmail.com>
Fri, 16 Aug 2013 07:33:57 +0000 (07:33 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 16 Aug 2013 07:33:57 +0000 (07:33 +0000)
BSDmakefile
Makefile

index b537444355078447c89bc397c8a73a12ea69caf4..5e2dc21ee68729f8a4dc815dfc7253ec8138fd4c 100644 (file)
@@ -4,6 +4,7 @@
 .include "include.mk"
 
 GITTEST  != git describe --always 2>/dev/null
+VALTEST  != valgrind --version 2>/dev/null
 GITINFO  :=
 
 .if $(GITTEST)
@@ -34,6 +35,11 @@ CFLAGS   +=  -Wall -Wextra -Werror -Wstrict-aliasing
 .    endif
 .endif
 
+.if !$(VALTEST)
+    CFLAGS += -DNVALGRIND
+.endif
+
+
 CFLAGS += -DGMQCC_GITINFO=\"$(GITINFO)\" $(OPTIONAL)
 DEPS != for i in $(OBJ_C) $(OBJ_P) $(OBJ_T) $(OBJ_X); do echo $$i; done | sort | uniq
 
index c174b9185758665f5623cde60cd9c5d6a061bcb0..7f9a3b1a2db66a4b8a4b2559b46c4bc175b038b2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,11 @@ else
 endif
 
 ifneq ($(shell git describe --always 2>/dev/null),)
-    CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
+       CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
+endif
+
+ifeq ($(shell valgrind --version 2>/dev/null),)
+       CFLAGS += -DNVALGRIND
 endif
 
 # do this last otherwise there is whitespace in the command output and