-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
46 lines (35 loc) · 1.36 KB
/
Makefile
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
41
42
43
44
45
46
APPNAME=minisyn
NIMC=nim
DATE=$(shell date +%Y-%m-%d)
SOURCES=src/main.nim
minisynd: src/main.nim
nim c -d:debug --nimcache:nimcache/debug -p:../nico -o:$@ --threads:on -d:gif $<
minisyn: src/main.nim
nim c -d:release --nimcache:nimcache/release -p:../nico -o:$@ --threads:on -d:gif $<
rund: minisynd
./minisynd
run: minisyn
./minisyn
osx: src/main.nim
${NIMC} c -p:../nico -d:release -d:osx --threads:on -o:minisyn.app/Contents/MacOS/minisyn src/main.nim
cp -r assets minisyn.app/Contents/Resources/
find minisyn.app/Contents/Resources/assets/ -name '*.wav' -delete
rm minisyn-${DATE}-osx.zip || true
zip --symlinks -r ${APPNAME}-${DATE}-osx.zip minisyn.app
linux64: $(SOURCES)
${NIMC} c -p:../nico -d:release --threads:on -o:linux/${APPNAME}.x86_64 src/main.nim
linux32: $(SOURCES)
${NIMC} c -p:../nico -d:release -d:linux32 --threads:on -o:linux/${APPNAME}.x86 src/main.nim
linux: linux32 linux64
cp -r assets linux
find linux/assets/ -name '*.wav' -delete
cd linux; \
tar czf ../${APPNAME}-${DATE}-linux.tar.gz .
windows:
${NIMC} c -p:../nico -d:release -d:windows --tlsEmulation:off --threads:on -o:winversion/${APPNAME}.exe src/main.nim
cp -r assets winversion
find winversion/assets/ -name '*.wav' -delete
rm ${APPNAME}-${DATE}-win32.zip || true
cd winversion; \
zip -r ../${APPNAME}-${DATE}-win32.zip .
.PHONY: run rund windows linux linux64 linux32 osx