-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile.onscripter
245 lines (200 loc) · 10.9 KB
/
Makefile.onscripter
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# -*- makefile-gmake -*-
#
# Makefile.onscripter - General makefile rules for ONScripter
#
TARGET ?= onscripter-en
TDIR = tools/
TOOLBINS = sardec$(EXESUFFIX) nsadec$(EXESUFFIX) \
ns2dec$(EXESUFFIX) nscdec$(EXESUFFIX) \
sarconv$(EXESUFFIX) nsaconv$(EXESUFFIX) \
ns2conv$(EXESUFFIX) batchconv$(EXESUFFIX) \
sarmake$(EXESUFFIX) nsamake$(EXESUFFIX) \
ns2make$(EXESUFFIX) nscmake$(EXESUFFIX) \
nbzdec$(EXESUFFIX)
TOOLS = $(TOOLBINS:%=$(TDIR)%)
TOOL_INCS = -I`pwd` -Iextlib/include $(TOOL_EXTRA_INCS)
TOOL_DEFS = $(DEFS) -DTOOLS_BUILD
GUI_OBJS = ONScripterReporter$(OBJSUFFIX) \
ONScripterLabel$(OBJSUFFIX) \
ONScripterLabel_command$(OBJSUFFIX) \
ONScripterLabel_text$(OBJSUFFIX) \
ONScripterLabel_effect$(OBJSUFFIX) \
ONScripterLabel_effect_breakup$(OBJSUFFIX) \
ONScripterLabel_effect_cascade$(OBJSUFFIX) \
ONScripterLabel_effect_trig$(OBJSUFFIX) \
ONScripterLabel_event$(OBJSUFFIX) \
ONScripterLabel_rmenu$(OBJSUFFIX) \
ONScripterLabel_animation$(OBJSUFFIX) \
ONScripterLabel_sound$(OBJSUFFIX) \
ONScripterLabel_file$(OBJSUFFIX) \
ONScripterLabel_file2$(OBJSUFFIX) \
ONScripterLabel_image$(OBJSUFFIX) AnimationInfo$(OBJSUFFIX) \
FontInfo$(OBJSUFFIX) DirtyRect$(OBJSUFFIX) \
graphics_routines$(OBJSUFFIX) resize_image$(OBJSUFFIX)
DECODER_OBJS = DirectReader$(OBJSUFFIX) SarReader$(OBJSUFFIX) \
NsaReader$(OBJSUFFIX)
ONSCRIPTER_OBJS = onscripter$(OBJSUFFIX) $(DECODER_OBJS) \
ScriptHandler$(OBJSUFFIX) ScriptParser$(OBJSUFFIX) \
ScriptParser_command$(OBJSUFFIX) $(GUI_OBJS) \
sjis2utf16$(OBJSUFFIX) $(EXT_OBJS) $(OTHER_OBJS) \
DirPaths$(OBJSUFFIX) Layer$(OBJSUFFIX) \
Encoding$(OBJSUFFIX)
SARDEC_OBJS = $(TDIR)sardec$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)DirPaths$(OBJSUFFIX) \
$(TDIR)sjis2utf16$(OBJSUFFIX)
SARMAKE_OBJS = $(TDIR)sarmake$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)DirPaths$(OBJSUFFIX) \
$(TDIR)sjis2utf16$(OBJSUFFIX)
SARCONV_OBJS = $(TDIR)sarconv$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)DirPaths$(OBJSUFFIX) \
$(TDIR)resize_image$(OBJSUFFIX) $(TDIR)conv_shared$(OBJSUFFIX) \
$(TDIR)sjis2utf16$(OBJSUFFIX)
NSADEC_OBJS = $(TDIR)nsadec$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)NsaReader$(OBJSUFFIX) \
$(TDIR)DirPaths$(OBJSUFFIX) $(TDIR)sjis2utf16$(OBJSUFFIX)
NSACONV_OBJS = $(TDIR)nsaconv$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)NsaReader$(OBJSUFFIX) \
$(TDIR)DirPaths$(OBJSUFFIX) $(TDIR)resize_image$(OBJSUFFIX) \
$(TDIR)conv_shared$(OBJSUFFIX) $(TDIR)sjis2utf16$(OBJSUFFIX)
NSAMAKE_OBJS = $(TDIR)nsamake$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)NsaReader$(OBJSUFFIX) \
$(TDIR)DirPaths$(OBJSUFFIX) $(TDIR)sjis2utf16$(OBJSUFFIX)
NS2DEC_OBJS = $(TDIR)ns2dec$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)NsaReader$(OBJSUFFIX) \
$(TDIR)DirPaths$(OBJSUFFIX) $(TDIR)sjis2utf16$(OBJSUFFIX)
NS2CONV_OBJS = $(TDIR)ns2conv$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)NsaReader$(OBJSUFFIX) \
$(TDIR)DirPaths$(OBJSUFFIX) $(TDIR)resize_image$(OBJSUFFIX) \
$(TDIR)conv_shared$(OBJSUFFIX) $(TDIR)sjis2utf16$(OBJSUFFIX)
NS2MAKE_OBJS = $(TDIR)ns2make$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)NsaReader$(OBJSUFFIX) \
$(TDIR)DirPaths$(OBJSUFFIX) $(TDIR)sjis2utf16$(OBJSUFFIX)
BATCONV_OBJS = $(TDIR)batchconv$(OBJSUFFIX) $(TDIR)resize_image$(OBJSUFFIX) \
$(TDIR)conv_shared$(OBJSUFFIX)
NBZDEC_OBJS = $(TDIR)nbzdec$(OBJSUFFIX) $(TDIR)DirectReader$(OBJSUFFIX) \
$(TDIR)SarReader$(OBJSUFFIX) $(TDIR)DirPaths$(OBJSUFFIX) \
$(TDIR)sjis2utf16$(OBJSUFFIX)
READER_HEADER = BaseReader.h DirectReader.h DirPaths.h
PARSER_HEADER = $(EXTRADEPS) SarReader.h NsaReader.h DirectReader.h \
$(READER_HEADER) ScriptHandler.h ScriptParser.h $(RC_HDRS) \
AnimationInfo.h FontInfo.h DirtyRect.h Layer.h LUAHandler.h
ONSCRIPTER_HEADER = ONScripterLabel.h $(PARSER_HEADER)
ALL: $(TARGET)$(EXESUFFIX) tools
$(TARGET)$(EXESUFFIX): $(ONSCRIPTER_OBJS)
$(CXX) -o $@ $(SANFLAGS) $(LDFLAGS) $(ONSCRIPTER_OBJS) $(LIBS)
$(ONSCRIPTER_OBJS): $(EXTRADEPS)
tools: $(TOOL_EXTRADEPS) $(TOOLS)
$(TOOLS): $(EXTRADEPS)
$(TDIR)sardec$(EXESUFFIX): $(SARDEC_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(SARDEC_OBJS) $(TOOL_LIBS)
$(TDIR)sarconv$(EXESUFFIX): $(SARCONV_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(SARCONV_OBJS) $(TOOL_LIBS)
$(TDIR)sarmake$(EXESUFFIX): $(SARMAKE_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(SARMAKE_OBJS) $(TOOL_LIBS)
$(TDIR)nsadec$(EXESUFFIX): $(NSADEC_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NSADEC_OBJS) $(TOOL_LIBS)
$(TDIR)nsaconv$(EXESUFFIX): $(NSACONV_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NSACONV_OBJS) $(TOOL_LIBS)
$(TDIR)nsamake$(EXESUFFIX): $(NSAMAKE_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NSAMAKE_OBJS) $(TOOL_LIBS)
$(TDIR)ns2dec$(EXESUFFIX): $(NS2DEC_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NS2DEC_OBJS) $(TOOL_LIBS)
$(TDIR)ns2conv$(EXESUFFIX): $(NS2CONV_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NS2CONV_OBJS) $(TOOL_LIBS)
$(TDIR)ns2make$(EXESUFFIX): $(NS2MAKE_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NS2MAKE_OBJS) $(TOOL_LIBS)
$(TDIR)batchconv$(EXESUFFIX): $(BATCONV_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(BATCONV_OBJS) $(TOOL_LIBS)
$(TDIR)nscdec$(EXESUFFIX): $(TDIR)nscdec$(OBJSUFFIX)
$(CXX) -o $@ $(LDFLAGS) $< $(TOOL_LIBS)
$(TDIR)nscmake$(EXESUFFIX): $(TDIR)nscmake$(OBJSUFFIX)
$(CXX) -o $@ $(LDFLAGS) $< $(TOOL_LIBS)
$(TDIR)nbzdec$(EXESUFFIX): $(NBZDEC_OBJS)
$(CXX) -o $@ $(LDFLAGS) $(NBZDEC_OBJS) $(TOOL_LIBS)
pclean:
-$(RM) *$(OBJSUFFIX) $(CLEANUP) $(RCCLEAN)
pdistclean: pclean ptoolsdistclean
-$(RM) $(TARGET_EXE)$(EXESUFFIX) onscripter-en$(EXESUFFIX)
ptoolsclean: $(TOOL_EXTRA_CLEAN)
-$(RM) $(TDIR)*$(OBJSUFFIX)
ptoolsdistclean: ptoolsclean
-$(RM) $(TOOLS)
$(TDIR)sardec$(OBJSUFFIX): $(TDIR)arcdec.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DSAR $<
$(TDIR)nsadec$(OBJSUFFIX): $(TDIR)arcdec.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DNSA $<
$(TDIR)ns2dec$(OBJSUFFIX): $(TDIR)arcdec.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DNS2 $<
$(TDIR)sarconv$(OBJSUFFIX): $(TDIR)arcconv.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DSAR $<
$(TDIR)nsaconv$(OBJSUFFIX): $(TDIR)arcconv.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DNSA $<
$(TDIR)ns2conv$(OBJSUFFIX): $(TDIR)arcconv.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DNS2 $<
$(TDIR)sarmake$(OBJSUFFIX): $(TDIR)arcmake.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DSAR $<
$(TDIR)nsamake$(OBJSUFFIX): $(TDIR)arcmake.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DNSA $<
$(TDIR)ns2make$(OBJSUFFIX): $(TDIR)arcmake.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) -DNS2 $<
$(TDIR)%$(OBJSUFFIX): $(TDIR)%.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) $<
$(TDIR)%Reader$(OBJSUFFIX): %Reader.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) $<
$(TDIR)DirPaths$(OBJSUFFIX): DirPaths.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) $<
$(TDIR)resize_image$(OBJSUFFIX): resize_image.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) $<
$(TDIR)sjis2utf16$(OBJSUFFIX): sjis2utf16.cpp
$(CXX) -c -o $@ $(CXXSTD) $(OSCFLAGS) $(TOOL_INCS) $(TOOL_DEFS) $<
.cpp$(OBJSUFFIX):
$(CXX) -c $(CXXSTD) $(OSCFLAGS) $(INCS) $(DEFS) $<
SarReader$(OBJSUFFIX): $(READER_HEADER) SarReader.h
NsaReader$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
DirectReader$(OBJSUFFIX): $(READER_HEADER) DirectReader.h
ScriptHandler$(OBJSUFFIX): ScriptHandler.h Encoding.h
ScriptParser$(OBJSUFFIX): $(PARSER_HEADER)
ScriptParser_command$(OBJSUFFIX): $(PARSER_HEADER)
Encoding$(OBJSUFFIX): Encoding.h
$(TDIR)sardec$(OBJSUFFIX): $(READER_HEADER) SarReader.h
$(TDIR)sarconv$(OBJSUFFIX): $(READER_HEADER) SarReader.h
$(TDIR)sarmake$(OBJSUFFIX): $(READER_HEADER) SarReader.h
$(TDIR)nsadec$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)nsaconv$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)nsamake$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)ns2dec$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)ns2conv$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)ns2make$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)nbzdec$(OBJSUFFIX): $(READER_HEADER) SarReader.h
$(TDIR)conv_shared$(OBJSUFFIX): resize_image.h
$(TDIR)SarReader$(OBJSUFFIX): $(READER_HEADER) SarReader.h
$(TDIR)NsaReader$(OBJSUFFIX): $(READER_HEADER) SarReader.h NsaReader.h
$(TDIR)DirectReader$(OBJSUFFIX): $(READER_HEADER) DirectReader.h
$(TDIR)DirPaths$(OBJSUFFIX): DirPaths.h
$(TDIR)resize_image$(OBJSUFFIX): resize_image.h
onscripter$(OBJSUFFIX): $(ONSCRIPTER_HEADER) version.h
ONScripterReporter$(OBJSUFFIX): $(ONSCRIPTER_HEADER) ONScripterReporter.h Reporter.h
ONScripterLabel$(OBJSUFFIX): $(ONSCRIPTER_HEADER) graphics_common.h graphics_cpu.h graphics_resize.h
ONScripterLabel_command$(OBJSUFFIX): $(ONSCRIPTER_HEADER) graphics_common.h graphics_resize.h version.h
ONScripterLabel_text$(OBJSUFFIX): $(ONSCRIPTER_HEADER) Encoding.h
ONScripterLabel_effect$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_effect_breakup$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_effect_cascade$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_effect_trig$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_event$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_rmenu$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_animation$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_sound$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_file$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_file2$(OBJSUFFIX): $(ONSCRIPTER_HEADER)
ONScripterLabel_image$(OBJSUFFIX): $(ONSCRIPTER_HEADER) graphics_common.h graphics_blend.h
AnimationInfo$(OBJSUFFIX): AnimationInfo.h graphics_common.h graphics_sum.h graphics_blend.h graphics_resize.h
FontInfo$(OBJSUFFIX): FontInfo.h Encoding.h
DirtyRect$(OBJSUFFIX): DirtyRect.h
DirPaths$(OBJSUFFIX): DirPaths.h
graphics_routines$(OBJSUFFIX): graphics_common.h graphics_cpu.h graphics_sum.h graphics_blend.h graphics_resize.h resize_image.h
resize_image$(OBJSUFFIX): resize_image.h
Layer$(OBJSUFFIX): Layer.h AnimationInfo.h graphics_common.h graphics_sum.h
MadWrapper$(OBJSUFFIX): MadWrapper.h
AVIWrapper$(OBJSUFFIX): AVIWrapper.h
LUAHandler$(OBJSUFFIX): $(ONSCRIPTER_HEADER) LUAHandler.h