forked from jonof/jfbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeDistributions
40 lines (30 loc) · 1.28 KB
/
MakeDistributions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# GNU Makefile to prepare source and binary distributions.
# make -f MakeDistributions [source|binary]
SOURCEFILES=build.cfg buildlic.txt ChangeLog game.cfg LICENSE \
Makefile Makefile.deps Makefile.shared Makefile.msvc Makefile.watcom \
MakeDistributions makegnu.bat makemsc.bat makew.bat NAMES.H README
BINARYFILES=build.cfg build.exe buildlic.txt ChangeLog fmod.dll \
game.cfg game.exe LICENSE NAMES.H neatsong.ogg README
BINARYCHECKS=checkfmoddll checkneatsongogg
.PHONY: source binary $(BINARYCHECKS)
datenow=$(shell date +%Y%m%d)
sourcedir=jfbuild_src_$(datenow)
binarydir=jfbuild_$(datenow)
all: source binary
source:
mkdir $(sourcedir) $(sourcedir)/obj.gnu $(sourcedir)/obj.watcom $(sourcedir)/obj.msc
touch $(sourcedir)/obj.gnu/keep.me $(sourcedir)/obj.watcom/keep.me $(sourcedir)/obj.msc/keep.me
cp $(SOURCEFILES) $(sourcedir)
cp -R src rsrc include devcpp osx $(sourcedir)
rm -f $(sourcedir)/src/tmp/*
touch $(sourcedir)/src/tmp/keep.me
kzip -r $(sourcedir).zip $(sourcedir)
binary: $(BINARYCHECKS)
nmake /f Makefile.msvc
upx --best build.exe game.exe
mkdir $(binarydir)
cp $(BINARYFILES) $(binarydir)
kzip -r $(binarydir).zip $(binarydir)
# Binary checks
checkfmoddll: fmod.dll
checkneatsongogg: neatsong.ogg