From: Rudolf Polzer Date: Sat, 21 Apr 2012 13:26:10 +0000 (+0200) Subject: complete the root dir Makefile X-Git-Tag: xonotic-v0.7.0~55^2~46 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3a30f6e1bb82b440eaf90fda82d2bbbb88c02716;p=xonotic%2Fxonotic.git complete the root dir Makefile --- diff --git a/Makefile b/Makefile index 8be69c8e..6f5d56d4 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,9 @@ ZIP ?= zip -9 INSTALL ?= install ARCH ?= $(shell if [ x"`uname -m`" = x"x86_64" ]; then echo linux64; else echo linux32; fi) LN ?= ln -SUFFIX ?= $(shell if [ -d .git ]; then echo git; else echo zip; fi) CP ?= cp +BINARY ?= yes +SUFFIX ?= $(shell if [ -d .git ]; then echo git; elif [ x"$(BINARY)" = x"yes" ]; then echo zip-binary; else echo zip-source; fi) .PHONY: all @@ -17,10 +18,17 @@ all: all-$(SUFFIX) all-git: ./all compile -r -.PHONY: all-zip -all-zip: - @echo Sorry, this is not implemented yet - @false +.PHONY: all-zip-binary +all-zip-binary: + @echo Nothing to do + +.PHONY: all-zip-source +all-zip-source: + $(MAKE) -C source/fteqcc + $(MAKE) -C source/qcsrc FTEQCC=$(CURDIR)/source/fteqcc/fteqcc.bin + $(MAKE) -C source/darkplaces sv-release + $(MAKE) -C source/darkplaces cl-release + $(MAKE) -C source/darkplaces sdl-release .PHONY: clean @@ -31,7 +39,11 @@ clean-git: ./all clean .PHONY: clean-zip -clean-zip: +clean-binary: + @echo Nothing to do + +.PHONY: clean-zip +clean-source: @echo Sorry, this is not implemented yet @false @@ -40,24 +52,31 @@ clean-zip: install-data: install-data-$(SUFFIX) .PHONY: install-data-git -install-data-git: +install-data-git: all-git $(RM) -rf $(LIBDIR)/data $(INSTALL) -d $(LIBDIR)/data for p in data/*.pk3; do $(INSTALL) $$p $(LIBDIR)/$$p || exit 1; done for p in data/*.pk3dir; do ( cd $$p; $(ZIP) -r $(LIBDIR)/$${p%dir} * ) || exit 1; done -.PHONY: install-data-zip -install-data-zip: +.PHONY: install-data-zip-binary +install-data-zip-binary: all-zip-binary + $(RM) -rf $(LIBDIR)/data + $(INSTALL) -d $(LIBDIR)/data + for p in data/*.pk3; do $(INSTALL) $$p $(LIBDIR)/$$p || exit 1; done + +.PHONY: install-data-zip-source +install-data-zip-source: all-zip-source $(RM) -rf $(LIBDIR)/data $(INSTALL) -d $(LIBDIR)/data for p in data/*.pk3; do $(INSTALL) $$p $(LIBDIR)/$$p || exit 1; done + for p in data/xonotic-*-data*.pk3; do cd source; $(ZIP) $(LIBDIR)/$$p progs.dat menu.dat csprogs.dat; done .PHONY: install-engine install-engine: install-engine-$(SUFFIX) .PHONY: install-engine-git -install-engine-git: +install-engine-git: all-git $(INSTALL) -d $(LIBDIR) $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh @@ -66,8 +85,8 @@ install-engine-git: $(INSTALL) darkplaces/darkplaces-glx $(LIBDIR)/xonotic-$(ARCH)-glx $(INSTALL) darkplaces/darkplaces-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated -.PHONY: install-engine-zip -install-engine-zip: +.PHONY: install-engine-zip-binary +install-engine-zip: all-zip $(INSTALL) -d $(LIBDIR) $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh @@ -76,13 +95,23 @@ install-engine-zip: $(INSTALL) xonotic-$(ARCH)-glx $(LIBDIR)/xonotic-$(ARCH)-glx $(INSTALL) xonotic-$(ARCH)-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated +.PHONY: install-engine-zip-source +install-engine-zip: all-zip + $(INSTALL) -d $(LIBDIR) + $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh + $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh + $(INSTALL) xonotic-linux-dedicated.sh $(LIBDIR)/xonotic-linux-dedicated.sh + $(INSTALL) source/darkplaces/xonotic-sdl $(LIBDIR)/xonotic-$(ARCH)-sdl + $(INSTALL) source/darkplaces/darkplaces-sdl $(LIBDIR)/xonotic-$(ARCH)-glx + $(INSTALL) source/darkplaces/darkplaces-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated + .PHONY: install-links install-links: $(INSTALL) -d $(BINDIR) - $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-sdl $(BINDIR)/xonotic-sdl - $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-glx $(BINDIR)/xonotic-glx - $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-dedicated $(BINDIR)/xonotic-dedicated + $(LN) -snf $(LIBDIR)/xonotic-linux-sdl.sh $(BINDIR)/xonotic-sdl + $(LN) -snf $(LIBDIR)/xonotic-linux-glx.sh $(BINDIR)/xonotic-glx + $(LN) -snf $(LIBDIR)/xonotic-linux-dedicated.sh $(BINDIR)/xonotic-dedicated .PHONY: install-doc diff --git a/misc/tools/all/release.subr b/misc/tools/all/release.subr index 3ef2321d..465617b4 100644 --- a/misc/tools/all/release.subr +++ b/misc/tools/all/release.subr @@ -170,7 +170,7 @@ case "$cmd" in verbose date +%Y%m%d > Xonotic/stamp.txt verbose date +%Y%m%d > Xonotic/pk3stamp.txt fi - release_git_extract_dir "." "Xonotic" Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh misc/buildfiles key_0.d0pk COPYING GPL-2 GPL-3 + release_git_extract_dir "." "Xonotic" Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh xonotic-linux-dedicated.sh misc/buildfiles key_0.d0pk COPYING GPL-2 GPL-3 ( verbose cd Xonotic verbose mkdir data fteqcc source source/darkplaces source/fteqcc source/d0_blind_id mapping