-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
63 lines (53 loc) · 1.78 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
# build / clean --------------------------------------------------------------
# Hint: use
# export CASTLE_ENGINE_TOOL_OPTIONS='--mode=debug'
# make
# to build in debug mode.
.PHONY: compile
compile:
./compile.sh
.PHONY: clean
clean:
castle-engine clean
castle-engine clean --manifest-name=CastleEngineManifest.converter.xml
# remove also macOS stuff
rm -Rf castle-model-viewer.app \
castle-model-converter.app \
macosx/castle-model-viewer.app \
macosx/castle-model-converter.app \
macosx/*.dmg
# install / uninstall --------------------------------------------------------
#
# By default castle-model-viewer is installed system-wide to /usr/local .
# You can run "make" followed by "sudo make install" to have it
# ready on a typical Unix system.
# 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)
.PHONY: install
install:
install -d $(BINDIR)
install castle-model-viewer $(BINDIR)
install castle-model-converter $(BINDIR)
install -d $(DATADIR)
cd freedesktop/ && ./install.sh "$(DATADIR)"
.PHONY: uninstall
uninstall:
rm -f $(BINDIR)/castle-model-viewer \
$(BINDIR)/castle-model-converter
cd freedesktop/ && ./uninstall.sh "$(DATADIR)"
# code generation ------------------------------------------------------------
# Run a couple of child targets to autogenerate some code
.PHONY: generate-code
generate-code:
$(MAKE) -C embedded_data/images/
$(MAKE) -C embedded_data/screen_effects/
# Clean autogenerated code
.PHONY: clean-code
clean-code:
$(MAKE) -C embedded_data/images/ clean
$(MAKE) -C embedded_data/screen_effects/ clean