Mercurial > hg > dmlib
annotate Makefile.gen @ 344:9cf1a58b0234
Beginnings of the editor.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 15 Oct 2012 22:48:41 +0300 |
parents | 6ecc7eb6d158 |
children | 83e4af7835ce |
rev | line source |
---|---|
0 | 1 ### |
2 ### Get settings from config.mak | |
3 ### | |
4 include config.mak | |
5 | |
6 ifeq ($(EXTRA_CFLAGS),) | |
334 | 7 EXTRA_CFLAGS=-O3 -march=core2 -DDM_DEVEL |
0 | 8 endif |
9 | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
10 ifneq ($(DMLIB),) |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
11 DM_CFLAGS += -I$(DMLIB) |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
12 endif |
0 | 13 |
344 | 14 |
15 ### | |
16 ### Editor | |
17 ### | |
18 ifeq ($(DM_BUILD_EDITOR),yes) | |
19 ifneq ($(DEMO_BIN),) | |
20 BINARIES += ed_$(DEMO_BIN) | |
21 endif | |
22 endif | |
23 | |
24 EDITOR_OBJS = gtktimeline.o gtkwaveform.o dmeditor.o | |
25 | |
26 | |
0 | 27 ### |
28 ### Form additional compilation defines based on settings | |
29 ### | |
30 | |
31 # If C routines are not explicitly disabled, we enable them | |
32 ifeq ($(DM_USE_C),) | |
33 DM_USE_C=yes | |
34 endif | |
35 | |
36 ifeq ($(DM_USE_C),yes) | |
37 DM_CFLAGS+=-DDM_USE_C | |
38 endif | |
39 | |
40 # Enable SIMD routines, if requested | |
41 ifeq ($(DM_USE_SIMD),yes) | |
284
d47e8cafaa63
Add -msse2 if DM_USE_SIMD is enabled.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
42 DM_CFLAGS+=-DDM_USE_SIMD -msse2 |
0 | 43 endif |
44 | |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
45 # Enable Tremor Ogg Vorbis decoder |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
46 ifeq ($(DM_USE_TREMOR),yes) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
47 DM_CFLAGS+=-DDM_USE_TREMOR $(TREMOR_CFLAGS) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
48 DM_LDFLAGS+=$(TREMOR_LDFLAGS) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
49 endif |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
50 |
0 | 51 |
52 ### | |
53 ### Filesystem | |
54 ### | |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
55 ifeq ($(DM_USE_PACKFS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
56 BUILD_RES=yes |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
57 DM_CFLAGS += -DDM_USE_PACKFS |
0 | 58 DMLIB_OBJS += dmpack.o dmpackutil.o |
59 DM_LDFLAGS += -lz | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
60 ifeq ($(DM_BUILD_TOOLS),yes) |
0 | 61 BINARIES += packed |
62 endif | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
63 endif |
0 | 64 |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
65 ifeq ($(DM_USE_STDIO),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
66 BUILD_RES=yes |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
67 DM_CFLAGS += -DDM_USE_STDIO |
0 | 68 endif |
69 | |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
70 ifeq ($(DM_USE_MEMIO),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
71 BUILD_RES=yes |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
72 DM_CFLAGS += -DDM_USE_MEMIO |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
73 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
74 |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
75 ifeq ($(BUILD_RES),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
76 DMLIB_OBJS += dmres.o dmresw.o |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
77 endif |
0 | 78 |
79 ### | |
80 ### Graphics support | |
81 ### | |
82 | |
83 ifeq ($(DM_GFX_MISC),yes) | |
84 DM_CFLAGS += -DDM_GFX_MISC | |
85 DMLIB_OBJS += dmgfx.o | |
86 endif | |
87 | |
88 ifeq ($(DM_GFX_LINES),yes) | |
89 DM_CFLAGS += -DDM_GFX_LINES | |
90 DMLIB_OBJS += dmline.o | |
91 endif | |
92 | |
93 ifeq ($(DM_GFX_BLITS),yes) | |
94 DM_CFLAGS += -DDM_GFX_BLITS | |
95 DMLIB_OBJS += dmblit.o | |
96 endif | |
97 | |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
98 ifeq ($(DM_GFX_BM_TEXT),yes) |
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
99 DM_CFLAGS += -DDM_GFX_BM_TEXT |
64
ad1ef3f0d474
More work on the text subsystem.
Matti Hamalainen <ccr@tnsp.org>
parents:
60
diff
changeset
|
100 DMLIB_OBJS += dmtext_bm.o |
160 | 101 ifeq ($(DM_BUILD_TOOLS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
102 ifeq ($(DM_USE_STDIO),yes) |
160 | 103 BINARIES += fontconv |
104 endif | |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
105 endif |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
106 endif |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
107 |
0 | 108 ifeq ($(DM_GFX_TTF_TEXT),yes) |
109 DM_CFLAGS += -DDM_GFX_TTF_TEXT | |
64
ad1ef3f0d474
More work on the text subsystem.
Matti Hamalainen <ccr@tnsp.org>
parents:
60
diff
changeset
|
110 DMLIB_OBJS += dmtext_ttf.o |
0 | 111 |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
112 ifeq ($(DM_BUILD_TESTS),yes) |
0 | 113 ifeq ($(DM_GFX_BLITS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
114 ifeq ($(DM_USE_STDIO),yes) |
0 | 115 BINARIES += blittest vview vptest efu |
116 endif | |
117 endif | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
118 endif |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
119 endif |
0 | 120 |
121 ifeq ($(DM_GFX_8BIT),yes) | |
122 DM_CFLAGS += -DDM_GFX_8BIT | |
123 endif | |
124 | |
125 ifeq ($(DM_GFX_15BIT),yes) | |
126 DM_CFLAGS += -DDM_GFX_15BIT | |
127 endif | |
128 | |
129 ifeq ($(DM_GFX_16BIT),yes) | |
130 DM_CFLAGS += -DDM_GFX_15BIT | |
131 endif | |
132 | |
133 ifeq ($(DM_GFX_32BIT),yes) | |
134 DM_CFLAGS += -DDM_GFX_15BIT | |
135 endif | |
136 | |
137 | |
138 ### | |
139 ### miniJSS | |
140 ### | |
141 ifeq ($(JSS),yes) | |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
142 DM_CFLAGS+=-DDM_USE_JSS |
0 | 143 |
144 ifeq ($(JSS_LIGHT),yes) | |
145 DM_CFLAGS+=-DJSS_LIGHT -Os | |
146 else | |
147 ifeq ($(JSS_USE_ASSERTS),yes) | |
148 DM_CFLAGS+=-DJSS_USE_ASSERTS | |
149 endif | |
150 ifeq ($(JSS_DEBUG),yes) | |
151 DM_CFLAGS+=-DJSS_DEBUG | |
152 endif | |
153 endif | |
154 | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
155 ifeq ($(JSS_MIX_FP),yes) |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
156 DM_CFLAGS+=-DJSS_MIX_FP |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
157 endif |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
158 |
0 | 159 ifeq ($(JSS_SUP_THREADS),yes) |
160 DM_CFLAGS+=-DJSS_SUP_THREADS | |
161 endif | |
162 | |
163 | |
164 SUP_MODLOAD=no | |
165 ifeq ($(JSS_SUP_XM),yes) | |
166 SUP_MODLOAD=yes | |
167 DMLIB_OBJS+= jloadxm.o | |
168 DM_CFLAGS+=-DJSS_SUP_XM | |
169 endif | |
170 | |
171 ifeq ($(JSS_SUP_JSSMOD),yes) | |
172 SUP_MODLOAD=yes | |
173 DMLIB_OBJS+= jloadjss.o | |
174 DM_CFLAGS+=-DJSS_SUP_JSSMOD $(JSSMOD_FLAGS) | |
175 endif | |
176 | |
177 ifeq ($(DM_USE_C),yes) | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
178 TARGETS += $(DMLIB)jmix_c.c |
0 | 179 DMLIB_OBJS+=jmix_c.o |
180 endif | |
181 | |
182 #ifeq ($(DM_USE_SIMD),yes) | |
183 #DMLIB_OBJS+=jmix_simd.o | |
184 #endif | |
185 | |
186 | |
187 ### Dependancies | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
188 ifeq ($(DM_BUILD_TOOLS),yes) |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
189 ifeq ($(DM_USE_STDIO),yes) |
0 | 190 ifeq ($(SUP_MODLOAD),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
191 BINARIES+= viewmod mod2wav testpl |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
192 ifeq ($(DM_GFX_BM_TEXT),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
193 ifeq ($(DM_GFX_BLITS),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
194 ifeq ($(DM_GFX_MISC),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
195 BINARIES+= ppl |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
196 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
197 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
198 endif |
0 | 199 endif |
200 | |
201 ifeq ($(JSS_SUP_JSSMOD),yes) | |
202 ifeq ($(JSS_SUP_XM),yes) | |
203 BINARIES+= xm2jss | |
204 endif | |
205 endif | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
206 endif |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
207 endif |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
208 |
0 | 209 |
28
920fb22cffcf
Fix build process for jmix_c.c dependancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
210 DMLIB_OBJS += jss.o jssmix.o jssmod.o jssplr.o |
920fb22cffcf
Fix build process for jmix_c.c dependancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
211 |
0 | 212 endif |
213 | |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
214 |
0 | 215 ### |
216 ### Rest of the rules | |
217 ### | |
334 | 218 CFLAGS += -g -W -Wall -DHAVE_STRING_H $(EXTRA_CFLAGS) |
0 | 219 CXXFLAGS=$(CFLAGS) |
220 | |
221 DM_CFLAGS += $(SDL_CFLAGS) | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
222 DM_LDFLAGS += $(LDFLAGS) |
0 | 223 |
224 | |
225 DMLIB_A=$(OBJPATH)dmlib.a | |
226 DMLIB_OBJS += dmfile.o dmlib.o dmlerp.o dmstring.o \ | |
59
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
51
diff
changeset
|
227 dmargs.o dmvecmat.o dmperlin.o dmimage.o \ |
344 | 228 dmwav.o dmengine.o dmtimeline.o dmtimelinew.o dmq3d.o |
0 | 229 |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
230 ifeq ($(DM_BUILD_TESTS),yes) |
0 | 231 BINARIES += vecmattest fptest |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
232 endif |
0 | 233 |
1
6e169d87d963
Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
234 TARGETS += $(DMLIB_A) $(addprefix $(BINPATH),$(addsuffix $(EXEEXT),$(BINARIES))) |
0 | 235 |
236 all: $(TARGETS) | |
237 | |
238 ### | |
239 ### Generic rules | |
240 ### | |
344 | 241 $(OBJPATH)gtk%.o: $(DMLIB)gtk%.c $(DMLIB)gtk%.h |
242 @echo " CC $+" | |
243 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) $(GTK_CFLAGS) | |
244 | |
245 | |
322
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
246 $(OBJPATH)%.d: $(DMLIB)%.c |
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
247 @echo > $@ |
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
248 @grep '#\s*include\s*\"' $< | sed 's/#\s*include\s\s*"\(.*\)"/\1/' | while read i; do if test -e "$$i"; then echo "$$i" >> $@; fi; done |
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
249 |
0 | 250 |
1
6e169d87d963
Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
251 $(OBJPATH)%.o: $(DMLIB)%.c $(DMLIB)%.h |
0 | 252 @echo " CC $<" |
253 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
254 | |
1
6e169d87d963
Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
255 $(OBJPATH)%.o: $(DMLIB)%.c |
0 | 256 @echo " CC $<" |
257 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
258 | |
3 | 259 $(OBJPATH)%.o: %.c %.h |
260 @echo " CC $<" | |
261 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
262 | |
263 $(OBJPATH)%.o: %.c | |
264 @echo " CC $<" | |
265 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
266 | |
0 | 267 |
268 ### | |
269 ### dmlib rules | |
270 ### | |
271 | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
272 $(DMLIB)jmix_c.c: $(DMLIB)jmix_c_in.c $(DMLIB)jmixtmpl_c.h $(DMLIB)jmix_post_c.h |
51
36e2f910219c
A non-working implementation of floating point audio mixing.
Matti Hamalainen <ccr@tnsp.org>
parents:
49
diff
changeset
|
273 (echo "#include \"jssmix.h\"" && cpp $< $(DM_CFLAGS)) | sed "s/^# .*//g" > $@ |
34
7908061da010
Fix building of JSS mixer parts.
Matti Hamalainen <ccr@tnsp.org>
parents:
32
diff
changeset
|
274 |
163 | 275 $(OBJPATH)dmimage.o: $(DMLIB)dmimage.c $(DMLIB)stb_image.c $(DMLIB)dmimage.h |
0 | 276 @echo " CC $+" |
277 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
278 | |
192 | 279 $(OBJPATH)jssmod.o: $(DMLIB)jssmod.c $(DMLIB)jssmod.h $(DMLIB)jss.h |
280 @echo " CC $+" | |
281 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
282 | |
283 $(OBJPATH)jssplr.o: $(DMLIB)jssplr.c $(DMLIB)jssplr.h $(DMLIB)jss.h $(DMLIB)jssmod.h $(DMLIB)jssmix.h | |
284 @echo " CC $+" | |
285 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
286 | |
287 $(OBJPATH)jssmix.o: $(DMLIB)jssmix.c $(DMLIB)jssmix.h $(DMLIB)jss.h | |
288 @echo " CC $+" | |
289 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
290 | |
163 | 291 $(OBJPATH)dmblit.o: $(DMLIB)dmblit.c $(DMLIB)dmscaledblit.h $(DMLIB)dmunscaledblit.h $(DMLIB)dmblitfunc.h $(DMLIB)dmlib.h |
0 | 292 @echo " CC $+" |
293 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
294 | |
232
79dac918c81e
Modularize line clipping etc. a lot, and export all line drawing and
Matti Hamalainen <ccr@tnsp.org>
parents:
207
diff
changeset
|
295 $(OBJPATH)dmline.o: $(DMLIB)dmline.c $(DMLIB)dmdrawline.h $(DMLIB)dmlinefunc.h $(DMLIB)dmlineclip.h $(DMLIB)dmlib.h |
0 | 296 @echo " CC $+" |
297 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
298 | |
163 | 299 $(OBJPATH)dmargs.o: $(DMLIB)dmargs.c $(DMLIB)dmargs.h $(DMLIB)dmargs_int.c $(DMLIB)dmlib.h |
0 | 300 @echo " CC $+" |
301 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
302 | |
303 | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
304 $(DMLIB_A): $(addprefix $(OBJPATH),$(DMLIB_OBJS)) $(DMLIB)Makefile.gen config.mak |
0 | 305 @echo " AR $@ $(addprefix $(OBJPATH),$(DMLIB_OBJS))" |
306 @$(AR) cru $@ $+ $(addprefix $(OBJPATH),$(DMLIB_OBJS)) | |
307 @$(RANLIB) $@ | |
308 | |
28
920fb22cffcf
Fix build process for jmix_c.c dependancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
309 |
0 | 310 |
311 ### | |
312 ### Tests and binaries | |
313 ### | |
314 $(BINPATH)vview$(EXEEXT): $(OBJPATH)vview.o $(DMLIB_A) | |
315 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
316 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 317 |
318 $(BINPATH)blittest$(EXEEXT): $(OBJPATH)blittest.o $(DMLIB_A) | |
319 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
320 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 321 |
322 $(BINPATH)efu$(EXEEXT): $(OBJPATH)efu.o $(DMLIB_A) | |
323 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
324 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 325 |
326 $(BINPATH)vptest$(EXEEXT): $(OBJPATH)vptest.o $(DMLIB_A) | |
327 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
328 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 329 |
330 $(BINPATH)%test$(EXEEXT): $(OBJPATH)%test.o $(DMLIB_A) | |
331 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
332 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
0 | 333 |
334 $(BINPATH)packed$(EXEEXT): $(OBJPATH)packed.o $(DMLIB_A) | |
335 @echo " LINK $+" | |
163 | 336 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 337 |
338 $(BINPATH)mod2wav$(EXEEXT): $(OBJPATH)mod2wav.o $(DMLIB_A) | |
339 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
340 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
0 | 341 |
342 $(BINPATH)xm2jss$(EXEEXT): $(OBJPATH)xm2jss.o $(DMLIB_A) | |
343 @echo " LINK $+" | |
163 | 344 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 345 |
346 $(BINPATH)viewmod$(EXEEXT): $(OBJPATH)viewmod.o $(DMLIB_A) | |
347 @echo " LINK $+" | |
163 | 348 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 349 |
160 | 350 $(BINPATH)fontconv$(EXEEXT): $(OBJPATH)fontconv.o $(DMLIB_A) |
351 @echo " LINK $+" | |
289
4d053d9e6439
Add SDL_CFLAGS to fontconv build.
Matti Hamalainen <ccr@tnsp.org>
parents:
285
diff
changeset
|
352 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
160 | 353 |
0 | 354 $(BINPATH)testpl$(EXEEXT): $(OBJPATH)testpl.o $(DMLIB_A) |
355 @echo " LINK $+" | |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
356 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
0 | 357 |
164
a49d431ff40e
Add a hardcoded font to PPL.
Matti Hamalainen <ccr@tnsp.org>
parents:
163
diff
changeset
|
358 $(BINPATH)ppl$(EXEEXT): $(OBJPATH)ppl.o $(DMLIB_A) pplfont.h |
71
b908fda1036e
Add a simplistic skeleton of a module player with SDL-based view.
Matti Hamalainen <ccr@tnsp.org>
parents:
64
diff
changeset
|
359 @echo " LINK $+" |
285
245b15cd1919
Don't link libSDL uselessly to utilities that do not actually use it.
Matti Hamalainen <ccr@tnsp.org>
parents:
284
diff
changeset
|
360 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
71
b908fda1036e
Add a simplistic skeleton of a module player with SDL-based view.
Matti Hamalainen <ccr@tnsp.org>
parents:
64
diff
changeset
|
361 |
308
c4d52b8e3be4
Fix building of demo executable, the order of objects for linking was incorrect.
Matti Hamalainen <ccr@tnsp.org>
parents:
304
diff
changeset
|
362 $(BINPATH)$(DEMO_BIN)$(EXEEXT): $(OBJPATH)$(DEMO_BIN).o $(addprefix $(OBJPATH),$(DEMO_OBJS)) $(DMLIB_A) |
304
9a945c87f5ec
Add special rule for demo executables.
Matti Hamalainen <ccr@tnsp.org>
parents:
298
diff
changeset
|
363 @echo " LINK $+" |
9a945c87f5ec
Add special rule for demo executables.
Matti Hamalainen <ccr@tnsp.org>
parents:
298
diff
changeset
|
364 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
9a945c87f5ec
Add special rule for demo executables.
Matti Hamalainen <ccr@tnsp.org>
parents:
298
diff
changeset
|
365 |
344 | 366 ### |
367 ### Editor targets | |
368 ### | |
369 $(OBJPATH)dmeditor.o: $(DMLIB)dmeditor.c | |
370 @echo " CC $+" | |
371 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) $(GTK_CFLAGS) | |
372 | |
373 | |
374 $(BINPATH)ed_$(DEMO_BIN)$(EXEEXT): $(OBJPATH)$(DEMO_BIN).o $(addprefix $(OBJPATH),$(EDITOR_OBJS)) $(addprefix $(OBJPATH),$(DEMO_OBJS)) $(DMLIB_A) | |
375 @echo " LINK $+" | |
376 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) $(GTK_LDFLAGS) | |
377 | |
0 | 378 |
379 ### | |
380 ### Special targets | |
381 ### | |
382 clean: | |
383 $(RM) $(TARGETS) $(OBJPATH)*.o | |
384 |