-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (33 loc) · 1021 Bytes
/
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
NAME = BoulderDash
VERSION = 2.0.6
default:
@echo "Available build targets:"
@echo
@echo "make graphics # Build with Graphics library (no sound, no gamepad)"
@echo "make tsdl # Build with TSDL library"
@echo "make raylib # Build with Raylib library"
@echo
@echo "make zip-{mac,win,linux} # Package up (requires building exe first)"
all: graphics tsdl raylib
graphics tsdl raylib: %:
dune build src/api-$@/[email protected]
ln -f _build/default/src/api-$@/[email protected] $(NAME).exe
mac: $(NAME).exe
mkdir -p $(NAME).app/Contents
cp -rf platform/mac/* assets $(NAME).exe $(NAME).app/Contents
dir: $(NAME).exe
mkdir $(NAME)
cp -rf $(NAME).exe assets $(NAME)
zip-mac: mac
zip -r $(NAME)-$(VERSION)-mac.zip $(NAME).app
zip-win: dir
cp `which libwinpthread-1.dll` platform/win/folder.jpg $(NAME)
zip -r $(NAME)-$(VERSION)-win.zip $(NAME)
rm -rf $(NAME)
zip-linux: dir
zip -r $(NAME)-$(VERSION)-linux.zip $(NAME)
rm -rf $(NAME)
clean:
dune clean
distclean: clean
rm -rf *.exe *.zip *.app