]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/Makefile
Merge branch 'terencehill/cl_forceplayercolors_3' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / Makefile
index bfea08b5f92df070fbcc59269b5ec65ed7bb3162..1edb96fa22932b1f65328fe215b71d768223f89d 100644 (file)
@@ -1,5 +1,5 @@
 CPP := cc -xc -E
-QCC ?= gmqcc
+QCC ?= ../../../../gmqcc/gmqcc
 
 PROGS_OUT ?= ..
 WORKDIR ?= ../.tmp
@@ -29,6 +29,10 @@ ifndef ZIP
     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
@@ -48,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 \
@@ -67,9 +72,14 @@ clean: | $(WORKDIR)
        $(RM) $(PROGS_OUT)/csprogs.dat
        $(RM) $(PROGS_OUT)/menu.dat
        $(RM) $(PROGS_OUT)/progs.dat
+       $(RM) $(PROGS_OUT)/csprogs.lno
+       $(RM) $(PROGS_OUT)/menu.lno
+       $(RM) $(PROGS_OUT)/progs.lno
        $(RM) $(WORKDIR)/*.d
        $(RM) $(WORKDIR)/*.qc
        $(RM) $(WORKDIR)/*.txt
+       $(RM) $(WORKDIR)/qccversion.*
+       $(RM) csprogs-*.pk3
 
 .PHONY: qc
 qc: $(PROGS_OUT)/csprogs.dat $(PROGS_OUT)/menu.dat $(PROGS_OUT)/progs.dat
@@ -88,9 +98,9 @@ pk3: csprogs-$(VER).pk3
        $(eval DAT=$(PROG)-$(VER).dat)
        $(eval LNO=$(PROG)-$(VER).lno)
        @ echo "http://xonotic.org" > $(TXT)
-       @ ln -f $(PROGS_OUT)/$(PROG).dat $(DAT)
-       @ ln -f $(PROGS_OUT)/$(PROG).lno $(LNO)
-       @ $(RM) *.pk3
+       @ cp -f $(PROGS_OUT)/$(PROG).dat $(DAT)
+       @ cp -f $(PROGS_OUT)/$(PROG).lno $(LNO)
+       @ $(RM) csprogs-*.pk3
        $(ZIP) $(PK3) $(TXT) $(DAT) $(LNO)
        @ $(RM) $(TXT) $(DAT) $(LNO)