Mercurial > hg > dmlib
annotate Makefile.gen @ 844:5ea0bf4379b1
Oops, -DDM_USE_C was not in the build process ...
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 21 Oct 2014 09:34:20 +0300 |
parents | 9a7323271347 |
children | 951297a7938a |
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 ?= ./ |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
8 TOOL_BINPATH ?= $(DMLIB)tools/ |
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
9 TESTS_BINPATH ?= $(DMLIB)tests/ |
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
10 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
11 DMLIBSRC = $(DMLIB)src/ |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
12 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
13 DM_CFLAGS += -I$(DMLIBSRC) |
0 | 14 ifeq ($(EXTRA_CFLAGS),) |
624
5df8ef3f88bb
Oops, add -O3 back to default CFLAGS again.
Matti Hamalainen <ccr@tnsp.org>
parents:
607
diff
changeset
|
15 EXTRA_CFLAGS=-O3 -march=core2 -DDM_DEVEL |
0 | 16 endif |
17 | |
841 | 18 MKDIR ?= mkdir |
19 MKDIR_P ?= $(MKDIR) -p | |
20 | |
344 | 21 |
22 ### | |
23 ### Editor | |
24 ### | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
25 ifeq ($(DM_USE_TIMELINE),yes) |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
26 DM_CFLAGS+=-DDM_USE_TIMELINE |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
27 DMLIB_OBJS += dmtimeline.o dmtimelinew.o |
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
28 |
344 | 29 ifeq ($(DM_BUILD_EDITOR),yes) |
30 ifneq ($(DEMO_BIN),) | |
31 BINARIES += ed_$(DEMO_BIN) | |
563
1483cd1cf0e6
Fix build by moving moc_* from TARGETS to TMPFILES.
Matti Hamalainen <ccr@tnsp.org>
parents:
562
diff
changeset
|
32 TARGETS += $(EDITOR_MAKEFILE) $(EDITOR_PRO) |
1483cd1cf0e6
Fix build by moving moc_* from TARGETS to TMPFILES.
Matti Hamalainen <ccr@tnsp.org>
parents:
562
diff
changeset
|
33 TMPFILES += $(OBJPATH)moc_* |
344 | 34 endif |
35 endif | |
573
14640d0688d3
Make timeline stuff optional.
Matti Hamalainen <ccr@tnsp.org>
parents:
572
diff
changeset
|
36 endif |
344 | 37 |
370
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
38 EDITOR_PRO = editor.pro |
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
39 EDITOR_MAKEFILE = Makefile.editor |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
40 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
|
41 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
|
42 editor/edres.cpp |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
43 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
|
44 editor/edtimeline.h editor/edwaveform.h editor/edres.h |
344 | 45 |
46 | |
0 | 47 ### |
48 ### Form additional compilation defines based on settings | |
49 ### | |
50 | |
51 # Enable SIMD routines, if requested | |
52 ifeq ($(DM_USE_SIMD),yes) | |
284
d47e8cafaa63
Add -msse2 if DM_USE_SIMD is enabled.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
53 DM_CFLAGS+=-DDM_USE_SIMD -msse2 |
0 | 54 endif |
55 | |
105
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
56 # Enable Tremor Ogg Vorbis decoder |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
57 ifeq ($(DM_USE_TREMOR),yes) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
58 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
|
59 DM_LDFLAGS+=$(TREMOR_LDFLAGS) |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
60 endif |
d5d27f262227
Beging merging of dmsimple2-fork into the main "engine".
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
61 |
0 | 62 |
63 ### | |
64 ### Filesystem | |
65 ### | |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
66 ifeq ($(DM_USE_PACKFS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
67 BUILD_RES=yes |
424 | 68 DM_CFLAGS += -DDM_USE_PACKFS $(ZLIB_CFLAGS) |
69 DM_LDFLAGS += $(ZLIB_LDFLAGS) | |
0 | 70 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
|
71 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
|
72 TOOL_BINARIES += packed |
0 | 73 endif |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
74 endif |
0 | 75 |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
76 ifeq ($(DM_USE_STDIO),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
77 BUILD_RES=yes |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
78 DM_CFLAGS += -DDM_USE_STDIO |
0 | 79 endif |
80 | |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
81 ifeq ($(DM_USE_MEMIO),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
82 BUILD_RES=yes |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
83 DM_CFLAGS += -DDM_USE_MEMIO |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
84 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
85 |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
86 ifeq ($(BUILD_RES),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
87 DMLIB_OBJS += dmres.o dmresw.o |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
88 endif |
0 | 89 |
90 ### | |
91 ### Graphics support | |
92 ### | |
93 | |
94 ifeq ($(DM_GFX_MISC),yes) | |
95 DM_CFLAGS += -DDM_GFX_MISC | |
96 DMLIB_OBJS += dmgfx.o | |
97 endif | |
98 | |
99 ifeq ($(DM_GFX_LINES),yes) | |
100 DM_CFLAGS += -DDM_GFX_LINES | |
101 DMLIB_OBJS += dmline.o | |
102 endif | |
103 | |
104 ifeq ($(DM_GFX_BLITS),yes) | |
105 DM_CFLAGS += -DDM_GFX_BLITS | |
106 DMLIB_OBJS += dmblit.o | |
107 endif | |
108 | |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
109 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
|
110 DM_CFLAGS += -DDM_GFX_BM_TEXT |
64
ad1ef3f0d474
More work on the text subsystem.
Matti Hamalainen <ccr@tnsp.org>
parents:
60
diff
changeset
|
111 DMLIB_OBJS += dmtext_bm.o |
160 | 112 ifeq ($(DM_BUILD_TOOLS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
113 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
|
114 TOOL_BINARIES += fontconv |
160 | 115 endif |
60
f28cd66356f6
Initial work for bitmapped fonts and text drawing. Also moved TTF header
Matti Hamalainen <ccr@tnsp.org>
parents:
59
diff
changeset
|
116 endif |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
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 |
0 | 119 ifeq ($(DM_GFX_TTF_TEXT),yes) |
120 DM_CFLAGS += -DDM_GFX_TTF_TEXT | |
64
ad1ef3f0d474
More work on the text subsystem.
Matti Hamalainen <ccr@tnsp.org>
parents:
60
diff
changeset
|
121 DMLIB_OBJS += dmtext_ttf.o |
0 | 122 |
690
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
123 ifeq ($(DM_BUILD_TOOLS),yes) |
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
124 ifeq ($(DM_GFX_BLITS),yes) |
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
125 TOOL_BINARIES += auval |
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
126 endif |
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
127 endif |
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
128 |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
129 ifeq ($(DM_BUILD_TESTS),yes) |
0 | 130 ifeq ($(DM_GFX_BLITS),yes) |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
131 ifeq ($(DM_USE_STDIO),yes) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
132 TESTS_BINARIES += blittest vptest efu |
0 | 133 endif |
134 endif | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
135 endif |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
136 endif |
0 | 137 |
138 ifeq ($(DM_GFX_8BIT),yes) | |
139 DM_CFLAGS += -DDM_GFX_8BIT | |
140 endif | |
141 | |
142 ifeq ($(DM_GFX_15BIT),yes) | |
143 DM_CFLAGS += -DDM_GFX_15BIT | |
144 endif | |
145 | |
146 ifeq ($(DM_GFX_16BIT),yes) | |
147 DM_CFLAGS += -DDM_GFX_15BIT | |
148 endif | |
149 | |
150 ifeq ($(DM_GFX_32BIT),yes) | |
151 DM_CFLAGS += -DDM_GFX_15BIT | |
152 endif | |
153 | |
154 | |
155 ### | |
156 ### miniJSS | |
157 ### | |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
158 MINIJSS=$(DMLIB)/minijss/ |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
159 |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
160 |
0 | 161 ifeq ($(JSS),yes) |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
162 DM_CFLAGS+=-DDM_USE_JSS -I$(MINIJSS) |
0 | 163 |
164 ifeq ($(JSS_LIGHT),yes) | |
165 DM_CFLAGS+=-DJSS_LIGHT -Os | |
166 else | |
167 ifeq ($(JSS_USE_ASSERTS),yes) | |
168 DM_CFLAGS+=-DJSS_USE_ASSERTS | |
169 endif | |
170 ifeq ($(JSS_DEBUG),yes) | |
171 DM_CFLAGS+=-DJSS_DEBUG | |
172 endif | |
173 endif | |
174 | |
49
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
175 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
|
176 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
|
177 endif |
033c660c25f5
Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents:
34
diff
changeset
|
178 |
0 | 179 ifeq ($(JSS_SUP_THREADS),yes) |
180 DM_CFLAGS+=-DJSS_SUP_THREADS | |
181 endif | |
182 | |
183 | |
184 SUP_MODLOAD=no | |
185 ifeq ($(JSS_SUP_XM),yes) | |
186 SUP_MODLOAD=yes | |
187 DMLIB_OBJS+= jloadxm.o | |
188 DM_CFLAGS+=-DJSS_SUP_XM | |
189 endif | |
190 | |
191 ifeq ($(JSS_SUP_JSSMOD),yes) | |
192 SUP_MODLOAD=yes | |
193 DMLIB_OBJS+= jloadjss.o | |
194 DM_CFLAGS+=-DJSS_SUP_JSSMOD $(JSSMOD_FLAGS) | |
195 endif | |
196 | |
197 ifeq ($(DM_USE_C),yes) | |
844
5ea0bf4379b1
Oops, -DDM_USE_C was not in the build process ...
Matti Hamalainen <ccr@tnsp.org>
parents:
842
diff
changeset
|
198 DM_CFLAGS+=-DDM_USE_C |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
199 TARGETS += $(MINIJSS)jmix_c.c |
0 | 200 DMLIB_OBJS+=jmix_c.o |
201 endif | |
202 | |
203 #ifeq ($(DM_USE_SIMD),yes) | |
204 #DMLIB_OBJS+=jmix_simd.o | |
205 #endif | |
206 | |
572 | 207 ifeq ($(DM_BUILD_TOOLS),yes) |
208 ifeq ($(DM_USE_STDIO),yes) | |
209 ifeq ($(JSS_SUP_JSSMOD),yes) | |
210 ifeq ($(JSS_SUP_XM),yes) | |
211 TOOL_BINARIES+= xm2jss | |
212 endif | |
213 endif | |
214 endif | |
215 endif | |
216 DMLIB_OBJS += jss.o jssmix.o jssmod.o jssplr.o | |
217 endif | |
218 | |
0 | 219 |
220 ### Dependancies | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
221 ifeq ($(DM_BUILD_TOOLS),yes) |
435 | 222 DMLIB_OBJS += libgfx.o lib64gfx.o |
124
d5cfd29c87c4
Rename some conditional compilation directives.
Matti Hamalainen <ccr@tnsp.org>
parents:
105
diff
changeset
|
223 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
|
224 TOOL_BINARIES+= objlink data2inc gfxconv gentab |
0 | 225 ifeq ($(SUP_MODLOAD),yes) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
226 TOOL_BINARIES+= viewmod mod2wav |
667 | 227 TESTS_BINARIES+= plrtest |
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
|
228 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
|
229 TOOL_BINARIES+= view64 |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
230 ifeq ($(DM_GFX_BM_TEXT),yes) |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
231 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
|
232 TOOL_BINARIES+= ppl |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
233 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
234 endif |
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
235 endif |
0 | 236 endif |
237 | |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
238 endif |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
239 endif |
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
240 |
0 | 241 |
166
112eb95f2fba
Improve build system granularity.
Matti Hamalainen <ccr@tnsp.org>
parents:
164
diff
changeset
|
242 |
421 | 243 ifeq ($(DM_USE_LIBPNG),yes) |
424 | 244 DM_CFLAGS += -DDM_USE_LIBPNG $(LIBPNG_CFLAGS) $(ZLIB_CFLAGS) |
421 | 245 endif |
246 | |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
247 ifeq ($(DM_BUILD_TESTS),yes) |
668 | 248 TESTS_BINARIES += vecmattest fptest evaltest |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
249 endif |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
250 |
716
24096d1ef794
Make pre-built header versions of assets not depend on fontconv and
Matti Hamalainen <ccr@tnsp.org>
parents:
714
diff
changeset
|
251 FONTCONV_BIN=fontconv |
24096d1ef794
Make pre-built header versions of assets not depend on fontconv and
Matti Hamalainen <ccr@tnsp.org>
parents:
714
diff
changeset
|
252 DATA2INC_BIN=data2inc |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
253 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
254 |
0 | 255 ### |
256 ### Rest of the rules | |
257 ### | |
334 | 258 CFLAGS += -g -W -Wall -DHAVE_STRING_H $(EXTRA_CFLAGS) |
0 | 259 CXXFLAGS=$(CFLAGS) |
260 | |
261 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
|
262 DM_LDFLAGS += $(LDFLAGS) |
0 | 263 |
264 | |
265 DMLIB_A=$(OBJPATH)dmlib.a | |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
266 DMLIB_OBJS += \ |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
267 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
|
268 dmargs.o dmvecmat.o dmperlin.o dmimage.o \ |
749 | 269 dmwav.o dmengine.o dmq3d.o dmfft.o |
0 | 270 |
271 | |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
272 TESTS_TARGETS = $(addprefix $(TESTS_BINPATH),$(addsuffix $(EXEEXT),$(TESTS_BINARIES))) |
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
273 TOOL_TARGETS = $(addprefix $(TOOL_BINPATH),$(addsuffix $(EXEEXT),$(TOOL_BINARIES))) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
274 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
|
275 $(TOOL_TARGETS) $(TESTS_TARGETS) |
0 | 276 |
841 | 277 NONBUILD+=$(OBJPATH) $(BINPATH) |
278 | |
279 | |
280 all: $(NONBUILD) $(TARGETS) | |
281 | |
0 | 282 |
283 ### | |
284 ### Generic rules | |
285 ### | |
841 | 286 $(OBJPATH): |
287 $(MKDIR_P) $@ | |
288 | |
289 $(BINPATH): | |
290 $(MKDIR_P) $@ | |
291 | |
292 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
293 $(OBJPATH)%.d: $(DMLIBSRC)%.c |
322
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
294 @echo > $@ |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
295 @grep '#\s*include\s*\"' $< | sed 's/#\s*include\s\s*"\(.*\)"/\1/' | \ |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
296 while read i; do if test -e "$$i"; then echo "$$i" >> $@; fi; done |
322
148e981739f4
Add the (unfinished) timeline code to the build.
Matti Hamalainen <ccr@tnsp.org>
parents:
308
diff
changeset
|
297 |
0 | 298 |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
299 $(OBJPATH)%.o: $(MINIJSS)%.c $(MINIJSS)%.h |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
300 @echo " CC $<" |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
301 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
302 |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
303 $(OBJPATH)%.o: $(MINIJSS)%.c |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
304 @echo " CC $<" |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
305 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
306 |
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
307 |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
308 $(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
|
309 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
310 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
311 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
312 $(OBJPATH)%.o: $(DMLIB)tests/%.c |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
313 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
314 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
315 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
316 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
317 $(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
|
318 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
319 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
320 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
321 $(OBJPATH)%.o: $(DMLIB)tools/%.c |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
322 @echo " CC $<" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
323 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
324 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
325 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
326 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
327 $(OBJPATH)%.o: $(DMLIBSRC)%.c $(DMLIBSRC)%.h |
0 | 328 @echo " CC $<" |
329 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
330 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
331 $(OBJPATH)%.o: $(DMLIBSRC)%.c |
0 | 332 @echo " CC $<" |
333 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
334 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
335 |
3 | 336 $(OBJPATH)%.o: %.c %.h |
337 @echo " CC $<" | |
338 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
339 | |
340 $(OBJPATH)%.o: %.c | |
341 @echo " CC $<" | |
342 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
343 | |
0 | 344 |
345 ### | |
346 ### dmlib rules | |
347 ### | |
348 | |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
349 $(MINIJSS)jmix_c.c: $(MINIJSS)jmix_c_in.c $(MINIJSS)jmixtmpl_c.h $(MINIJSS)jmix_post_c.h |
51
36e2f910219c
A non-working implementation of floating point audio mixing.
Matti Hamalainen <ccr@tnsp.org>
parents:
49
diff
changeset
|
350 (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
|
351 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
352 $(OBJPATH)dmimage.o: $(DMLIBSRC)dmimage.c $(DMLIBSRC)stb_image.c $(DMLIBSRC)dmimage.h |
0 | 353 @echo " CC $+" |
354 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
355 | |
597
8a9361179a1a
More work on the video setup screen.
Matti Hamalainen <ccr@tnsp.org>
parents:
587
diff
changeset
|
356 |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
357 $(OBJPATH)jssmod.o: $(MINIJSS)jssmod.c $(MINIJSS)jssmod.h $(MINIJSS)jss.h |
192 | 358 @echo " CC $+" |
359 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
360 | |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
361 $(OBJPATH)jssplr.o: $(MINIJSS)jssplr.c $(MINIJSS)jssplr.h $(MINIJSS)jss.h $(MINIJSS)jssmod.h $(MINIJSS)jssmix.h |
192 | 362 @echo " CC $+" |
363 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
364 | |
658
c430112449a7
Move miniJSS into a subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
655
diff
changeset
|
365 $(OBJPATH)jssmix.o: $(MINIJSS)jssmix.c $(MINIJSS)jssmix.h $(MINIJSS)jss.h |
192 | 366 @echo " CC $+" |
367 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
368 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
369 $(OBJPATH)dmblit.o: $(DMLIBSRC)dmblit.c $(DMLIBSRC)dmscaledblit.h $(DMLIBSRC)dmunscaledblit.h $(DMLIBSRC)dmblitfunc.h $(DMLIBSRC)dmlib.h |
0 | 370 @echo " CC $+" |
371 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
372 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
373 $(OBJPATH)dmline.o: $(DMLIBSRC)dmline.c $(DMLIBSRC)dmdrawline.h $(DMLIBSRC)dmlinefunc.h $(DMLIBSRC)dmlineclip.h $(DMLIBSRC)dmlib.h |
0 | 374 @echo " CC $+" |
375 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
376 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
377 $(OBJPATH)dmargs.o: $(DMLIBSRC)dmargs.c $(DMLIBSRC)dmargs.h $(DMLIBSRC)dmargs_int.c $(DMLIBSRC)dmlib.h |
0 | 378 @echo " CC $+" |
379 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) | |
380 | |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
381 $(OBJPATH)libgfx.o: $(DMLIBSRC)libgfx.c $(DMLIBSRC)libgfx.h |
435 | 382 @echo " CC $+" |
383 @$(CC) $(CFLAGS) -c -o $@ $< $(DM_CFLAGS) $(LIBPNG_CFLAGS) | |
384 | |
0 | 385 |
716
24096d1ef794
Make pre-built header versions of assets not depend on fontconv and
Matti Hamalainen <ccr@tnsp.org>
parents:
714
diff
changeset
|
386 $(DMLIB)assets/SetupFont.dmf: $(DMLIB)assets/SetupFont.fnt |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
387 $(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
|
388 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
389 $(DMLIBSRC)setupfont.h: $(DMLIB)assets/SetupFont.dmf |
660
fc5e3e6d9097
Make converted asset headers have no comment.
Matti Hamalainen <ccr@tnsp.org>
parents:
659
diff
changeset
|
390 $(DATA2INC_BIN) -q -C -n engineSetupFont -t Uint8 $< $@ |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
391 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
392 $(DMLIBSRC)setupimage.h: $(DMLIB)assets/SetupImage.png |
660
fc5e3e6d9097
Make converted asset headers have no comment.
Matti Hamalainen <ccr@tnsp.org>
parents:
659
diff
changeset
|
393 $(DATA2INC_BIN) -q -C -n engineSetupImage -t Uint8 $< $@ |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
394 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
395 $(DMLIBSRC)setupmenubar.h: $(DMLIB)assets/SetupMenuBar.png |
660
fc5e3e6d9097
Make converted asset headers have no comment.
Matti Hamalainen <ccr@tnsp.org>
parents:
659
diff
changeset
|
396 $(DATA2INC_BIN) -q -C -n engineSetupMenuBar -t Uint8 $< $@ |
606
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
397 |
659
bfad79dc1740
Fix build process depencies for asset conversions.
Matti Hamalainen <ccr@tnsp.org>
parents:
658
diff
changeset
|
398 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
399 $(OBJPATH)dmsimple.o: $(DMLIBSRC)dmsimple.c $(DMLIBSRC)dmengine.h \ |
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
400 $(DMLIBSRC)setupmenubar.h $(DMLIBSRC)setupfont.h \ |
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
401 $(DMLIBSRC)setupimage.h $(DMLIBSRC)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
|
402 @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
|
403 @$(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
|
404 |
a0082ce261c8
Add setup menu bar image conversion to build process, move some things around.
Matti Hamalainen <ccr@tnsp.org>
parents:
598
diff
changeset
|
405 |
2
9a8355b47e1c
Various improvements in the build system to add granularity
Matti Hamalainen <ccr@tnsp.org>
parents:
1
diff
changeset
|
406 $(DMLIB_A): $(addprefix $(OBJPATH),$(DMLIB_OBJS)) $(DMLIB)Makefile.gen config.mak |
0 | 407 @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
|
408 @$(AR) cru $@ $(addprefix $(OBJPATH),$(DMLIB_OBJS)) |
0 | 409 @$(RANLIB) $@ |
410 | |
28
920fb22cffcf
Fix build process for jmix_c.c dependancy.
Matti Hamalainen <ccr@tnsp.org>
parents:
7
diff
changeset
|
411 |
0 | 412 |
413 ### | |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
414 ### Tests |
0 | 415 ### |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
416 $(TESTS_BINPATH)blittest$(EXEEXT): $(OBJPATH)blittest.o $(DMLIB_A) |
0 | 417 @echo " LINK $+" |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
812
diff
changeset
|
418 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) $(SDL_TTF_LDFLAGS) |
0 | 419 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
420 $(TESTS_BINPATH)efu$(EXEEXT): $(OBJPATH)efu.o $(DMLIB_A) |
0 | 421 @echo " LINK $+" |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
812
diff
changeset
|
422 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) $(SDL_TTF_LDFLAGS) |
0 | 423 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
424 $(TESTS_BINPATH)vptest$(EXEEXT): $(OBJPATH)vptest.o $(DMLIB_A) |
0 | 425 @echo " LINK $+" |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
812
diff
changeset
|
426 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) $(SDL_TTF_LDFLAGS) |
0 | 427 |
724
12ddeef948fc
Move dm_print_optree() to dmevalw.c
Matti Hamalainen <ccr@tnsp.org>
parents:
716
diff
changeset
|
428 $(TESTS_BINPATH)evaltest$(EXEEXT): $(OBJPATH)evaltest.o $(OBJPATH)dmeval.o $(OBJPATH)dmevalw.o $(DMLIB_A) |
668 | 429 @echo " LINK $+" |
430 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm | |
431 | |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
432 $(TESTS_BINPATH)%test$(EXEEXT): $(OBJPATH)%test.o $(DMLIB_A) |
0 | 433 @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
|
434 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
0 | 435 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
436 $(TESTS_BINPATH)plrtest$(EXEEXT): $(OBJPATH)plrtest.o $(DMLIB_A) |
653
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
437 @echo " LINK $+" |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
438 @$(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
|
439 |
469119cab5b2
More cleanup work. Build is broken for now.
Matti Hamalainen <ccr@tnsp.org>
parents:
624
diff
changeset
|
440 |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
441 ### |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
442 ### Tools |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
443 ### |
716
24096d1ef794
Make pre-built header versions of assets not depend on fontconv and
Matti Hamalainen <ccr@tnsp.org>
parents:
714
diff
changeset
|
444 $(TOOL_BINPATH)fontconv$(EXEEXT): $(OBJPATH)fontconv.o $(DMLIB_A) |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
445 @echo " LINK $+" |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
812
diff
changeset
|
446 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) $(SDL_TTF_LDFLAGS) |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
447 |
716
24096d1ef794
Make pre-built header versions of assets not depend on fontconv and
Matti Hamalainen <ccr@tnsp.org>
parents:
714
diff
changeset
|
448 $(TOOL_BINPATH)data2inc$(EXEEXT): $(OBJPATH)data2inc.o $(DMLIB_A) |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
449 @echo " LINK $+" |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
450 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
451 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
452 $(TOOL_BINPATH)packed$(EXEEXT): $(OBJPATH)packed.o $(DMLIB_A) |
0 | 453 @echo " LINK $+" |
163 | 454 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 455 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
456 $(TOOL_BINPATH)mod2wav$(EXEEXT): $(OBJPATH)mod2wav.o $(DMLIB_A) |
0 | 457 @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
|
458 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) -lm |
0 | 459 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
460 $(TOOL_BINPATH)xm2jss$(EXEEXT): $(OBJPATH)xm2jss.o $(DMLIB_A) |
0 | 461 @echo " LINK $+" |
163 | 462 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 463 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
464 $(TOOL_BINPATH)viewmod$(EXEEXT): $(OBJPATH)viewmod.o $(DMLIB_A) |
0 | 465 @echo " LINK $+" |
163 | 466 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) |
0 | 467 |
812
1e5cf1144f36
Move library source under src/ subdirectory.
Matti Hamalainen <ccr@tnsp.org>
parents:
749
diff
changeset
|
468 $(TOOL_BINPATH)ppl$(EXEEXT): $(DMLIBSRC)setupfont.h $(OBJPATH)ppl.o $(DMLIB_A) |
0 | 469 @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
|
470 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
0 | 471 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
472 $(TOOL_BINPATH)objlink$(EXEEXT): $(OBJPATH)objlink.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
|
473 @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
|
474 @$(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
|
475 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
476 $(TOOL_BINPATH)gfxconv$(EXEEXT): $(OBJPATH)gfxconv.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
|
477 @echo " LINK $+" |
424 | 478 @$(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
|
479 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
480 $(TOOL_BINPATH)view64$(EXEEXT): $(OBJPATH)view64.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
|
481 @echo " LINK $+" |
562
6a830bcd7eb9
Add zlib LDFLAGS to view64 linking phase.
Matti Hamalainen <ccr@tnsp.org>
parents:
557
diff
changeset
|
482 @$(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
|
483 |
714
0ad76fa080ca
Improve build system by adding support for separate binary paths for
Matti Hamalainen <ccr@tnsp.org>
parents:
690
diff
changeset
|
484 $(TOOL_BINPATH)gentab$(EXEEXT): $(OBJPATH)gentab.o $(DMLIB_A) |
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
|
485 @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
|
486 @$(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
|
487 |
724
12ddeef948fc
Move dm_print_optree() to dmevalw.c
Matti Hamalainen <ccr@tnsp.org>
parents:
716
diff
changeset
|
488 $(TOOL_BINPATH)auval$(EXEEXT): $(OBJPATH)auval.o $(OBJPATH)dmeval.o $(OBJPATH)dmevalw.o $(DMLIB_A) |
690
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
489 @echo " LINK $+" |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
812
diff
changeset
|
490 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) $(SDL_TTF_LDFLAGS) |
690
84811c6dd32d
Added Auval with removed Lua dependancy, using dmeval only.
Matti Hamalainen <ccr@tnsp.org>
parents:
668
diff
changeset
|
491 |
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
|
492 |
344 | 493 ### |
665
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
494 ### Demo binary |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
495 ### |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
496 $(BINPATH)$(DEMO_BIN)$(EXEEXT): $(addprefix $(OBJPATH),$(DEMO_OBJS)) $(DMLIB_A) |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
497 @echo " LINK $+" |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
498 @$(CC) -o $@ $(filter %.o %.a,$+) $(DM_LDFLAGS) $(SDL_LDFLAGS) |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
499 |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
500 |
f9a3b0e8f0fc
Clean up build system a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
660
diff
changeset
|
501 ### |
344 | 502 ### Editor targets |
503 ### | |
380
ccb6e5108953
Add EDITOR_HEADERS to the dependency.
Matti Hamalainen <ccr@tnsp.org>
parents:
379
diff
changeset
|
504 $(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
|
505 @echo " CREATE $@" |
377 | 506 @echo "OBJECTS_DIR = $(OBJPATH)" > $@ |
507 @echo "MOC_DIR = $(OBJPATH)" >> $@ | |
508 @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
|
509 @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
|
510 @echo "QMAKE_LIBS += $(DM_LDFLAGS) $(SDL_LDFLAGS)" >> $@ |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
511 @echo "MAKEFILE = $(EDITOR_MAKEFILE)" >> $@ |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
512 @echo "CONFIG += debug" >> $@ |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
513 @echo "QT += core gui opengl" >> $@ |
377 | 514 @echo "TARGET = $(BINPATH)ed_$(DEMO_BIN)$(EXEEXT)" >> $@ |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
515 @echo "TEMPLATE = app" >> $@ |
370
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
516 @echo "SOURCES = $(addprefix $(DMLIB),$(EDITOR_SOURCES))" >> $@ |
7e640b1f990b
Fix build process for out of tree builds.
Matti Hamalainen <ccr@tnsp.org>
parents:
357
diff
changeset
|
517 @echo "HEADERS = $(addprefix $(DMLIB),$(EDITOR_HEADERS))" >> $@ |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
518 |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
519 |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
520 $(EDITOR_MAKEFILE): $(EDITOR_PRO) |
355
dbc62ba3f132
Work towards Qt-based editor instead.
Matti Hamalainen <ccr@tnsp.org>
parents:
353
diff
changeset
|
521 @echo " QMAKE $+" |
357
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
522 @qmake -Wall $< |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
523 |
1b8362a26692
Work towards Qt based editor.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
524 $(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
|
525 @$(MAKE) -f $< |
344 | 526 |
0 | 527 |
528 ### | |
529 ### Special targets | |
530 ### | |
531 clean: | |
563
1483cd1cf0e6
Fix build by moving moc_* from TARGETS to TMPFILES.
Matti Hamalainen <ccr@tnsp.org>
parents:
562
diff
changeset
|
532 $(RM) $(TARGETS) $(TMPFILES) $(OBJPATH)*.o |
0 | 533 |