comparison Makefile @ 45:f7a792fdf7a4

Added MOD support, and make a per include/lib paths definable.
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 22 Sep 2001 14:40:15 +0000
parents 36f27ef8bebe
children d7e118d8fede
comparison
equal deleted inserted replaced
44:78470d7d94de 45:f7a792fdf7a4
78 78
79 #-----------------------------------------------------------------------------# 79 #-----------------------------------------------------------------------------#
80 # Set the decoder types you'd like to support. 80 # Set the decoder types you'd like to support.
81 # Note that various decoders may need external libraries. 81 # Note that various decoders may need external libraries.
82 #-----------------------------------------------------------------------------# 82 #-----------------------------------------------------------------------------#
83 use_decoder_raw := true 83 use_decoder_raw := true
84 use_decoder_mp3 := false 84 use_decoder_mp3 := false
85 use_decoder_voc := true 85 use_decoder_mod := true
86 use_decoder_wav := true 86 use_decoder_voc := true
87 use_decoder_wav := true
87 use_decoder_aiff := true 88 use_decoder_aiff := true
88 use_decoder_ogg := true 89 use_decoder_ogg := true
90
91
92 #-----------------------------------------------------------------------------#
93 # If use_decoder_mod is set to true, and libmikmod is in a nonstandard place,
94 # note that here. It's usually safe to leave these commented if you installed
95 # MikMod from a package like an RPM, or from source with the defaults.
96 #-----------------------------------------------------------------------------#
97 #INCPATH_MOD := -I/usr/local/include
98 #LIBPATH_MOD := -L/usr/local/lib
99
100
101 #-----------------------------------------------------------------------------#
102 # If use_decoder_ogg is set to true, and libvorbis and libvorbisfile are
103 # in a nonstandard place, set them here. It's usually safe to leave these
104 # commented if you installed Ogg Vorbis from a package like an RPM, or from
105 # source with the defaults.
106 #-----------------------------------------------------------------------------#
107 #INCPATH_OGG := -I/usr/local/include
108 #LIBPATH_OGG := -L/usr/local/lib
109
89 110
90 #-----------------------------------------------------------------------------# 111 #-----------------------------------------------------------------------------#
91 # Set to "true" if you'd like to build a DLL. Set to "false" otherwise. 112 # Set to "true" if you'd like to build a DLL. Set to "false" otherwise.
92 #-----------------------------------------------------------------------------# 113 #-----------------------------------------------------------------------------#
93 #build_dll := false 114 #build_dll := false
199 BINDIR := bin 220 BINDIR := bin
200 SRCDIR := . 221 SRCDIR := .
201 222
202 CFLAGS := -I$(SRCDIR) $(CFLAGS) 223 CFLAGS := -I$(SRCDIR) $(CFLAGS)
203 CFLAGS += $(use_asm) -D_REENTRANT -fsigned-char -DPLATFORM_UNIX 224 CFLAGS += $(use_asm) -D_REENTRANT -fsigned-char -DPLATFORM_UNIX
204 CFLAGS += -Wall -Werror -fno-exceptions -fno-rtti -ansi -pedantic 225 CFLAGS += -Wall -fno-exceptions -fno-rtti -ansi -pedantic
205 226
206 LDFLAGS += -lm 227 LDFLAGS += -lm
207 228
208 ifeq ($(strip $(debugging)),true) 229 ifeq ($(strip $(debugging)),true)
209 CFLAGS += -DDEBUG -g -fno-omit-frame-pointer 230 CFLAGS += -DDEBUG -g -fno-omit-frame-pointer
247 need_extra_rwops := true 268 need_extra_rwops := true
248 CFLAGS += -DSOUND_SUPPORTS_MP3 $(shell smpeg-config --cflags) 269 CFLAGS += -DSOUND_SUPPORTS_MP3 $(shell smpeg-config --cflags)
249 LDFLAGS += $(shell smpeg-config --libs) 270 LDFLAGS += $(shell smpeg-config --libs)
250 endif 271 endif
251 272
273 ifeq ($(strip $(use_decoder_mod)),true)
274 MAINSRCS += decoders/mod.c
275 CFLAGS += -DSOUND_SUPPORTS_MOD -DUSE_RWOPS
276 LDFLAGS += -lmikmod
277 endif
278
252 ifeq ($(strip $(use_decoder_voc)),true) 279 ifeq ($(strip $(use_decoder_voc)),true)
253 MAINSRCS += decoders/voc.c 280 MAINSRCS += decoders/voc.c
254 CFLAGS += -DSOUND_SUPPORTS_VOC 281 CFLAGS += -DSOUND_SUPPORTS_VOC
255 endif 282 endif
256 283
264 CFLAGS += -DSOUND_SUPPORTS_AIFF 291 CFLAGS += -DSOUND_SUPPORTS_AIFF
265 endif 292 endif
266 293
267 ifeq ($(strip $(use_decoder_ogg)),true) 294 ifeq ($(strip $(use_decoder_ogg)),true)
268 MAINSRCS += decoders/ogg.c 295 MAINSRCS += decoders/ogg.c
269 CFLAGS += -DSOUND_SUPPORTS_OGG 296 CFLAGS += -DSOUND_SUPPORTS_OGG $(INCPATH_OGG)
270 LDFLAGS += -lvorbisfile -lvorbis 297 LDFLAGS += $(LIBPATH_OGG) -lvorbisfile -lvorbis
271 endif 298 endif
272 299
273 ifeq ($(strip $(need_extra_rwops)),true) 300 ifeq ($(strip $(need_extra_rwops)),true)
274 MAINSRCS += extra_rwops.c 301 MAINSRCS += extra_rwops.c
275 endif 302 endif
377 @echo "Install prefix : $(install_prefix)" 404 @echo "Install prefix : $(install_prefix)"
378 @echo "Supports .WAV : $(use_decoder_wav)" 405 @echo "Supports .WAV : $(use_decoder_wav)"
379 @echo "Supports .AIFF : $(use_decoder_aiff)" 406 @echo "Supports .AIFF : $(use_decoder_aiff)"
380 @echo "Supports .RAW : $(use_decoder_raw)" 407 @echo "Supports .RAW : $(use_decoder_raw)"
381 @echo "Supports .MP3 : $(use_decoder_mp3)" 408 @echo "Supports .MP3 : $(use_decoder_mp3)"
409 @echo "Supports .MOD : $(use_decoder_mod)"
382 @echo "Supports .VOC : $(use_decoder_voc)" 410 @echo "Supports .VOC : $(use_decoder_voc)"
383 @echo "Supports .OGG : $(use_decoder_ogg)" 411 @echo "Supports .OGG : $(use_decoder_ogg)"
384 412
385 showflags: 413 showflags:
386 @echo 'CFLAGS : $(CFLAGS)' 414 @echo 'CFLAGS : $(CFLAGS)'