]> Dogcows Code - chaz/yoink/blob - build/arch/win32/rules.mk
0f5eae5e40ed961cb49f35f4dc641b7b0f5195be
[chaz/yoink] / build / arch / win32 / rules.mk
1 #
2 # Yoink
3 # Run this script to create a win32 package.
4 #
5 # You should typically only run this through the "portable" and "installer"
6 # makes targets in the package root directory. The build system will take
7 # care to pass the correct arguments.
8 #
9
10 docs = AUTHORS COPYING README TODO
11 libraries = libogg-0 libpng15 libvorbis-0 libvorbisfile-3 lua51 OpenAL32 SDL zlib1
12
13 MAN2HTML = lua doc/man2html.lua
14 UNIX2DOS = arch/win32/unix2dos.sh
15 MAKENSIS = makensis
16
17 stagedir = $(builddir)/$(tarname)
18 zipfile = $(tarname).zip
19 installer = $(TARNAME)setup-$(VERSION)$(EXEEXT)
20
21 __prepackage__: all
22 rm -rf $(stagedir) && mkdir -p $(stagedir)
23 cp -f $(builddir)/src/yoink$(EXEEXT) $(stagedir)
24 $(foreach l,$(libraries),cp -f $(bindir)/$l.dll $(stagedir);)
25 $(foreach d,$(SUBDIRS),$(foreach f,$(datadir_$(d)),\
26 mkdir -p $(dir $(f:$(d)%=$(stagedir)/data%)) && cp -f $(f) $(dir $(f:$(d)%=$(stagedir)/data%));))
27 $(MAN2HTML) -o $(stagedir)/Manual.html && $(UNIX2DOS) $(stagedir)/Manual.html
28 $(foreach f,$(docs),$(UNIX2DOS) $f $(stagedir)/$f.txt;)
29
30 package: __prepackage__
31 cd $(builddir) && zip -r $(zipfile) $(tarname)
32 rm -rf $(stagedir)
33 mv -f $(builddir)/$(zipfile) $(zipfile)
34
35 installer: __prepackage__
36 cp -f arch/win32/yoink.nsi $(builddir)/yoink.nsi
37 cd $(builddir) && $(MAKENSIS) -DROOTPATH=$(PWD) -DINSTALLFILES=$(PWD)/$(stagedir) \
38 -DVERSION=$(VERSION) -DOUTFILE=$(installer) yoink.nsi
39 rm -rf $(builddir)/yoink.nsi $(stagedir)
40 mv -f $(builddir)/$(installer) $(installer) && chmod +x $(installer)
41
42 .PHONY: __prepackage__ package installer
43
This page took 0.032679 seconds and 3 git commands to generate.