-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
63 lines (52 loc) · 1.73 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This Makefile uses castle-engine build tool for most operations.
# See https://castle-engine.io/build_tool .
#
# Use this Makefile only with GNU make
# (GNU make is the standard make on Linux,
# on Windows it comes with FPC or Cygwin or MinGW,
# on FreeBSD it is gmake).
default: build
MODE:=debug
# Building target.
# You may wish to call target `clean' before
# calling build. This will make sure that everything is
# compiled with appropriate options (suitable for release or debugging).
#TODO: pass this -dCASTLE_WINDOW_BEST_NOGUI
#TODO: clean-window to force rebuilding CastleWindow unit with proper backend.
build:
castle-engine compile --mode=$(MODE) $(CASTLE_ENGINE_TOOL_OPTIONS)
.PHONY: android
android:
castle-engine package --os=android --cpu=arm --mode=$(MODE) --verbose
castle-engine install --os=android --cpu=arm
castle-engine run --os=android --cpu=arm
.PHONY: release-android
release-android:
$(MAKE) android MODE=release
clean:
castle-engine clean
rm -Rf data/levels/fountain/fluidcache/
# make sure that various files are up-to-date
update:
$(MAKE) -C code/
$(MAKE) -C data/items/life_potion/
$(MAKE) -C data/items/sword/
$(MAKE) -C data/levels/
# install --------------------------------------------------------------------
# Standard installation dirs, following conventions on
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
PREFIX=$(DESTDIR)/usr/local
EXEC_PREFIX=$(PREFIX)
BINDIR=$(EXEC_PREFIX)/bin
DATAROOTDIR=$(PREFIX)/share
DATADIR=$(DATAROOTDIR)
# Simple install.
.PHONY: install
install:
install castle $(BINDIR)
cd data/ && \
find . -type f -exec install -D '{}' $(DATADIR)/castle/'{}' ';'
.PHONY: uninstall
uninstall:
rm -f $(BINDIR)/castle
rm -Rf $(DATADIR)/castle