2 BINDIR ?= $(PREFIX)/bin
3 LIBDIR ?= $(PREFIX)/lib/xonotic
4 DOCDIR ?= $(PREFIX)/share/doc/xonotic
7 ARCH ?= $(shell if [ x"`uname -m`" = x"x86_64" ]; then echo linux64; else echo linux32; fi)
9 SUFFIX ?= $(shell if [ -d .git ]; then echo -git; else echo -zip; fi)
20 .PHONY: install-data-git
22 $(INSTALL) -d $(LIBDIR)/data
23 for p in data/*.pk3dir; do $(ZIP) -r $(LIBDIR)/data/$${p%dir} data/$$p/*; done
25 .PHONY: install-data-zip
27 $(INSTALL) -d $(LIBDIR)/data
28 for p in data/*.pk3; do $(INSTALL) data/$$p $(LIBDIR)/data/$$p; done
31 install-data: install-data-$(SUFFIX)
33 .PHONY: install-engine-git
34 install-engine-git: all
35 $(INSTALL) -d $(LIBDIR)
36 $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh
37 $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh
38 $(INSTALL) xonotic-linux-dedicated.sh $(LIBDIR)/xonotic-linux-dedicated.sh
39 $(INSTALL) darkplaces/xonotic-sdl $(LIBDIR)/xonotic-$(ARCH)-sdl
40 $(INSTALL) darkplaces/xonotic-glx $(LIBDIR)/xonotic-$(ARCH)-glx
41 $(INSTALL) darkplaces/xonotic-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated
43 .PHONY: install-engine-zip
44 install-engine-git: all
45 $(INSTALL) -d $(LIBDIR)
46 $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh
47 $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh
48 $(INSTALL) xonotic-linux-dedicated.sh $(LIBDIR)/xonotic-linux-dedicated.sh
49 $(INSTALL) xonotic-$(ARCH)-sdl $(LIBDIR)/xonotic-$(ARCH)-sdl
50 $(INSTALL) xonotic-$(ARCH)-glx $(LIBDIR)/xonotic-$(ARCH)-glx
51 $(INSTALL) xonotic-$(ARCH)-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated
53 .PHONY: install-engine
54 install-engine: install-engine-$(SUFFIX)
58 $(INSTALL) -d $(BINDIR)
59 $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-sdl $(BINDIR)/xonotic-sdl
60 $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-glx $(BINDIR)/xonotic-glx
61 $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-dedicated $(BINDIR)/xonotic-dedicated
65 $(INSTALL) -d $(DOCDIR)/server
66 $(CP) -R Docs/* $(DOCDIR)/
67 $(CP) -R server/* $(DOCDIR)/server
70 install: install-data install-engine install-links install-doc