-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.mk
119 lines (100 loc) · 3.17 KB
/
module.mk
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# TODO - it would be nice if LPATH could be set by the Makefile that
# includes us, since that has to know our path anyway.
LPATH := .
LSRC := $(wildcard $(srcdir)/$(LPATH)/*.cpp)
LGUIPRODUCTS := pentagram
#LCONPRODUCTS := llc
pentagram_OBJ = \
$(KERNEL) \
$(USECODE) \
$(FILESYS) \
$(GAMES) \
$(GAMES2) \
$(GRAPHICS) \
$(SCALERS) \
$(FONTS) \
$(MISC) \
$(CONVERT) \
$(CONF) \
$(GUMPS) \
$(WIDGETS) \
$(WORLD) \
$(ACTORS) \
$(ARGS) \
$(AUDIO) \
$(MIDI) \
$(TIMIDITY) \
$(SYSTEM) \
filesys/OutputLogger.o \
kernel/GUIApp.o \
misc/version.o \
pentagram.o
llc_OBJ = \
kernel/Kernel.o \
kernel/Process.o \
$(FILESYS) \
$(GAMES) \
$(MISC) \
$(CONF) \
$(COMPILE) \
$(DISASM) \
$(ARGS) \
kernel/CoreApp.o \
kernel/ConApp.o \
tools/compile/llc.o
# make version.o depend on everything to force a rebuild (for build time/date)
misc/version.o: $(filter-out misc/version.o,$(pentagram_OBJ))
# install rules
install-bin: pentagram$(EXEEXT)
$(INSTALL) -d "$(DESTDIR)$(bindir)"
$(INSTALL_PROGRAM) "$(top_builddir)/pentagram$(EXEEXT)" "$(DESTDIR)$(bindir)/pentagram$(EXEEXT)"
ifeq ($(USE_BUILTIN_DATA),yes)
install-data:
else
install-data: $(DATA_FILES)
$(INSTALL) -d "$(DESTDIR)$(datapath)"
$(INSTALL_DATA) $(patsubst %,$(top_srcdir)/%,$(DATA_FILES)) "$(DESTDIR)$(datapath)"
endif
install: install-bin install-data
# Common rules
include $(srcdir)/common.mk
# Mac OS X rules
ifeq ($(HOST_SYSTEM),MACOSX)
bundle_name = pentagram.app
bundle: pentagram$(EXEEXT)
mkdir -p $(bundle_name)/Contents/MacOS
mkdir -p $(bundle_name)/Contents/Resources/
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
$(INSTALL_DATA) system/macosx/Info.plist $(bundle_name)/Contents/
$(INSTALL_PROGRAM) pentagram$(EXEEXT) $(bundle_name)/Contents/MacOS/
$(INSTALL_DATA) $(top_srcdir)/system/desktop/pentagram.* $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.ini $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.tga $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.png $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.ttf $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/data/*.txt $(bundle_name)/Contents/Resources/
$(INSTALL_DATA) $(top_srcdir)/AUTHORS $(bundle_name)
$(INSTALL_DATA) $(top_srcdir)/COPYING $(bundle_name)
$(INSTALL_DATA) $(top_srcdir)/FAQ $(bundle_name)
$(INSTALL_DATA) $(top_srcdir)/README $(bundle_name)
install-exec-local: bundle
mkdir -p $(DESTDIR)/Applications/
cp -r $(bundle_name) $(DESTDIR)/Applications/
image: bundle
mkdir pentagram-snapshot
cp $(top_srcdir)/AUTHORS ./pentagram-snapshot/Authors
cp $(top_srcdir)/COPYING ./pentagram-snapshot/License
cp $(top_srcdir)/README ./pentagram-snapshot/ReadMe
cp $(top_srcdir)/FAQ ./pentagram-snapshot/FAQ
/Developer/Tools/SetFile -t ttro -c ttxt ./pentagram-snapshot/*
/Developer/Tools/CpMac -r $(bundle_name) ./pentagram-snapshot/
hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \
-srcfolder pentagram-snapshot \
-volname "Pentagram snapshot" \
Pentagram.dmg
rm -rf pentagram-snapshot
clean-local:
-rm -f Pentagram.dmg
-rm -rf $(bundle_name)
endif
.PHONY: install install-bin install-data