]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - Makefile
Make variable for flexibility
[xonotic/gmqcc.git] / Makefile
index 8d5caaddb2fc5e7bb79d58f834f8a2488ed8d5d3..f35de15c608c19e6f7ecb1771f3786dfbe6226ff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 DESTDIR :=
+OPTIONAL:=
 PREFIX  := /usr/local
 BINDIR  := $(PREFIX)/bin
 DATADIR := $(PREFIX)/share
@@ -9,7 +10,7 @@ CYGWIN  = $(findstring CYGWIN,  $(UNAME))
 MINGW   = $(findstring MINGW32, $(UNAME))
 
 CC     ?= clang
-CFLAGS += -Wall -Wextra -Werror -I. -fno-strict-aliasing -fsigned-char
+CFLAGS += -Wall -Wextra -Werror -I. -fno-strict-aliasing -fsigned-char $(OPTIONAL)
 ifneq ($(shell git describe --always 2>/dev/null),)
     CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
 endif
@@ -17,16 +18,16 @@ endif
 # but also turn off the STUPID ONES
 ifeq ($(CC), clang)
        CFLAGS +=                              \
-               -Weverything                       \
-               -Wno-padded                        \
-               -Wno-format-nonliteral             \
-               -Wno-disabled-macro-expansion      \
-               -Wno-conversion                    \
-               -Wno-missing-prototypes            \
-               -Wno-float-equal                   \
-               -Wno-cast-align                    \
-               -Wno-missing-variable-declarations \
-               -Wno-unknown-warning-option
+           -Weverything                       \
+           -Wno-padded                        \
+           -Wno-format-nonliteral             \
+           -Wno-disabled-macro-expansion      \
+           -Wno-conversion                    \
+           -Wno-missing-prototypes            \
+           -Wno-float-equal                   \
+           -Wno-cast-align                    \
+           -Wno-missing-variable-declarations \
+           -Wno-unknown-warning-option
 else
        #Tiny C Compiler doesn't know what -pedantic-errors is
        # and instead of ignoring .. just errors.
@@ -38,7 +39,7 @@ else
 endif
 
 ifeq ($(track), no)
-    CFLAGS += -DNOTRACK
+       CFLAGS += -DNOTRACK
 endif
 
 OBJ_D = util.o code.o ast.o ir.o conout.o ftepp.o opts.o fs.o utf8.o correct.o