Mercurial > SDL_sound_CoreAudio
annotate Makefile @ 38:9950943545c4
Updated.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 20 Sep 2001 07:56:52 +0000 |
parents | 36f27ef8bebe |
children | f7a792fdf7a4 |
rev | line source |
---|---|
4 | 1 #-----------------------------------------------------------------------------# |
2 # SDL_sound -- An abstract sound format decoding API. | |
3 # Copyright (C) 2001 Ryan C. Gordon. | |
4 # | |
5 # This library is free software; you can redistribute it and/or | |
6 # modify it under the terms of the GNU Lesser General Public | |
7 # License as published by the Free Software Foundation; either | |
8 # version 2.1 of the License, or (at your option) any later version. | |
9 # | |
10 # This library is distributed in the hope that it will be useful, | |
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 # Lesser General Public License for more details. | |
14 # | |
15 # You should have received a copy of the GNU Lesser General Public | |
16 # License along with this library; if not, write to the Free Software | |
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 # | |
19 # (Please see the file LICENSE in the source's root directory.) | |
20 # | |
21 # This file written by Ryan C. Gordon. | |
22 #-----------------------------------------------------------------------------# | |
23 | |
24 | |
25 #-----------------------------------------------------------------------------# | |
26 # Makefile for building SDL_sound on Unix-like systems. Follow the | |
27 # instructions for editing this file, then run "make" on the command line. | |
28 #-----------------------------------------------------------------------------# | |
29 | |
30 | |
31 #-----------------------------------------------------------------------------# | |
32 # Set to your liking. | |
33 #-----------------------------------------------------------------------------# | |
34 CC = gcc | |
35 LINKER = gcc | |
36 | |
37 | |
38 #-----------------------------------------------------------------------------# | |
39 # If this makefile fails to detect Cygwin correctly, or you want to force | |
40 # the build process's behaviour, set it to "true" or "false" (w/o quotes). | |
41 #-----------------------------------------------------------------------------# | |
42 #cygwin := true | |
43 #cygwin := false | |
44 cygwin := autodetect | |
45 | |
46 #-----------------------------------------------------------------------------# | |
47 # You only need to set SDL_INC_DIR and SDL_LIB_DIR if you are using cygwin. | |
48 # SDL_INC_DIR is where SDL.h and associated headers can be found, and | |
49 # SDL_LIB_DIR is where SDL.lib and SDL.dll are located. These may be set as | |
50 # environment variables, if you'd prefer to not hack the Makefile. | |
51 # | |
52 # examples: | |
53 # SDL_INC_DIR := C:/2/SDL-1.1.8/include | |
54 # SDL_LIB_DIR := C:/2/SDL-1.1.8/lib | |
55 #-----------------------------------------------------------------------------# | |
56 ifeq ($(strip $(SDL_INC_DIR)),) | |
57 SDL_INC_DIR := please_set_me_cygwin_users | |
58 endif | |
59 | |
60 ifeq ($(strip $(SDL_LIB_DIR)),) | |
61 SDL_LIB_DIR := please_set_me_cygwin_users | |
62 endif | |
63 | |
64 #-----------------------------------------------------------------------------# | |
65 # Set this to true if you want to create a debug build. | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
66 # (for generating debugging symbols, disabling optimizations, etc.) |
4 | 67 #-----------------------------------------------------------------------------# |
68 #debugging := false | |
69 debugging := true | |
70 | |
71 #-----------------------------------------------------------------------------# | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
72 # Set this to true if you want debugging output. This does a LOT of |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
73 # chattering to stdout, and can be used with out without the (debugging) |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
74 # option above. You do NOT want this in a release build! |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
75 #-----------------------------------------------------------------------------# |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
76 #debugging_chatter := false |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
77 debugging_chatter := true |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
78 |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
79 #-----------------------------------------------------------------------------# |
4 | 80 # Set the decoder types you'd like to support. |
81 # Note that various decoders may need external libraries. | |
82 #-----------------------------------------------------------------------------# | |
83 use_decoder_raw := true | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
84 use_decoder_mp3 := false |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
85 use_decoder_voc := true |
18 | 86 use_decoder_wav := true |
35 | 87 use_decoder_aiff := true |
27 | 88 use_decoder_ogg := true |
4 | 89 |
90 #-----------------------------------------------------------------------------# | |
91 # Set to "true" if you'd like to build a DLL. Set to "false" otherwise. | |
92 #-----------------------------------------------------------------------------# | |
93 #build_dll := false | |
94 build_dll := true | |
95 | |
96 #-----------------------------------------------------------------------------# | |
97 # Set one of the below. Currently, none of these are used. | |
98 #-----------------------------------------------------------------------------# | |
99 #use_asm = -DUSE_I386_ASM | |
100 use_asm = -DUSE_PORTABLE_C | |
101 | |
102 | |
103 #-----------------------------------------------------------------------------# | |
104 # Set this to where you want SDL_sound installed. It will put the | |
105 # files in $(install_prefix)/bin, $(install_prefix)/lib, and | |
106 # $(install_prefix)/include ... | |
107 #-----------------------------------------------------------------------------# | |
108 install_prefix := /usr/local | |
109 | |
110 | |
111 #-----------------------------------------------------------------------------# | |
112 #-----------------------------------------------------------------------------# | |
113 #-----------------------------------------------------------------------------# | |
114 #-----------------------------------------------------------------------------# | |
115 # Everything below this line is probably okay. | |
116 #-----------------------------------------------------------------------------# | |
117 #-----------------------------------------------------------------------------# | |
118 #-----------------------------------------------------------------------------# | |
119 #-----------------------------------------------------------------------------# | |
120 | |
121 #-----------------------------------------------------------------------------# | |
122 # CygWin autodetect. | |
123 #-----------------------------------------------------------------------------# | |
124 | |
125 ifeq ($(strip $(cygwin)),autodetect) | |
126 ifneq ($(strip $(shell gcc -v 2>&1 |grep "cygwin")),) | |
127 cygwin := true | |
128 else | |
129 cygwin := false | |
130 endif | |
131 endif | |
132 | |
133 | |
134 #-----------------------------------------------------------------------------# | |
135 # Platform-specific binary stuff. | |
136 #-----------------------------------------------------------------------------# | |
137 | |
138 ifeq ($(strip $(cygwin)),true) | |
139 ifeq ($(strip $(SDL_INC_DIR)),please_set_me_cygwin_users) | |
140 $(error Cygwin users need to set the SDL_INC_DIR envr var.) | |
141 else | |
142 SDL_CFLAGS := -I$(SDL_INC_DIR) | |
143 endif | |
144 | |
145 ifeq ($(strip $(SDL_LIB_DIR)),please_set_me_cygwin_users) | |
146 $(error Cygwin users need to set the SDL_LIB_DIR envr var.) | |
147 else | |
148 SDL_LDFLAGS := -L$(SDL_LIB_DIR) -lSDL | |
149 endif | |
150 | |
151 # !!! FIXME | |
152 build_dll := false | |
153 # !!! FIXME | |
154 | |
155 ASM = nasmw | |
156 EXE_EXT = .exe | |
157 DLL_EXT = .dll | |
158 STATICLIB_EXT = .a | |
159 ASMOBJFMT = win32 | |
160 ASMDEFS = -dC_IDENTIFIERS_UNDERSCORED | |
161 CFLAGS += -DC_IDENTIFIERS_UNDERSCORED | |
162 else | |
163 ASM = nasm | |
164 EXE_EXT = | |
165 DLL_EXT = .so | |
166 STATICLIB_EXT = .a | |
167 ASMOBJFMT = elf | |
168 SDL_CFLAGS := $(shell sdl-config --cflags) | |
169 SDL_LDFLAGS := $(shell sdl-config --libs) | |
170 endif | |
171 | |
172 CFLAGS += $(SDL_CFLAGS) | |
173 LDFLAGS += $(SDL_LDFLAGS) | |
174 | |
175 ifeq ($(strip $(build_dll)),true) | |
176 LIB_EXT := $(DLL_EXT) | |
177 SHAREDFLAGS += -shared | |
178 else | |
179 LIB_EXT := $(STATICLIB_EXT) | |
180 endif | |
181 | |
182 #-----------------------------------------------------------------------------# | |
183 # Version crapola. | |
184 #-----------------------------------------------------------------------------# | |
185 VERMAJOR := $(shell grep "define SOUND_VER_MAJOR" SDL_sound.h | sed "s/\#define SOUND_VER_MAJOR //") | |
186 VERMINOR := $(shell grep "define SOUND_VER_MINOR" SDL_sound.h | sed "s/\#define SOUND_VER_MINOR //") | |
187 VERPATCH := $(shell grep "define SOUND_VER_PATCH" SDL_sound.h | sed "s/\#define SOUND_VER_PATCH //") | |
188 | |
189 VERMAJOR := $(strip $(VERMAJOR)) | |
190 VERMINOR := $(strip $(VERMINOR)) | |
191 VERPATCH := $(strip $(VERPATCH)) | |
192 | |
193 VERFULL := $(VERMAJOR).$(VERMINOR).$(VERPATCH) | |
194 | |
195 #-----------------------------------------------------------------------------# | |
196 # General compiler, assembler, and linker flags. | |
197 #-----------------------------------------------------------------------------# | |
198 | |
199 BINDIR := bin | |
200 SRCDIR := . | |
201 | |
18 | 202 CFLAGS := -I$(SRCDIR) $(CFLAGS) |
203 CFLAGS += $(use_asm) -D_REENTRANT -fsigned-char -DPLATFORM_UNIX | |
4 | 204 CFLAGS += -Wall -Werror -fno-exceptions -fno-rtti -ansi -pedantic |
205 | |
206 LDFLAGS += -lm | |
207 | |
208 ifeq ($(strip $(debugging)),true) | |
209 CFLAGS += -DDEBUG -g -fno-omit-frame-pointer | |
210 LDFLAGS += -g -fno-omit-frame-pointer | |
211 else | |
212 CFLAGS += -DNDEBUG -O2 -fomit-frame-pointer | |
213 LDFLAGS += -O2 -fomit-frame-pointer | |
214 endif | |
215 | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
216 ifeq ($(strip $(debugging_chatter)),true) |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
217 CFLAGS += -DDEBUG_CHATTER |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
218 endif |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
219 |
4 | 220 ASMFLAGS := -f $(ASMOBJFMT) $(ASMDEFS) |
221 | |
222 #-----------------------------------------------------------------------------# | |
223 # Source and target names. | |
224 #-----------------------------------------------------------------------------# | |
225 | |
226 PUREBASELIBNAME := SDL_sound | |
227 ifeq ($(strip $(cygwin)),true) | |
228 BASELIBNAME := $(strip $(PUREBASELIBNAME)) | |
229 else | |
230 BASELIBNAME := lib$(strip $(PUREBASELIBNAME)) | |
231 endif | |
232 | |
233 MAINLIB := $(BINDIR)/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)) | |
234 | |
235 TESTSRCS := test/test_sdlsound.c | |
236 | |
237 MAINSRCS := SDL_sound.c | |
238 | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
239 need_extra_rwops := false |
4 | 240 ifeq ($(strip $(use_decoder_raw)),true) |
241 MAINSRCS += decoders/raw.c | |
242 CFLAGS += -DSOUND_SUPPORTS_RAW | |
243 endif | |
244 | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
245 ifeq ($(strip $(use_decoder_mp3)),true) |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
246 MAINSRCS += decoders/mp3.c |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
247 need_extra_rwops := true |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
248 CFLAGS += -DSOUND_SUPPORTS_MP3 $(shell smpeg-config --cflags) |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
249 LDFLAGS += $(shell smpeg-config --libs) |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
250 endif |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
251 |
4 | 252 ifeq ($(strip $(use_decoder_voc)),true) |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
253 MAINSRCS += decoders/voc.c |
4 | 254 CFLAGS += -DSOUND_SUPPORTS_VOC |
255 endif | |
256 | |
18 | 257 ifeq ($(strip $(use_decoder_wav)),true) |
258 MAINSRCS += decoders/wav.c | |
259 CFLAGS += -DSOUND_SUPPORTS_WAV | |
260 endif | |
261 | |
35 | 262 ifeq ($(strip $(use_decoder_aiff)),true) |
263 MAINSRCS += decoders/aiff.c | |
264 CFLAGS += -DSOUND_SUPPORTS_AIFF | |
265 endif | |
266 | |
27 | 267 ifeq ($(strip $(use_decoder_ogg)),true) |
268 MAINSRCS += decoders/ogg.c | |
269 CFLAGS += -DSOUND_SUPPORTS_OGG | |
270 LDFLAGS += -lvorbisfile -lvorbis | |
271 endif | |
272 | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
273 ifeq ($(strip $(need_extra_rwops)),true) |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
274 MAINSRCS += extra_rwops.c |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
275 endif |
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
276 |
4 | 277 #ifeq ($(strip $(cygwin)),true) |
278 # MAINSRCS += platform/win32.c | |
279 # CFLAGS += -DWIN32 | |
280 #else | |
281 # MAINSRCS += platform/unix.c | |
282 #endif | |
283 | |
284 TESTEXE := $(BINDIR)/test_sdlsound$(EXE_EXT) | |
285 | |
286 # Rule for getting list of objects from source | |
287 MAINOBJS1 := $(MAINSRCS:.c=.o) | |
288 MAINOBJS2 := $(MAINOBJS1:.cpp=.o) | |
289 MAINOBJS3 := $(MAINOBJS2:.asm=.o) | |
290 MAINOBJS := $(foreach f,$(MAINOBJS3),$(BINDIR)/$(f)) | |
291 MAINSRCS := $(foreach f,$(MAINSRCS),$(SRCDIR)/$(f)) | |
292 | |
293 TESTOBJS1 := $(TESTSRCS:.c=.o) | |
294 TESTOBJS2 := $(TESTOBJS1:.cpp=.o) | |
295 TESTOBJS3 := $(TESTOBJS2:.asm=.o) | |
296 TESTOBJS := $(foreach f,$(TESTOBJS3),$(BINDIR)/$(f)) | |
297 TESTSRCS := $(foreach f,$(TESTSRCS),$(SRCDIR)/$(f)) | |
298 | |
299 CLEANUP = $(wildcard *.exe) $(wildcard *.obj) \ | |
300 $(wildcard $(BINDIR)/*.exe) $(wildcard $(BINDIR)/*.obj) \ | |
301 $(wildcard *~) $(wildcard *.err) \ | |
302 $(wildcard .\#*) core | |
303 | |
304 | |
305 #-----------------------------------------------------------------------------# | |
306 # Rules. | |
307 #-----------------------------------------------------------------------------# | |
308 | |
309 # Rules for turning source files into .o files | |
310 $(BINDIR)/%.o: $(SRCDIR)/%.cpp | |
311 $(CC) -c -o $@ $< $(CFLAGS) | |
312 | |
313 $(BINDIR)/%.o: $(SRCDIR)/%.c | |
314 $(CC) -c -o $@ $< $(CFLAGS) | |
315 | |
316 $(BINDIR)/%.o: $(SRCDIR)/%.asm | |
317 $(ASM) $(ASMFLAGS) -o $@ $< | |
318 | |
319 .PHONY: all clean distclean listobjs install showcfg showflags | |
320 | |
321 all: $(BINDIR) $(EXTRABUILD) $(MAINLIB) $(TESTEXE) | |
322 | |
323 $(MAINLIB) : $(BINDIR) $(MAINOBJS) | |
324 $(LINKER) -o $(MAINLIB) $(SHAREDFLAGS) $(MAINOBJS) $(LDFLAGS) | |
325 | |
326 $(TESTEXE) : $(MAINLIB) $(TESTOBJS) | |
327 $(LINKER) -o $(TESTEXE) $(TESTLDFLAGS) $(TESTOBJS) -L$(BINDIR) -l$(strip $(PUREBASELIBNAME)) $(LDFLAGS) | |
328 | |
329 | |
330 install: all | |
331 rm -f $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERMAJOR)).$(strip $(VERMINOR)).* | |
332 mkdir -p $(install_prefix)/bin | |
333 mkdir -p $(install_prefix)/lib | |
334 mkdir -p $(install_prefix)/include | |
335 cp $(SRCDIR)/SDL_sound.h $(install_prefix)/include | |
336 cp $(TESTEXE) $(install_prefix)/bin | |
337 ifeq ($(strip $(cygwin)),true) | |
338 cp $(MAINLIB) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)) | |
339 else | |
340 cp $(MAINLIB) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL)) | |
341 ln -sf $(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL)) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)) | |
342 ln -sf $(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL)) $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERMAJOR)) | |
343 chmod 0755 $(install_prefix)/lib/$(strip $(BASELIBNAME))$(strip $(LIB_EXT)).$(strip $(VERFULL)) | |
344 chmod 0644 $(install_prefix)/include/SDL_sound.h | |
345 endif | |
346 | |
347 $(BINDIR): | |
348 mkdir -p $(BINDIR) | |
349 mkdir -p $(BINDIR)/decoders | |
350 mkdir -p $(BINDIR)/platform | |
351 mkdir -p $(BINDIR)/test | |
352 | |
353 distclean: clean | |
354 | |
355 clean: | |
356 rm -f $(CLEANUP) | |
357 rm -rf $(BINDIR) | |
358 | |
359 listobjs: | |
360 @echo SOURCES: | |
361 @echo $(MAINSRCS) | |
362 @echo | |
363 @echo OBJECTS: | |
364 @echo $(MAINOBJS) | |
365 @echo | |
366 @echo BINARIES: | |
367 @echo $(MAINLIB) | |
368 | |
369 showcfg: | |
370 @echo "Compiler : $(CC)" | |
371 @echo "Using CygWin : $(cygwin)" | |
372 @echo "Debugging : $(debugging)" | |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
373 @echo "Debugging chatter : $(debugging_chatter)" |
4 | 374 @echo "ASM flag : $(use_asm)" |
375 @echo "SDL_sound version : $(VERFULL)" | |
376 @echo "Building DLLs : $(build_dll)" | |
377 @echo "Install prefix : $(install_prefix)" | |
18 | 378 @echo "Supports .WAV : $(use_decoder_wav)" |
35 | 379 @echo "Supports .AIFF : $(use_decoder_aiff)" |
4 | 380 @echo "Supports .RAW : $(use_decoder_raw)" |
6
3f214fe4a82f
Added debugging_chatter flag, and VOC and MP3 decoders.
Ryan C. Gordon <icculus@icculus.org>
parents:
4
diff
changeset
|
381 @echo "Supports .MP3 : $(use_decoder_mp3)" |
4 | 382 @echo "Supports .VOC : $(use_decoder_voc)" |
31
530fa59d5db9
Added Ogg Vorbis to "showcfg" target.
Ryan C. Gordon <icculus@icculus.org>
parents:
27
diff
changeset
|
383 @echo "Supports .OGG : $(use_decoder_ogg)" |
4 | 384 |
385 showflags: | |
386 @echo 'CFLAGS : $(CFLAGS)' | |
387 @echo 'LDFLAGS : $(LDFLAGS)' | |
388 | |
389 | |
390 #-----------------------------------------------------------------------------# | |
391 # This section is pretty much just for Ryan's use to make distributions. | |
392 # You Probably Should Not Touch. | |
393 #-----------------------------------------------------------------------------# | |
394 | |
395 # These are the files needed in a binary distribution, regardless of what | |
396 # platform is being used. | |
397 BINSCOMMON := LICENSE CHANGELOG SDL_sound.h | |
398 | |
399 .PHONY: package msbins win32bins nocygwin | |
400 package: clean | |
401 cd .. ; mv SDL_sound SDL_sound-$(VERFULL) ; tar -cyvvf ./SDL_sound-$(VERFULL).tar.bz2 --exclude="*CVS*" SDL_sound-$(VERFULL) ; mv SDL_sound-$(VERFULL) SDL_sound | |
402 | |
403 | |
404 ifeq ($(strip $(cygwin)),true) | |
405 msbins: win32bins | |
406 | |
407 win32bins: clean all | |
408 cp $(SDL_LIB_DIR)/SDL.dll . | |
409 echo -e "\r\n\r\n\r\nHEY YOU.\r\n\r\n\r\nTake a look at README-win32bins.txt FIRST.\r\n\r\n\r\n--ryan. (icculus@clutteredmind.org)\r\n\r\n" |zip -9rz ../SDL_sound-win32bins-$(shell date +%m%d%Y).zip $(MAINLIB) SDL.dll $(EXTRAPACKAGELIBS) README-win32bins.txt | |
410 | |
411 else | |
412 | |
413 msbins: nocygwin | |
414 win32bins: nocygwin | |
415 | |
416 nocygwin: | |
417 @echo This must be done on a Windows box in the Cygwin environment. | |
418 | |
419 endif | |
420 | |
421 #-----------------------------------------------------------------------------# | |
422 # That's all, folks. | |
423 #-----------------------------------------------------------------------------# | |
424 | |
425 # end of Makefile ... |