-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
119 lines (103 loc) · 3.4 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
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
DESTDIR =
PREFIX = "/usr/local"
DATADIR = "${PREFIX}/share"
MANDIR = "${PREFIX}/share/man"
LIBDIR = "${PREFIX}/lib/flexlay"
BINDIR = "${PREFIX}/bin"
FLEXLAY_DATADIR = ${DATADIR}/flexlay
NETPANZER_EDITOR_DATADIR = ${DATADIR}/netpanzer-editor
FLEXLAY_PAINT_DATADIR = ${DATADIR}/flexlay-paint
build-stamp:
scons
touch build-stamp
clean:
scons -c
rm -rf .sconf_temp/
rm -f .sconsign.dblite
rm -f config.log
rm -f build-stamp
install: build install-exec install-data
install-exec: install-flexlay-exec install-flexlay-paint-exec install-netpanzer-editor-exec
install-data: install-flexlay-data install-flexlay-paint-data install-netpanzer-editor-data
install-flexlay: install-flexlay-exec install-flexlay-data
install-flexlay-paint: install-flexlay-paint-exec install-flexlay-paint-data
install-netpanzer-editor: install-netpanzer-editor-exec install-netpanzer-editor-data
install-flexlay-exec: build-stamp
install -D ruby/flexlay_wrap.so ${DESTDIR}${LIBDIR}/flexlay_wrap.so
install-flexlay-data:
cd data/; \
find -type f \( \
-name "*.rb" -o \
-name "*.png" -o \
-name "*.tga" -o \
-name "*.xml" \) \
-exec install -m 644 -D {} ${DESTDIR}${FLEXLAY_DATADIR}/{} \;
cd ruby/; \
find -type f \( \
-name "*.rb" -o \
-name "*.png" -o \
-name "*.xml" \) \
-exec install -m 644 -D {} ${DESTDIR}${FLEXLAY_DATADIR}/{} \;
install-netpanzer-editor-exec: build-stamp
install -D netpanzer/netpanzer_wrap.so ${DESTDIR}${LIBDIR}/netpanzer_wrap.so
install -d ${DESTDIR}${BINDIR}
echo \
'#!/bin/sh\n'\
'\n'\
'FLEXLAY_DATADIR="'${FLEXLAY_DATADIR}'"\n'\
'export FLEXLAY_DATADIR\n'\
'\n'\
'NETPANZER_DATADIR="/usr/share/games/netpanzer/"\n'\
'export NETPANZER_DATADIR\n'\
'\n'\
'NETPANZER_EDITOR_DATADIR="'${NETPANZER_EDITOR_DATADIR}'"\n'\
'export NETPANZER_EDITOR_DATADIR\n'\
'\n'\
'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'${LIBDIR}'\n'\
'export LD_LIBRARY_PATH\n'\
'\n'\
'RUBYLIB="$$RUBYLIB:'${FLEXLAY_DATADIR}':'${LIBDIR}':'${NETPANZER_EDITOR_DATADIR}'"\nexport RUBYLIB\n'\
'\n'\
'exec ruby -w '${NETPANZER_EDITOR_DATADIR}/netpanzer.rb' "$$@"\n\n'\
'# EOF #' > ${DESTDIR}${BINDIR}/netpanzer-editor
chmod 755 ${DESTDIR}${BINDIR}/netpanzer-editor
install-netpanzer-editor-data:
cd netpanzer/; \
find -type f \( \
-name "*.rb" -o \
-name "*.png" -o \
-name "*.xml" \) \
-exec install -m 644 -D {} ${DESTDIR}${NETPANZER_EDITOR_DATADIR}/{} \;
install-flexlay-paint-exec:
install -d ${DESTDIR}${BINDIR}
echo \
'#!/bin/sh\n'\
'\n'\
'FLEXLAY_DATADIR="'${FLEXLAY_DATADIR}'"\n'\
'export FLEXLAY_DATADIR\n'\
'\n'\
'FLEXLAY_PAINT_DATADIR="'${FLEXLAY_PAINT_DATADIR}'"\n'\
'export FLEXLAY_PAINT_DATADIR\n'\
'\n'\
'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'${LIBDIR}'\n'\
'export LD_LIBRARY_PATH\n'\
'\n'\
'RUBYLIB="$$RUBYLIB:'${FLEXLAY_DATADIR}':'${LIBDIR}':'${FLEXLAY_PAINT_DATADIR}'"\nexport RUBYLIB\n'\
'\n'\
'exec ruby -w '${FLEXLAY_PAINT_DATADIR}/paint.rb' "$$@"\n\n'\
'# EOF #' > ${DESTDIR}${BINDIR}/flexlay-paint
chmod 755 ${DESTDIR}${BINDIR}/flexlay-paint
install-flexlay-paint-data:
cd paint/; \
find -type f \( \
-name "*.rb" \) \
-exec install -m 644 -D {} ${DESTDIR}${FLEXLAY_PAINT_DATADIR}/{} \;
.PHONY : build clean \
install install-exec install-data \
install-flexlay \
install-flexlay-paint \
install-netpanzer-editor \
install-flexlay-exec install-flexlay-data \
install-netpanzer-editor-exec install-netpanzer-editor-data \
install-flexlay-paint-exec install-flexlay-paint-data
# EOF #