+.PHONY: pk3
+pk3: csprogs-$(VER).pk3
+
+
+
+
+
+%-$(VER).pk3: $(PROGS_OUT)/%.dat
+ $(eval PROG=$*)
+ $(eval PK3=$(PROG)-$(VER).pk3)
+ $(eval TXT=$(PROG)-$(VER).txt)
+ $(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
+ $(ZIP) $(PK3) $(TXT) $(DAT) $(LNO)
+ @ $(RM) $(TXT) $(DAT) $(LNO)
+
+QCCVERSION := $(shell cd lib && $(QCC) --version)
+QCCVERSIONFILE := $(WORKDIR)/qccversion.$(shell echo ${QCCVERSION} | git hash-object --stdin)
+$(QCCVERSIONFILE): | $(WORKDIR)
+ @ $(RM) $(WORKDIR)/qccversion.*
+ @ echo $(QCCVERSION) > $@
+
+export WORKDIR