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)
22 @echo Sorry, this is not implemented yet
27 clean: clean-$(SUFFIX)
35 @echo Sorry, this is not implemented yet
40 install-data: install-data-$(SUFFIX)
42 .PHONY: install-data-git
44 $(RM) -rf $(LIBDIR)/data
45 $(INSTALL) -d $(LIBDIR)/data
46 for p in data/*.pk3; do $(INSTALL) $$p $(LIBDIR)/$$p || exit 1; done
47 for p in data/*.pk3dir; do ( cd $$p; $(ZIP) -r $(LIBDIR)/$${p%dir} * ) || exit 1; done
49 .PHONY: install-data-zip
51 $(RM) -rf $(LIBDIR)/data
52 $(INSTALL) -d $(LIBDIR)/data
53 for p in data/*.pk3; do $(INSTALL) $$p $(LIBDIR)/$$p || exit 1; done
56 .PHONY: install-engine
57 install-engine: install-engine-$(SUFFIX)
59 .PHONY: install-engine-git
61 $(INSTALL) -d $(LIBDIR)
62 $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh
63 $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh
64 $(INSTALL) xonotic-linux-dedicated.sh $(LIBDIR)/xonotic-linux-dedicated.sh
65 $(INSTALL) darkplaces/darkplaces-sdl $(LIBDIR)/xonotic-$(ARCH)-sdl
66 $(INSTALL) darkplaces/darkplaces-glx $(LIBDIR)/xonotic-$(ARCH)-glx
67 $(INSTALL) darkplaces/darkplaces-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated
69 .PHONY: install-engine-zip
71 $(INSTALL) -d $(LIBDIR)
72 $(INSTALL) xonotic-linux-glx.sh $(LIBDIR)/xonotic-linux-glx.sh
73 $(INSTALL) xonotic-linux-sdl.sh $(LIBDIR)/xonotic-linux-sdl.sh
74 $(INSTALL) xonotic-linux-dedicated.sh $(LIBDIR)/xonotic-linux-dedicated.sh
75 $(INSTALL) xonotic-$(ARCH)-sdl $(LIBDIR)/xonotic-$(ARCH)-sdl
76 $(INSTALL) xonotic-$(ARCH)-glx $(LIBDIR)/xonotic-$(ARCH)-glx
77 $(INSTALL) xonotic-$(ARCH)-dedicated $(LIBDIR)/xonotic-$(ARCH)-dedicated
82 $(INSTALL) -d $(BINDIR)
83 $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-sdl $(BINDIR)/xonotic-sdl
84 $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-glx $(BINDIR)/xonotic-glx
85 $(LN) -snf $(LIBDIR)/xonotic-$(ARCH)-dedicated $(BINDIR)/xonotic-dedicated
90 $(INSTALL) -d $(DOCDIR)/server
91 $(CP) -R Docs/* $(DOCDIR)/
92 $(CP) -R server/* $(DOCDIR)/server
96 install: install-data install-engine install-links install-doc