Debian Codegraph @

win32/xmingw32/Makefile

raw symbols SCIP
1 # NOTE: This Makefile requires GNU make
2 # Location to put the targets.
3 TARGETBINDIR = .
4 TARGETLIBDIR = .
5 # DLL version information. Currently this must be updated manually.
6 # Fields are: major, minor, build number, QFE version
7 VERSION_FIELD = 1,0,0,0
8 VERSION_STRING = \\\"1.0\\\"
9 # Name of the targets
10 # Hooray for Windows DLL hell.
11 LIBTHEORAENC_TARGET = libtheoraenc.dll
12 LIBTHEORAENCD_TARGET = libtheoraencd.dll
13 LIBTHEORAENC70_TARGET = libtheoraenc70.dll
14 LIBTHEORAENC70D_TARGET = libtheoraenc70d.dll
15 LIBTHEORAENC71_TARGET = libtheoraenc71.dll
16 LIBTHEORAENC71D_TARGET = libtheoraenc71d.dll
17 LIBTHEORAENC80_TARGET = libtheoraenc80.dll
18 LIBTHEORAENC80D_TARGET = libtheoraenc80d.dll
19
20 LIBTHEORADEC_TARGET = libtheoradec.dll
21 LIBTHEORADECD_TARGET = libtheoradecd.dll
22 LIBTHEORADEC70_TARGET = libtheoradec70.dll
23 LIBTHEORADEC70D_TARGET = libtheoradec70d.dll
24 LIBTHEORADEC71_TARGET = libtheoradec71.dll
25 LIBTHEORADEC71D_TARGET = libtheoradec71d.dll
26 LIBTHEORADEC80_TARGET = libtheoradec80.dll
27 LIBTHEORADEC80D_TARGET = libtheoradec80d.dll
28
29 DUMP_VIDEO_TARGET = dump_video.exe
30 PLAYER_EXAMPLE_TARGET = player_example.exe
31 ENCODER_EXAMPLE_TARGET = encoder_example.exe
32
33 # The compiler tools to use
34 # The is no standard mingw prefix, so try to guess
35 MINGW_PREFIX := $(or $(strip $(foreach exeprefix, \
36 i686-mingw32 i686-pc-mingw32 i586-mingw32msvc i386-mingw32 \
37 no-mingw32, \
38 $(if $(shell which $(exeprefix)-gcc 2>/dev/null), $(exeprefix) ))))
39 CC = $(MINGW_PREFIX)-gcc
40 RC = $(MINGW_PREFIX)-windres
41 DLLTOOL = $(MINGW_PREFIX)-dlltool
42 LD = $(MINGW_PREFIX)-ld
43 SDLCONFIG = $(MINGW_PREFIX)-sdl-config
44 # The command to use to generate dependency information
45 MAKEDEPEND = ${CC} -MM
46 #MAKEDEPEND = makedepend -f- -Y --
47
48 # The location of include files.
49 # Modify these to point to your Ogg and Vorbis include directories if they are
50 # not installed in a standard location.
51 CINCLUDE = -D_REENTRANT
52 # Extra compilation flags.
53 # You may get speed increases by including flags such as -O2 or -O3 or
54 # -ffast-math, or additional flags, depending on your system and compiler.
55 # The correct -march=<architecture> flag will also generate much better code
56 # on newer architectures.
57 CFLAGS = -Wall -Wno-parentheses -DOC_X86_ASM
58 RELEASE_CFLAGS = ${CFLAGS} -mtune=native -O3 -fomit-frame-pointer -fforce-addr \
59 -finline-functions
60 # The -g flag will generally include debugging information.
61 DEBUG_CFLAGS = ${CFLAGS} -g
62 # Libraries to link with, and the location of library files.
63 LIBS = -logg -lvorbis -lvorbisenc
64
65 # ANYTHING BELOW THIS LINE PROBABLY DOES NOT NEED EDITING
66 CINCLUDE := -I../../include ${CINCLUDE}
67 LIBSRCDIR = ../../lib
68 BINSRCDIR = ../../examples
69 WORKDIR = objs
70
71 # C source file lists
72
73 LIBTHEORADEC_CSOURCES = \
74 apiwrapper.c \
75 bitpack.c \
76 decapiwrapper.c \
77 decinfo.c \
78 decode.c \
79 dequant.c \
80 fragment.c \
81 huffdec.c \
82 idct.c \
83 info.c \
84 internal.c \
85 quant.c \
86 state.c \
87 $(if $(findstring -DOC_X86_ASM,${CFLAGS}), \
88 x86/mmxidct.c \
89 x86/mmxfrag.c \
90 x86/mmxstate.c \
91 x86/x86state.c \
92 )
93
94 LIBTHEORAENC_CSOURCES = \
95 apiwrapper.c \
96 fragment.c \
97 idct.c \
98 internal.c \
99 state.c \
100 quant.c \
101 analyze.c \
102 fdct.c \
103 encfrag.c \
104 encapiwrapper.c \
105 encinfo.c \
106 encode.c \
107 enquant.c \
108 huffenc.c \
109 mathops.c \
110 mcenc.c \
111 rate.c \
112 tokenize.c \
113 $(if $(findstring -DOC_X86_ASM,${CFLAGS}), \
114 x86/mmxfrag.c \
115 x86/mmxidct.c \
116 x86/mmxstate.c \
117 x86/x86state.c \
118 x86/mmxencfrag.c \
119 x86/mmxfdct.c \
120 x86/x86enc.c \
121 )
122
123
124 DUMP_VIDEO_CSOURCES = dump_video.c
125 ENCODER_EXAMPLE_CSOURCES = encoder_example.c
126 PLAYER_EXAMPLE_CSOURCES = player_example.c
127
128 # Create object file list.
129 LIBTHEORADEC_OBJS:= ${LIBTHEORADEC_CSOURCES:%.c=${WORKDIR}/%.o}
130 LIBTHEORADECD_OBJS:= ${LIBTHEORADEC_CSOURCES:%.c=${WORKDIR}/%.do}
131 LIBTHEORAENC_OBJS:= ${LIBTHEORAENC_CSOURCES:%.c=${WORKDIR}/%.o}
132 LIBTHEORAENCD_OBJS:= ${LIBTHEORAENC_CSOURCES:%.c=${WORKDIR}/%.do}
133 DUMP_VIDEO_OBJS:= ${DUMP_VIDEO_CSOURCES:%.c=${WORKDIR}/%.o}
134 ENCODER_EXAMPLE_OBJS:= ${ENCODER_EXAMPLE_CSOURCES:%.c=${WORKDIR}/%.o}
135 PLAYER_EXAMPLE_OBJS:= ${PLAYER_EXAMPLE_CSOURCES:%.c=${WORKDIR}/%.o}
136 RC_OBJS:= ${LIBTHEORADEC_TARGET} ${LIBTHEORAENC_TARGET} \
137 ${LIBTHEORADECD_TARGET} ${LIBTHEORAENCD_TARGET} \
138 ${LIBTHEORADEC70_TARGET} ${LIBTHEORAENC70_TARGET} \
139 ${LIBTHEORADEC70D_TARGET} ${LIBTHEORAENC70D_TARGET} \
140 ${LIBTHEORADEC71_TARGET} ${LIBTHEORAENC71_TARGET} \
141 ${LIBTHEORADEC71D_TARGET} ${LIBTHEORAENC71D_TARGET} \
142 ${LIBTHEORADEC80_TARGET} ${LIBTHEORAENC80_TARGET} \
143 ${LIBTHEORADEC80D_TARGET} ${LIBTHEORAENC80D_TARGET}
144 RC_OBJS:= ${RC_OBJS:%.dll=${WORKDIR}/%.rco}
145 ALL_OBJS:= ${LIBTHEORADEC_OBJS} ${LIBTHEORAENC_OBJS} \
146 ${LIBTHEORADECD_OBJS} ${LIBTHEORAENCD_OBJS} ${RC_OBJS} \
147 ${DUMP_VIDEO_OBJS} ${ENCODER_EXAMPLE_OBJS} #${PLAYER_EXAMPLE_OBJS}
148 # Create the dependency file list
149 ALL_DEPS:= ${ALL_OBJS:%.o=%.d}
150 ALL_DEPS:= ${ALL_DEPS:%.do=%.dd}
151 ALL_DEPS:= ${ALL_DEPS:%.rco=%.d}
152 # Prepend source path to file names.
153 LIBTHEORADEC_CSOURCES:= ${LIBTHEORADEC_CSOURCES:%=${LIBSRCDIR}/%}
154 LIBTHEORAENC_CSOURCES:= ${LIBTHEORAENC_CSOURCES:%=${LIBSRCDIR}/%}
155 DUMP_VIDEO_CSOURCES:= ${DUMP_VIDEO_CSOURCES:%=${BINSRCDIR}/%}
156 ENCODER_EXAMPLE_CSOURCES:= ${ENCODER_EXAMPLE_CSOURCES:%=${BINSRCDIR}/%}
157 PLAYER_EXAMPLE_CSOURCES:= ${PLAYER_EXAMPLE_CSOURCES:%=${BINSRCDIR}/%}
158 ALL_CSOURCES:= ${LIBTHEORADEC_CSOURCES} ${LIBTHEORAENC_CSOURCES} \
159 ${DUMP_VIDEO_CSOURCES} ${PLAYER_EXAMPLE_CSOURCES} \
160 ${ENCODER_EXAMPLE_CSOURCES}
161 LIBTHEORAENC_RCO:= ${WORKDIR}/${LIBTHEORAENC_TARGET:%.dll=%.rco}
162 LIBTHEORAENCD_RCO:= ${WORKDIR}/${LIBTHEORAENCD_TARGET:%.dll=%.rco}
163 LIBTHEORAENC70_RCO:= ${WORKDIR}/${LIBTHEORAENC70_TARGET:%.dll=%.rco}
164 LIBTHEORAENC70D_RCO:= ${WORKDIR}/${LIBTHEORAENC70D_TARGET:%.dll=%.rco}
165 LIBTHEORAENC71_RCO:= ${WORKDIR}/${LIBTHEORAENC71_TARGET:%.dll=%.rco}
166 LIBTHEORAENC71D_RCO:= ${WORKDIR}/${LIBTHEORAENC71D_TARGET:%.dll=%.rco}
167 LIBTHEORAENC80_RCO:= ${WORKDIR}/${LIBTHEORAENC80_TARGET:%.dll=%.rco}
168 LIBTHEORAENC80D_RCO:= ${WORKDIR}/${LIBTHEORAENC80D_TARGET:%.dll=%.rco}
169 LIBTHEORADEC_RCO:= ${WORKDIR}/${LIBTHEORADEC_TARGET:%.dll=%.rco}
170 LIBTHEORADECD_RCO:= ${WORKDIR}/${LIBTHEORADECD_TARGET:%.dll=%.rco}
171 LIBTHEORADEC70_RCO:= ${WORKDIR}/${LIBTHEORADEC70_TARGET:%.dll=%.rco}
172 LIBTHEORADEC70D_RCO:= ${WORKDIR}/${LIBTHEORADEC70D_TARGET:%.dll=%.rco}
173 LIBTHEORADEC71_RCO:= ${WORKDIR}/${LIBTHEORADEC71_TARGET:%.dll=%.rco}
174 LIBTHEORADEC71D_RCO:= ${WORKDIR}/${LIBTHEORADEC71D_TARGET:%.dll=%.rco}
175 LIBTHEORADEC80_RCO:= ${WORKDIR}/${LIBTHEORADEC80_TARGET:%.dll=%.rco}
176 LIBTHEORADEC80D_RCO:= ${WORKDIR}/${LIBTHEORADEC80D_TARGET:%.dll=%.rco}
177 # Prepend target path to file names.
178 LIBTHEORAENC_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC_TARGET}
179 LIBTHEORAENCD_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENCD_TARGET}
180 LIBTHEORAENC70_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC70_TARGET}
181 LIBTHEORAENC70D_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC70D_TARGET}
182 LIBTHEORAENC71_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC71_TARGET}
183 LIBTHEORAENC71D_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC71D_TARGET}
184 LIBTHEORAENC80_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC80_TARGET}
185 LIBTHEORAENC80D_TARGET:= ${TARGETLIBDIR}/${LIBTHEORAENC80D_TARGET}
186 LIBTHEORADEC_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC_TARGET}
187 LIBTHEORADECD_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADECD_TARGET}
188 LIBTHEORADEC70_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC70_TARGET}
189 LIBTHEORADEC70D_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC70D_TARGET}
190 LIBTHEORADEC71_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC71_TARGET}
191 LIBTHEORADEC71D_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC71D_TARGET}
192 LIBTHEORADEC80_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC80_TARGET}
193 LIBTHEORADEC80D_TARGET:= ${TARGETLIBDIR}/${LIBTHEORADEC80D_TARGET}
194 DUMP_VIDEO_TARGET:= ${TARGETBINDIR}/${DUMP_VIDEO_TARGET}
195 ENCODER_EXAMPLE_TARGET:= ${TARGETBINDIR}/${ENCODER_EXAMPLE_TARGET}
196 PLAYER_EXAMPLE_TARGET:= ${TARGETBINDIR}/${PLAYER_EXAMPLE_TARGET}
197 DLL_TARGETS:= ${LIBTHEORADEC_TARGET} ${LIBTHEORAENC_TARGET} \
198 ${LIBTHEORADECD_TARGET} ${LIBTHEORAENCD_TARGET} \
199 ${LIBTHEORADEC70_TARGET} ${LIBTHEORAENC70_TARGET} \
200 ${LIBTHEORADEC70D_TARGET} ${LIBTHEORAENC70D_TARGET} \
201 ${LIBTHEORADEC71_TARGET} ${LIBTHEORAENC71_TARGET} \
202 ${LIBTHEORADEC71D_TARGET} ${LIBTHEORAENC71D_TARGET} \
203 ${LIBTHEORADEC80_TARGET} ${LIBTHEORAENC80_TARGET} \
204 ${LIBTHEORADEC80D_TARGET} ${LIBTHEORAENC80D_TARGET}
205 ALL_TARGETS:= ${DLL_TARGETS} ${DLL_TARGETS:%.dll=%.dll.a} \
206 ${DUMP_VIDEO_TARGET} ${ENCODER_EXAMPLE_TARGET} #${PLAYER_EXAMPLE_TARGET}
207 IMPLIB_TARGETS:= ${DLL_TARGETS:%.dll=%.def} ${DLL_TARGETS:%.dll=%.lib} \
208 ${DLL_TARGETS:%.dll=%.exp}
209
210 # Targets:
211 # Everything (default)
212 all: ${ALL_TARGETS}
213
214 # These require Microsoft's lib.exe to build, and so are not made by default.
215 implibs: ${IMPLIB_TARGETS}
216
217 # libtheoradec
218 ${LIBTHEORADEC_TARGET}: ${LIBTHEORADEC_OBJS} ${LIBTHEORADEC_RCO} \
219 libtheoradec-all.def
220 mkdir -p ${TARGETLIBDIR}
221 ${CC} -shared -o $@ ${LIBTHEORADEC_OBJS} -logg -lmsvcrt \
222 ${LIBTHEORADEC_RCO} \
223 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
224 ${LIBTHEORADECD_TARGET}: ${LIBTHEORADECD_OBJS} ${LIBTHEORADECD_RCO} \
225 libtheoradec-all.def
226 mkdir -p ${TARGETLIBDIR}
227 ${CC} -shared -o $@ ${LIBTHEORADECD_OBJS} -logg -lmsvcrtd \
228 ${LIBTHEORADECD_RCO} \
229 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
230 ${LIBTHEORADEC70_TARGET}: ${LIBTHEORADEC_OBJS} ${LIBTHEORADEC70_RCO} \
231 libtheoradec-all.def
232 mkdir -p ${TARGETLIBDIR}
233 ${CC} -shared -o $@ ${LIBTHEORADEC_OBJS} -logg -lmsvcr70 \
234 ${LIBTHEORADEC70_RCO} \
235 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
236 ${LIBTHEORADEC70D_TARGET}: ${LIBTHEORADECD_OBJS} ${LIBTHEORADEC70D_RCO} \
237 libtheoradec-all.def
238 mkdir -p ${TARGETLIBDIR}
239 ${CC} -shared -o $@ ${LIBTHEORADECD_OBJS} -logg -lmsvcr70d \
240 ${LIBTHEORADEC70D_RCO} \
241 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
242 ${LIBTHEORADEC71_TARGET}: ${LIBTHEORADEC_OBJS} ${LIBTHEORADEC71_RCO} \
243 libtheoradec-all.def
244 mkdir -p ${TARGETLIBDIR}
245 ${CC} -shared -o $@ ${LIBTHEORADEC_OBJS} -logg -lmsvcr71 \
246 ${LIBTHEORADEC71_RCO} \
247 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
248 ${LIBTHEORADEC71D_TARGET}: ${LIBTHEORADECD_OBJS} ${LIBTHEORADEC71D_RCO} \
249 libtheoradec-all.def
250 mkdir -p ${TARGETLIBDIR}
251 ${CC} -shared -o $@ ${LIBTHEORADECD_OBJS} -logg -lmsvcr71d \
252 ${LIBTHEORADEC71D_RCO} \
253 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
254 ${LIBTHEORADEC80_TARGET}: ${LIBTHEORADEC_OBJS} ${LIBTHEORADEC80_RCO} \
255 libtheoradec-all.def
256 mkdir -p ${TARGETLIBDIR}
257 ${CC} -shared -o $@ ${LIBTHEORADEC_OBJS} -logg -lmsvcr80 \
258 ${LIBTHEORADEC80_RCO} \
259 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
260 ${LIBTHEORADEC80D_TARGET}: ${LIBTHEORADECD_OBJS} ${LIBTHEORADEC80D_RCO} \
261 libtheoradec-all.def
262 mkdir -p ${TARGETLIBDIR}
263 ${CC} -shared -o $@ ${LIBTHEORADECD_OBJS} -logg -lmsvcr80d \
264 ${LIBTHEORADEC80D_RCO} \
265 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoradec-all.def
266
267 # libtheoraenc
268 ${LIBTHEORAENC_TARGET}: ${LIBTHEORAENC_OBJS} ${LIBTHEORAENC_RCO} \
269 libtheoraenc-all.def
270 mkdir -p ${TARGETLIBDIR}
271 ${CC} -shared -o $@ \
272 ${LIBTHEORAENC_OBJS} ${LIBTHEORADEC_TARGET} -logg -lmsvcrt \
273 ${LIBTHEORAENC_RCO} \
274 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
275 ${LIBTHEORAENCD_TARGET}: ${LIBTHEORAENCD_OBJS} ${LIBTHEORAENCD_RCO} \
276 libtheoraenc-all.def
277 mkdir -p ${TARGETLIBDIR}
278 ${CC} -shared -o $@ \
279 ${LIBTHEORAENCD_OBJS} ${LIBTHEORADECD_TARGET} -logg -lmsvcrtd \
280 ${LIBTHEORAENCD_RCO} \
281 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
282 ${LIBTHEORAENC70_TARGET}: ${LIBTHEORAENC_OBJS} ${LIBTHEORAENC70_RCO} \
283 libtheoraenc-all.def
284 mkdir -p ${TARGETLIBDIR}
285 ${CC} -shared -o $@ \
286 ${LIBTHEORAENC_OBJS} ${LIBTHEORADEC70_TARGET} -logg -lmsvcr70 \
287 ${LIBTHEORAENC70_RCO} \
288 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
289 ${LIBTHEORAENC70D_TARGET}: ${LIBTHEORAENCD_OBJS} ${LIBTHEORAENC70D_RCO} \
290 libtheoraenc-all.def
291 mkdir -p ${TARGETLIBDIR}
292 ${CC} -shared -o $@ \
293 ${LIBTHEORAENCD_OBJS} ${LIBTHEORADEC70D_TARGET} -logg -lmsvcr70d \
294 ${LIBTHEORAENC70D_RCO} \
295 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
296 ${LIBTHEORAENC71_TARGET}: ${LIBTHEORAENC_OBJS} ${LIBTHEORAENC71_RCO} \
297 libtheoraenc-all.def
298 mkdir -p ${TARGETLIBDIR}
299 ${CC} -shared -o $@ \
300 ${LIBTHEORAENC_OBJS} ${LIBTHEORADEC71_TARGET} -logg -lmsvcr71 \
301 ${LIBTHEORAENC71_RCO} \
302 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
303 ${LIBTHEORAENC71D_TARGET}: ${LIBTHEORAENCD_OBJS} ${LIBTHEORAENC71D_RCO} \
304 libtheoraenc-all.def
305 mkdir -p ${TARGETLIBDIR}
306 ${CC} -shared -o $@ \
307 ${LIBTHEORAENCD_OBJS} ${LIBTHEORADEC71D_TARGET} -logg -lmsvcr71d \
308 ${LIBTHEORAENC71D_RCO} \
309 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
310 ${LIBTHEORAENC80_TARGET}: ${LIBTHEORAENC_OBJS} ${LIBTHEORAENC80_RCO} \
311 libtheoraenc-all.def
312 mkdir -p ${TARGETLIBDIR}
313 ${CC} -shared -o $@ \
314 ${LIBTHEORAENC_OBJS} ${LIBTHEORADEC80_TARGET} -logg -lmsvcr80 \
315 ${LIBTHEORAENC80_RCO} \
316 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
317 ${LIBTHEORAENC80D_TARGET}: ${LIBTHEORAENCD_OBJS} ${LIBTHEORAENC80D_RCO} \
318 libtheoraenc-all.def
319 mkdir -p ${TARGETLIBDIR}
320 ${CC} -shared -o $@ \
321 ${LIBTHEORAENCD_OBJS} ${LIBTHEORADEC80D_TARGET} -logg -lmsvcr80d \
322 ${LIBTHEORAENC80D_RCO} \
323 -Wl,--output-def,${@:.dll=.def},--out-implib,[email protected],libtheoraenc-all.def
324
325 # dump_video
326 ${DUMP_VIDEO_TARGET}: ${DUMP_VIDEO_OBJS} ${LIBTHEORADEC_TARGET}
327 mkdir -p ${TARGETBINDIR}
328 ${CC} ${CFLAGS} -o $@ ${DUMP_VIDEO_OBJS} ${LIBS} \
329 ${LIBTHEORADEC_TARGET}.a
330
331 # encoder_example
332 ${ENCODER_EXAMPLE_TARGET}: ${ENCODER_EXAMPLE_OBJS} ${LIBTHEORADEC_TARGET} \
333 ${LIBTHEORAENC_TARGET}
334 mkdir -p ${TARGETBINDIR}
335 ${CC} ${CFLAGS} -o $@ ${ENCODER_EXAMPLE_OBJS} ${LIBS} \
336 ${LIBTHEORAENC_TARGET}.a ${LIBTHEORADEC_TARGET}.a
337
338 # player_example
339 ${PLAYER_EXAMPLE_TARGET}: CINCLUDE += $(SDLCONFIG) --cflags
340 ${PLAYER_EXAMPLE_TARGET}: ${PLAYER_EXAMPLE_OBJS} ${LIBTHEORADEC_TARGET}
341 mkdir -p ${TARGETBINDIR}
342 ${CC} ${CFLAGS} -o $@ ${PLAYER_EXAMPLE_OBJS} ${LIBS} \
343 ${LIBTHEORADEC_TARGET}.a `${SDLCONFIG} --libs`
344
345 # Remove all targets.
346 clean:
347 -rm $(sort ${ALL_OBJS} ${ALL_DEPS} ${ALL_TARGETS} ${IMPLIB_TARGETS})
348 -rmdir ${WORKDIR}/x86
349 -rmdir ${WORKDIR}
350
351 # Make everything depend on changes in the Makefile
352 ${ALL_OBJS} ${ALL_DEPS} ${ALL_TARGETS} : Makefile
353
354 # Specify which targets are phony for GNU make
355 .PHONY : all clean
356
357 # Rules
358 # Windows-specific rules
359 %.dll.a : %.dll
360 %.def : %.dll
361 %.exp : %.lib
362 %.lib : %.def
363 wine lib /machine:i386 /def:$<
364 ${WORKDIR}/%.d : %.rc
365 mkdir -p ${dir $@}
366 ${MAKEDEPEND} -x c-header ${CINCLUDE} $< -MT ${@:%.d=%.rco} > $@
367 ${WORKDIR}/%.rco : %.rc
368 mkdir -p ${dir $@}
369 ${RC} ${CINCLUDE} -DTH_VERSION_FIELD=${VERSION_FIELD} \
370 -DTH_VERSION_STRING=${VERSION_STRING} $< $@
371 # Normal compilation
372 ${WORKDIR}/%.d : ${LIBSRCDIR}/%.c
373 mkdir -p ${dir $@}
374 ${MAKEDEPEND} ${CINCLUDE} ${RELEASE_CFLAGS} $< -MT ${@:%.d=%.o} > $@
375 ${WORKDIR}/%.d : ${BINSRCDIR}/%.c
376 mkdir -p ${dir $@}
377 ${MAKEDEPEND} ${CINCLUDE} ${RELEASE_CFLAGS} $< -MT ${@:%.d=%.o} > $@
378 ${WORKDIR}/%.o : ${LIBSRCDIR}/%.c
379 mkdir -p ${dir $@}
380 ${CC} ${CINCLUDE} ${RELEASE_CFLAGS} -c -o $@ $<
381 ${WORKDIR}/%.o : ${BINSRCDIR}/%.c
382 mkdir -p ${dir $@}
383 ${CC} ${CINCLUDE} ${RELEASE_CFLAGS} -c -o $@ $<
384 # Debug versions
385 ${WORKDIR}/%.dd : ${LIBSRCDIR}/%.c
386 mkdir -p ${dir $@}
387 ${MAKEDEPEND} ${CINCLUDE} ${DEBUG_CFLAGS} $< -MT ${@:%.d=%.do} > $@
388 ${WORKDIR}/%.do : ${LIBSRCDIR}/%.c
389 mkdir -p ${dir $@}
390 ${CC} ${CINCLUDE} ${DEBUG_CFLAGS} -c -o $@ $<
391
392 # Include header file dependencies
393 -include ${ALL_DEPS}