X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2FMakefile;h=d09b2c5ccffa730255a6545d0f411a11adc05fc5;hp=c660a7e94e5269d40aeea9f433fc2de70ee00bca;hb=2d30ce639fd8525a6f22d383f44c4c9af89fe873;hpb=63ab06764e6e0a20481ab406863eb7bca32cb669 diff --git a/qcsrc/Makefile b/qcsrc/Makefile index c660a7e94..d09b2c5cc 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -8,24 +8,31 @@ QCCFLAGS_WATERMARK ?= $(shell git describe --tags --dirty='~') VER = $(subst *,\*,$(QCCFLAGS_WATERMARK)) NDEBUG ?= 1 XONOTIC ?= 1 +ENABLE_EFFECTINFO ?= 0 +ENABLE_DEBUGDRAW ?= 0 +ENABLE_DEBUGTRACE ?= 0 BUILD_MOD ?= ifndef ZIP - ifneq ($(shell which zip),) + ifneq ($(shell which zip 2>/dev/null),) ZIP := zip -9 endif - ifneq ($(shell which 7z),) + ifneq ($(shell which 7z 2>/dev/null),) ZIP := 7z a -tzip -mx=9 endif - ifneq ($(shell which 7za),) + ifneq ($(shell which 7za 2>/dev/null),) ZIP := 7za a -tzip -mx=9 endif ifndef ZIP - $(warning "No zip in ($(PATH))") + $(warning "No zip / 7z / 7za in ($(PATH))") ZIP := : zip_not_found endif endif +# Set to empty string to temporarily enable warnings when debugging +QCCFLAGS_WERROR ?= \ + -Werror + # We eventually need to get rid of these QCCFLAGS_WTFS ?= \ -Wno-field-redeclared @@ -34,6 +41,9 @@ QCCDEFS ?= \ -DXONOTIC=$(XONOTIC) \ -DWATERMARK="$(QCCFLAGS_WATERMARK)" \ -DNDEBUG=$(NDEBUG) \ + -DENABLE_EFFECTINFO=$(ENABLE_EFFECTINFO) \ + -DENABLE_DEBUGDRAW=$(ENABLE_DEBUGDRAW) \ + -DENABLE_DEBUGTRACE=$(ENABLE_DEBUGTRACE) \ $(if $(BUILD_MOD), -DBUILD_MOD="$(BUILD_MOD)" -I$(BUILD_MOD), ) \ $(QCCDEFS_EXTRA) @@ -42,7 +52,8 @@ QCCFLAGS ?= \ -std=gmqcc \ -Ooverlap-locals \ -O3 \ - -Werror -Wall \ + $(QCCFLAGS_WERROR) \ + -Wall \ $(QCCFLAGS_WTFS) \ -flno -futf8 -fno-bail-on-werror \ -frelaxed-switch -freturn-assignments \