Mercurial > hg > dmlib
annotate Makefile.gen @ 655:064c942d342e
Work towards fixing the build.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 16 Apr 2013 07:24:06 +0300 |
parents | 469119cab5b2 |
children | c430112449a7 |
rev | line source |
---|---|
0 | 1 ### |
2 ### Get settings from config.mak | |
3 ### | |
4 include config.mak | |
5 | |
587
296133d29611
Fix and improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents:
584
diff
changeset
|
6 BINPATH ?= ./ |
296133d29611
Fix and improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents:
584
diff
changeset
|
7 DMLIB ?= ./ |
296133d29611
Fix and improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents:
584
diff
changeset
|
8 DM_CFLAGS += -I$(DMLIB) |
296133d29611
Fix and improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents:
584
diff
changeset
|
9 |
0 | 10 ifeq ($(EXTRA_CFLAGS),) |
624
5df8ef3f88bb
Oops, add -O3 back to default CFLAGS again.
Matti Hamalainen <ccr@tnsp.org>
parents:
607
diff
changeset
|
11 EXTRA_CFLAGS=-O3 -march=core2 -DDM_DEVEL |
0 | 12 endif |
13 | |
344 | 14 |
15 ### | |
16 ### Editor | |
17 ### | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
18 ifeq ($(DM_USE_TIMELINE),yes) |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
19 DM_CFLAGS+=-DDM_USE_TIMELINE |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
20 DMLIB_OBJS += dmtimeline.o dmtimelinew.o |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
21 |
344 | 22 ifeq ($(DM_BUILD_EDITOR),yes) |
23 ifneq ($(DEMO_BIN),) | |
24 BINARIES += ed_$(DEMO_BIN) | |
563
1483cd1cf0e6
Fix build by moving moc_* from TARGETS to TMPFILES.
Matti Hamalainen <ccr@tnsp.org>
parents:
562
diff
changeset
|
25 TARGETS += $(EDITOR_MAKEFILE) $(EDITOR_PRO) |
1483cd1cf0e6
Fix build by moving moc_* from TARGETS to TMPFILES.
Matti Hamalainen <ccr@tnsp.org>
parents:
562
diff
changeset
|
26 TMPFILES += $(OBJPATH)moc_* |
344 | 27 endif |
28 endif | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
29 endif |
344 | 30 |
370
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
31 EDITOR_PRO = editor.pro |
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
32 EDITOR_MAKEFILE = Makefile.editor |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
33 EDITOR_SOURCES = editor/edmain.cpp editor/edgui.cpp editor/edview.cpp \ |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
34 editor/edtlobj.cpp editor/edtimeline.cpp editor/edwaveform.cpp \ |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
35 editor/edres.cpp |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
36 EDITOR_HEADERS = editor/edmain.h editor/edtlobj.h editor/edview.h \ |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
37 editor/edtimeline.h editor/edwaveform.h editor/edres.h |
344 | 38 |
39 | |
0 | 40 ### |
41 ### Form additional compilation defines based on settings | |
42 ### | |
43 | |
44 # If C routines are not explicitly disabled, we enable them | |
45 ifeq ($(DM_USE_C),) | |
46 DM_USE_C=yes | |
47 endif | |
48 | |
49 ifeq ($(DM_USE_C),yes) | |
50 DM_CFLAGS+=-DDM_USE_C | |
51 endif | |
52 | |
53 # Enable SIMD routines, if requested | |
54 ifeq ($(DM_USE_SIMD),yes) | |
284
d47e8cafaa63
Add -msse2 if DM_USE_SIMD is enabled.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
55 DM_CFLAGS+=-DDM_USE_SIMD -msse2 |
0 | 56 endif |
57 | |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
58 # Enable Tremor Ogg Vorbis decoder |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
59 ifeq ($(DM_USE_TREMOR),yes) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
60 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
|
61 DM_LDFLAGS+=$(TREMOR_LDFLAGS) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
62 endif |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
63 |
0 | 64 |
65 ### | |
66 ### Filesystem | |
67 ### | |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
68 ifeq ($(DM_USE_PACKFS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
69 BUILD_RES=yes |
424 | 70 DM_CFLAGS += -DDM_USE_PACKFS $(ZLIB_CFLAGS) |
71 DM_LDFLAGS += $(ZLIB_LDFLAGS) | |
0 | 72 DMLIB_OBJS += dmpack.o dmpackutil.o |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
73 ifeq ($(DM_BUILD_TOOLS),yes) |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
496
diff
changeset
|
74 TOOL_BINARIES += packed |
0 | 75 endif |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
76 endif |
0 | 77 |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
78 ifeq ($(DM_USE_STDIO),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
79 BUILD_RES=yes |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
80 DM_CFLAGS += -DDM_USE_STDIO |
0 | 81 endif |
82 | |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
83 ifeq ($(DM_USE_MEMIO),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
84 BUILD_RES=yes |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
85 DM_CFLAGS += -DDM_USE_MEMIO |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
86 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
87 |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
88 ifeq ($(BUILD_RES),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
89 DMLIB_OBJS += dmres.o dmresw.o |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
90 endif |
0 | 91 |
92 ### | |
93 ### Graphics support | |
94 ### | |
95 | |
96 ifeq ($(DM_GFX_MISC),yes) | |
97 DM_CFLAGS += -DDM_GFX_MISC | |
98 DMLIB_OBJS += dmgfx.o | |
99 endif | |
100 | |
101 ifeq ($(DM_GFX_LINES),yes) | |
102 DM_CFLAGS += -DDM_GFX_LINES | |
103 DMLIB_OBJS += dmline.o | |
104 endif | |
105 | |
106 ifeq ($(DM_GFX_BLITS),yes) | |
107 DM_CFLAGS += -DDM_GFX_BLITS | |
108 DMLIB_OBJS += dmblit.o | |
109 endif | |
110 | |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
111 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
|
112 DM_CFLAGS += -DDM_GFX_BM_TEXT |
64
ad1ef3f0d474
More work on the text subsystem.
Matti Hamalainen <ccr@tnsp.org>
parents:
60
diff
changeset
|
113 DMLIB_OBJS += dmtext_bm.o |
160 | 114 ifeq ($(DM_BUILD_TOOLS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
115 ifeq ($(DM_USE_STDIO),yes) |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
496
diff
changeset
|
116 TOOL_BINARIES += fontconv |
160 | 117 endif |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
118 endif |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
119 endif |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
120 |
0 | 121 ifeq ($(DM_GFX_TTF_TEXT),yes) |
122 DM_CFLAGS += -DDM_GFX_TTF_TEXT | |
64
ad1ef3f0d474
More work on the text subsystem.
Matti Hamalainen <ccr@tnsp.org>
parents:
60
diff
changeset
|
123 DMLIB_OBJS += dmtext_ttf.o |
0 | 124 |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
125 ifeq ($(DM_BUILD_TESTS),yes) |
0 | 126 ifeq ($(DM_GFX_BLITS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
127 ifeq ($(DM_USE_STDIO),yes) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
128 TESTS_BINARIES += blittest vptest efu |
0 | 129 endif |
130 endif | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
131 endif |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
132 endif |
0 | 133 |
134 ifeq ($(DM_GFX_8BIT),yes) | |
135 DM_CFLAGS += -DDM_GFX_8BIT | |
136 endif | |
137 | |
138 ifeq ($(DM_GFX_15BIT),yes) | |
139 DM_CFLAGS += -DDM_GFX_15BIT | |
140 endif | |
141 | |
142 ifeq ($(DM_GFX_16BIT),yes) | |
143 DM_CFLAGS += -DDM_GFX_15BIT | |
144 endif | |
145 | |
146 ifeq ($(DM_GFX_32BIT),yes) | |
147 DM_CFLAGS += -DDM_GFX_15BIT | |
148 endif | |
149 | |
150 | |
151 ### | |
152 ### miniJSS | |
153 ### | |
154 ifeq ($(JSS),yes) | |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
155 DM_CFLAGS+=-DDM_USE_JSS |
0 | 156 |
157 ifeq ($(JSS_LIGHT),yes) | |
158 DM_CFLAGS+=-DJSS_LIGHT -Os | |
159 else | |
160 ifeq ($(JSS_USE_ASSERTS),yes) | |
161 DM_CFLAGS+=-DJSS_USE_ASSERTS | |
162 endif | |
163 ifeq ($(JSS_DEBUG),yes) | |
164 DM_CFLAGS+=-DJSS_DEBUG | |
165 endif | |
166 endif | |
167 | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
168 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
|
169 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
|
170 endif |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
171 |
0 | 172 ifeq ($(JSS_SUP_THREADS),yes) |
173 DM_CFLAGS+=-DJSS_SUP_THREADS | |
174 endif | |
175 | |
176 | |
177 SUP_MODLOAD=no | |
178 ifeq ($(JSS_SUP_XM),yes) | |
179 SUP_MODLOAD=yes | |
180 DMLIB_OBJS+= jloadxm.o | |
181 DM_CFLAGS+=-DJSS_SUP_XM | |
182 endif | |
183 | |
184 ifeq ($(JSS_SUP_JSSMOD),yes) | |
185 SUP_MODLOAD=yes | |
186 DMLIB_OBJS+= jloadjss.o | |
187 DM_CFLAGS+=-DJSS_SUP_JSSMOD $(JSSMOD_FLAGS) | |
188 endif | |
189 | |
190 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
|
191 TARGETS += $(DMLIB)jmix_c.c |
0 | 192 DMLIB_OBJS+=jmix_c.o |
193 endif | |
194 | |
195 #ifeq ($(DM_USE_SIMD),yes) | |
196 #DMLIB_OBJS+=jmix_simd.o | |
197 #endif | |
198 | |
572 | 199 ifeq ($(DM_BUILD_TOOLS),yes) |
200 ifeq ($(DM_USE_STDIO),yes) | |
201 ifeq ($(JSS_SUP_JSSMOD),yes) | |
202 ifeq ($(JSS_SUP_XM),yes) | |
203 TOOL_BINARIES+= xm2jss | |
204 endif | |
205 endif | |
206 endif | |
207 endif | |
208 DMLIB_OBJS += jss.o jssmix.o jssmod.o jssplr.o | |
209 endif | |
210 | |
0 | 211 |
212 ### Dependancies | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
213 ifeq ($(DM_BUILD_TOOLS),yes) |
435 | 214 DMLIB_OBJS += libgfx.o lib64gfx.o |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
215 ifeq ($(DM_USE_STDIO),yes) |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
496
diff
changeset
|
216 TOOL_BINARIES+= objlink data2inc gfxconv gentab |
0 | 217 ifeq ($(SUP_MODLOAD),yes) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
218 TOOL_BINARIES+= viewmod mod2wav |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
219 TESTS_BINARIES+= testpl |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
220 ifeq ($(DM_GFX_BLITS),yes) |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
496
diff
changeset
|
221 TOOL_BINARIES+= view64 |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
222 ifeq ($(DM_GFX_BM_TEXT),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
223 ifeq ($(DM_GFX_MISC),yes) |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
496
diff
changeset
|
224 TOOL_BINARIES+= ppl |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
225 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
226 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
227 endif |
0 | 228 endif |
229 | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
230 endif |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
231 endif |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
232 |
0 | 233 |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
234 |
421 | 235 ifeq ($(DM_USE_LIBPNG),yes) |
424 | 236 DM_CFLAGS += -DDM_USE_LIBPNG $(LIBPNG_CFLAGS) $(ZLIB_CFLAGS) |
421 | 237 endif |
238 | |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
239 ifeq ($(DM_BUILD_TESTS),yes) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
240 TESTS_BINARIES += vecmattest fptest |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
241 endif |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
242 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
243 FONTCONV_BIN=$(BINPATH)fontconv$(EXEEXT) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
244 DATA2INC_BIN=$(BINPATH)data2inc$(EXEEXT) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
245 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
246 |
0 | 247 ### |
248 ### Rest of the rules | |
249 ### | |
334 | 250 CFLAGS += -g -W -Wall -DHAVE_STRING_H $(EXTRA_CFLAGS) |
0 | 251 CXXFLAGS=$(CFLAGS) |
252 | |
253 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
|
254 DM_LDFLAGS += $(LDFLAGS) |
0 | 255 |
256 | |
257 DMLIB_A=$(OBJPATH)dmlib.a | |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
258 DMLIB_OBJS += \ |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
259 dmfile.o dmbstr.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
|
260 dmargs.o dmvecmat.o dmperlin.o dmimage.o \ |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
261 dmwav.o dmengine.o dmq3d.o |
0 | 262 |
263 | |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
264 TESTS_TARGETS = $(addprefix $(BINPATH),$(addsuffix $(EXEEXT),$(TESTS_BINARIES))) |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
496
diff
changeset
|
265 TOOL_TARGETS = $(addprefix $(BINPATH),$(addsuffix $(EXEEXT),$(TOOL_BINARIES))) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
266 TARGETS += $(DMLIB_A) $(addprefix $(BINPATH),$(addsuffix $(EXEEXT),$(BINARIES))) \ |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
267 $(TOOL_TARGETS) $(TESTS_TARGETS) |
0 | 268 |
269 all: $(TARGETS) | |
270 | |
271 ### | |
272 ### Generic rules | |
273 ### | |
322
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
274 $(OBJPATH)%.d: $(DMLIB)%.c |
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
275 @echo > $@ |
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
276 @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
|
277 |
0 | 278 |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
279 $(OBJPATH)%.o: $(DMLIB)tests/%.c $(DMLIB)tests/%.h |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
280 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
281 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
282 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
283 $(OBJPATH)%.o: $(DMLIB)tests/%.c |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
284 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
285 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
286 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
287 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
288 $(OBJPATH)%.o: $(DMLIB)tools/%.c $(DMLIB)tools/%.h |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
289 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
290 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
291 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
292 $(OBJPATH)%.o: $(DMLIB)tools/%.c |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
293 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
294 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
295 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
296 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
297 |
1
6e169d87d963
Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
298 $(OBJPATH)%.o: $(DMLIB)%.c $(DMLIB)%.h |
0 | 299 @echo " CC $<" |
300 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
301 | |
1
6e169d87d963
Improve buildsystem to support more flexible builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
302 $(OBJPATH)%.o: $(DMLIB)%.c |
0 | 303 @echo " CC $<" |
304 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
305 | |
3 | 306 $(OBJPATH)%.o: %.c %.h |
307 @echo " CC $<" | |
308 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
309 | |
310 $(OBJPATH)%.o: %.c | |
311 @echo " CC $<" | |
312 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
313 | |
0 | 314 |
315 ### | |
316 ### dmlib rules | |
317 ### | |
318 | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
319 $(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
|
320 (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
|
321 |
163 | 322 $(OBJPATH)dmimage.o: $(DMLIB)dmimage.c $(DMLIB)stb_image.c $(DMLIB)dmimage.h |
0 | 323 @echo " CC $+" |
324 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
325 | |
597
8a9361179a1a
More work on the video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
587
diff
changeset
|
326 |
192 | 327 $(OBJPATH)jssmod.o: $(DMLIB)jssmod.c $(DMLIB)jssmod.h $(DMLIB)jss.h |
328 @echo " CC $+" | |
329 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
330 | |
331 $(OBJPATH)jssplr.o: $(DMLIB)jssplr.c $(DMLIB)jssplr.h $(DMLIB)jss.h $(DMLIB)jssmod.h $(DMLIB)jssmix.h | |
332 @echo " CC $+" | |
333 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
334 | |
335 $(OBJPATH)jssmix.o: $(DMLIB)jssmix.c $(DMLIB)jssmix.h $(DMLIB)jss.h | |
336 @echo " CC $+" | |
337 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
338 | |
163 | 339 $(OBJPATH)dmblit.o: $(DMLIB)dmblit.c $(DMLIB)dmscaledblit.h $(DMLIB)dmunscaledblit.h $(DMLIB)dmblitfunc.h $(DMLIB)dmlib.h |
0 | 340 @echo " CC $+" |
341 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
342 | |
232
79dac918c81e
Modularize line clipping etc. a lot, and export all line drawing and
Matti Hamalainen <ccr@tnsp.org>
parents:
207
diff
changeset
|
343 $(OBJPATH)dmline.o: $(DMLIB)dmline.c $(DMLIB)dmdrawline.h $(DMLIB)dmlinefunc.h $(DMLIB)dmlineclip.h $(DMLIB)dmlib.h |
0 | 344 @echo " CC $+" |
345 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
346 | |
163 | 347 $(OBJPATH)dmargs.o: $(DMLIB)dmargs.c $(DMLIB)dmargs.h $(DMLIB)dmargs_int.c $(DMLIB)dmlib.h |
0 | 348 @echo " CC $+" |
349 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
350 | |
435 | 351 $(OBJPATH)libgfx.o: $(DMLIB)libgfx.c $(DMLIB)libgfx.h |
352 @echo " CC $+" | |
353 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) $(LIBPNG_CFLAGS) | |
354 | |
0 | 355 |
655
064c942d342e
Work towards fixing the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
356 $(DMLIB)assets/SetupFont.dmf: $(DMLIB)assets/SetupFont.fnt $(FONTCONV_BIN) |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
357 $(FONTCONV_BIN) -o $@ $< |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
358 |
655
064c942d342e
Work towards fixing the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
359 $(DMLIB)setupfont.h: $(DMLIB)assets/SetupFont.dmf |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
360 $(DATA2INC_BIN) -C -n engineSetupFont -t Uint8 $< $@ |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
361 |
655
064c942d342e
Work towards fixing the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
362 $(DMLIB)setupimage.h: $(DMLIB)assets/SetupImage.png |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
363 $(DATA2INC_BIN) -C -n engineSetupImage -t Uint8 $< $@ |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
364 |
655
064c942d342e
Work towards fixing the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
365 $(DMLIB)setupmenubar.h: $(DMLIB)assets/SetupMenuBar.png |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
366 $(DATA2INC_BIN) -C -n engineSetupMenuBar -t Uint8 $< $@ |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
367 |
607
360b1ad83ed9
Rename things; Fix build by combining the conflicting rules.
Matti Hamalainen <ccr@tnsp.org>
parents:
606
diff
changeset
|
368 $(OBJPATH)dmsimple.o: $(DMLIB)dmsimple.c $(DMLIB)dmengine.h \ |
360b1ad83ed9
Rename things; Fix build by combining the conflicting rules.
Matti Hamalainen <ccr@tnsp.org>
parents:
606
diff
changeset
|
369 $(DMLIB)setupmenubar.h $(DMLIB)setupfont.h \ |
360b1ad83ed9
Rename things; Fix build by combining the conflicting rules.
Matti Hamalainen <ccr@tnsp.org>
parents:
606
diff
changeset
|
370 $(DMLIB)setupimage.h $(DMLIB)dmsimple.c |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
371 @echo " CC $+" |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
372 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
373 |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
374 |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
375 $(DMLIB_A): $(addprefix $(OBJPATH),$(DMLIB_OBJS)) $(DMLIB)Makefile.gen config.mak |
0 | 376 @echo " AR $@ $(addprefix $(OBJPATH),$(DMLIB_OBJS))" |
522
2a70f5902b70
Objects being added twice to the lib archive fixed.
Matti Hamalainen <ccr@tnsp.org>
parents:
502
diff
changeset
|
377 @$(AR) cru $@ $(addprefix $(OBJPATH),$(DMLIB_OBJS)) |
0 | 378 @$(RANLIB) $@ |
379 | |
28
920fb22cffcf
Fix build process for jmix_c.c dependancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
380 |
0 | 381 |
382 ### | |
383 ### Tests and binaries | |
384 ### | |
385 $(BINPATH)blittest$(EXEEXT): $(OBJPATH)blittest.o $(DMLIB_A) | |
386 @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
|
387 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 388 |
389 $(BINPATH)efu$(EXEEXT): $(OBJPATH)efu.o $(DMLIB_A) | |
390 @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
|
391 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 392 |
393 $(BINPATH)vptest$(EXEEXT): $(OBJPATH)vptest.o $(DMLIB_A) | |
394 @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
|
395 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
0 | 396 |
397 $(BINPATH)%test$(EXEEXT): $(OBJPATH)%test.o $(DMLIB_A) | |
398 @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
|
399 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
0 | 400 |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
401 $(BINPATH)testpl$(EXEEXT): $(OBJPATH)testpl.o $(DMLIB_A) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
402 @echo " LINK $+" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
403 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
404 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
405 |
0 | 406 $(BINPATH)packed$(EXEEXT): $(OBJPATH)packed.o $(DMLIB_A) |
407 @echo " LINK $+" | |
163 | 408 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 409 |
410 $(BINPATH)mod2wav$(EXEEXT): $(OBJPATH)mod2wav.o $(DMLIB_A) | |
411 @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
|
412 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
0 | 413 |
414 $(BINPATH)xm2jss$(EXEEXT): $(OBJPATH)xm2jss.o $(DMLIB_A) | |
415 @echo " LINK $+" | |
163 | 416 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 417 |
418 $(BINPATH)viewmod$(EXEEXT): $(OBJPATH)viewmod.o $(DMLIB_A) | |
419 @echo " LINK $+" | |
163 | 420 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 421 |
584
923d920a8a85
Build setupfont.h and setupimage.h from source data files. Use setupfont in PPL.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
422 |
923d920a8a85
Build setupfont.h and setupimage.h from source data files. Use setupfont in PPL.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
423 $(FONTCONV_BIN): $(OBJPATH)fontconv.o $(DMLIB_A) |
160 | 424 @echo " LINK $+" |
289
4d053d9e6439
Add SDL_CFLAGS to fontconv build.
Matti Hamalainen <ccr@tnsp.org>
parents:
285
diff
changeset
|
425 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) -lSDL_ttf |
160 | 426 |
587
296133d29611
Fix and improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents:
584
diff
changeset
|
427 |
296133d29611
Fix and improve build process.
Matti Hamalainen <ccr@tnsp.org>
parents:
584
diff
changeset
|
428 $(BINPATH)ppl$(EXEEXT): $(DMLIB)setupfont.h $(OBJPATH)ppl.o $(DMLIB_A) |
0 | 429 @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
|
430 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
0 | 431 |
584
923d920a8a85
Build setupfont.h and setupimage.h from source data files. Use setupfont in PPL.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
432 |
376
40e33ad0d153
Work towards a working editor .. some day.
Matti Hamalainen <ccr@tnsp.org>
parents:
374
diff
changeset
|
433 $(BINPATH)$(DEMO_BIN)$(EXEEXT): $(addprefix $(OBJPATH),$(DEMO_OBJS)) $(DMLIB_A) |
304
9a945c87f5ec
Add special rule for demo executables.
Matti Hamalainen <ccr@tnsp.org>
parents:
298
diff
changeset
|
434 @echo " LINK $+" |
9a945c87f5ec
Add special rule for demo executables.
Matti Hamalainen <ccr@tnsp.org>
parents:
298
diff
changeset
|
435 @$(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
|
436 |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
437 |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
438 $(BINPATH)objlink$(EXEEXT): $(OBJPATH)objlink.o $(DMLIB_A) |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
439 @echo " LINK $+" |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
440 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
441 |
584
923d920a8a85
Build setupfont.h and setupimage.h from source data files. Use setupfont in PPL.
Matti Hamalainen <ccr@tnsp.org>
parents:
573
diff
changeset
|
442 $(DATA2INC_BIN): $(OBJPATH)data2inc.o $(DMLIB_A) |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
443 @echo " LINK $+" |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
444 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
445 |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
446 $(BINPATH)gfxconv$(EXEEXT): $(OBJPATH)gfxconv.o $(DMLIB_A) |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
447 @echo " LINK $+" |
424 | 448 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(LIBPNG_LDFLAGS) $(ZLIB_LDFLAGS) |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
449 |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
450 $(BINPATH)view64$(EXEEXT): $(OBJPATH)view64.o $(DMLIB_A) |
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
451 @echo " LINK $+" |
562
6a830bcd7eb9
Add zlib LDFLAGS to view64 linking phase.
Matti Hamalainen <ccr@tnsp.org>
parents:
557
diff
changeset
|
452 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(LIBPNG_LDFLAGS) $(ZLIB_LDFLAGS) $(SDL_LDFLAGS) |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
453 |
496
966617f0f6cd
Add a simple utility for generating different sinus, etc. value tables in c64 assembler format.
Matti Hamalainen <ccr@tnsp.org>
parents:
495
diff
changeset
|
454 $(BINPATH)gentab$(EXEEXT): $(OBJPATH)gentab.o $(DMLIB_A) |
966617f0f6cd
Add a simple utility for generating different sinus, etc. value tables in c64 assembler format.
Matti Hamalainen <ccr@tnsp.org>
parents:
495
diff
changeset
|
455 @echo " LINK $+" |
966617f0f6cd
Add a simple utility for generating different sinus, etc. value tables in c64 assembler format.
Matti Hamalainen <ccr@tnsp.org>
parents:
495
diff
changeset
|
456 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
966617f0f6cd
Add a simple utility for generating different sinus, etc. value tables in c64 assembler format.
Matti Hamalainen <ccr@tnsp.org>
parents:
495
diff
changeset
|
457 |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
403
diff
changeset
|
458 |
344 | 459 ### |
460 ### Editor targets | |
461 ### | |
380
ccb6e5108953
Add EDITOR_HEADERS to the dependency.
Matti Hamalainen <ccr@tnsp.org>
parents:
379
diff
changeset
|
462 $(EDITOR_PRO): $(DMLIB)Makefile.gen config.mak $(addprefix $(DMLIB),$(EDITOR_SOURCES) $(EDITOR_HEADERS)) $(addprefix $(OBJPATH),$(DEMO_OBJS)) $(DMLIB_A) |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
463 @echo " CREATE $@" |
377 | 464 @echo "OBJECTS_DIR = $(OBJPATH)" > $@ |
465 @echo "MOC_DIR = $(OBJPATH)" >> $@ | |
466 @echo "QMAKE_CXXFLAGS += $(DM_CFLAGS) $(SDL_CFLAGS)" >> $@ | |
376
40e33ad0d153
Work towards a working editor .. some day.
Matti Hamalainen <ccr@tnsp.org>
parents:
374
diff
changeset
|
467 @echo "QMAKE_LIBS += $(filter-out %dmsimple.o,$(filter %.o %.a,$+))" >> $@ |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
468 @echo "QMAKE_LIBS += $(DM_LDFLAGS) $(SDL_LDFLAGS)" >> $@ |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
469 @echo "MAKEFILE = $(EDITOR_MAKEFILE)" >> $@ |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
470 @echo "CONFIG += debug" >> $@ |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
471 @echo "QT += core gui opengl" >> $@ |
377 | 472 @echo "TARGET = $(BINPATH)ed_$(DEMO_BIN)$(EXEEXT)" >> $@ |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
473 @echo "TEMPLATE = app" >> $@ |
370
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
474 @echo "SOURCES = $(addprefix $(DMLIB),$(EDITOR_SOURCES))" >> $@ |
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
475 @echo "HEADERS = $(addprefix $(DMLIB),$(EDITOR_HEADERS))" >> $@ |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
476 |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
477 |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
478 $(EDITOR_MAKEFILE): $(EDITOR_PRO) |
355
dbc62ba3f132
Work towards Qt-based editor instead.
Matti Hamalainen <ccr@tnsp.org>
parents:
353
diff
changeset
|
479 @echo " QMAKE $+" |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
480 @qmake -Wall $< |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
481 |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
482 $(BINPATH)ed_$(DEMO_BIN)$(EXEEXT): $(EDITOR_MAKEFILE) |
392
fc9b476c46de
Pass parameters to sub-processes of make.
Matti Hamalainen <ccr@tnsp.org>
parents:
388
diff
changeset
|
483 @$(MAKE) -f $< |
344 | 484 |
0 | 485 |
486 ### | |
487 ### Special targets | |
488 ### | |
489 clean: | |
563
1483cd1cf0e6
Fix build by moving moc_* from TARGETS to TMPFILES.
Matti Hamalainen <ccr@tnsp.org>
parents:
562
diff
changeset
|
490 $(RM) $(TARGETS) $(TMPFILES) $(OBJPATH)*.o |
0 | 491 |