[SDL] Mac Makefile (codewarrior?)

sean seanh21 at execpc.com
Sun Aug 1 21:25:05 PDT 1999


Do any of you mac guys use SDL with codewarrior?
Sean

>> I have managed to get MrC, MPW, and SDL onto a Mac.  I heard there was a
>> Mac makefile somewhere, if anyone has it, could they please send it to
>> me?
>
>This is completely unofficial, but here it is...
>
>
>	-Sam Lantinga				(slouken at devolution.com)
>
>Lead Programmer, Loki Entertainment Software
>--
>"Any sufficiently advanced bug is indistinguishable from a feature"
>						 -- Rich Kulawiec
># Makefile for Apple MPW build environment (currently PPC only)
>
>MAKEFILE     = Makefile
>MondoBuild = #{MAKEFILE}  # Make blank to avoid rebuilds when makefile
>is modified
>SDL_INC = 
>		-i ":include:" 
>		-i ":src:" 
>		-i ":src:macos:" 
>		-i ":src:macos:toolbox:"
>STUB_INC = 
>		-i :include: 
>		-i :src:stub: 
>		-I :src:stub:macos
>SymPPC      =
>ObjDirPPC   = :obj:
>
>SDL_CFLAGS  = {SDL_INC} {SymPPC} -w 35 -d _BUILDING_SDL
>STUB_CFLAGS = {STUB_INC}
>
>SDLOBJS  = 
>		"{ObjDirPPC}SDL.c.x" 
>		"{ObjDirPPC}SDL_active.c.x" 
>		"{ObjDirPPC}SDL_audio.c.x" 
>		"{ObjDirPPC}SDL_audiocvt.c.x" 
>		"{ObjDirPPC}SDL_audiomem.c.x" 
>		"{ObjDirPPC}SDL_blit.c.x" 
>		"{ObjDirPPC}SDL_blit_0.c.x" 
>		"{ObjDirPPC}SDL_blit_1.c.x" 
>		"{ObjDirPPC}SDL_blit_A.c.x" 
>		"{ObjDirPPC}SDL_blit_AK.c.x" 
>		"{ObjDirPPC}SDL_blit_K.c.x" 
>		"{ObjDirPPC}SDL_blit_N.c.x" 
>		"{ObjDirPPC}SDL_bmp.c.x" 
>		"{ObjDirPPC}SDL_cdrom.c.x" 
>		"{ObjDirPPC}SDL_cursor.c.x" 
>		"{ObjDirPPC}SDL_endian.c.x" 
>		"{ObjDirPPC}SDL_error.c.x" 
>		"{ObjDirPPC}SDL_events.c.x" 
>		"{ObjDirPPC}SDL_fatal.c.x" 
>		"{ObjDirPPC}SDL_keyboard.c.x" 
>		"{ObjDirPPC}SDL_mixer.c.x" 
>		"{ObjDirPPC}SDL_mouse.c.x" 
>		"{ObjDirPPC}SDL_pixels.c.x" 
>		"{ObjDirPPC}SDL_quit.c.x" 
>		"{ObjDirPPC}SDL_RLEaccel.c.x" 
>		"{ObjDirPPC}SDL_rwops.c.x" 
>		"{ObjDirPPC}SDL_surface.c.x" 
>		"{ObjDirPPC}SDL_video.c.x" 
>		"{ObjDirPPC}SDL_wave.c.x" 
>		"{ObjDirPPC}SDL_mutex.c.x" 
>		"{ObjDirPPC}SDL_syscdrom.c.x" 
>		"{ObjDirPPC}SDL_thread.c.x" 
>		"{ObjDirPPC}SDL_timer.c.x" 
>		"{ObjDirPPC}SDL_sysaudio.c.x" 
>		"{ObjDirPPC}SDL_sysevents.c.x" 
>		"{ObjDirPPC}SDL_sysmouse.c.x" 
>		"{ObjDirPPC}SDL_sysvideo.c.x" 
>		"{ObjDirPPC}SDL_syswm.c.x"
>
>STUBOBJS  = 
>		"{ObjDirPPC}load.c.x" 
>		"{ObjDirPPC}macmain.c.x"
>
>
># This is used to build a static library of SDL
># You also need to add "-d _SDL_STATIC_LIB" to the compiler options
>#SDL  directories {MondoBuild} {SDLOBJS} "{ObjDirPPC}macmain.c.x"
>#	PPCLink 
>#		-o ":lib:{Targ}".o {SymPPC} 
>#		{SDLOBJS} "{ObjDirPPC}macmain.c.x" 
>#		-c '????' 
>#		-xm l
>
># This is used to build a dynamic library of SDL
>SDL  {MondoBuild} directories SDL.o {SDLOBJS}
>	PPCLink 
>		-o ":lib:{Targ}" {SymPPC} 
>		{SDLOBJS} 
>		- at export ":src:macos:exports:SDL.x" 
>		-t 'shlb' 
>		-c '????' 
>		-xm s 
>		"{SharedLibraries}InterfaceLib" 
>		"{SharedLibraries}StdCLib" 
>		"{SharedLibraries}MathLib" 
>		"{PPCLibraries}StdCRuntime.o" 
>		"{PPCLibraries}PPCCRuntime.o" 
>		"{PPCLibraries}PPCToolLibs.o"
>
># This is used to build the static stub library of SDL
>SDL.o  {MondoBuild} {STUBOBJS}
>	PPCLink 
>		-o :lib:{Targ} {SymPPC} 
>		{STUBOBJS} 
>		-c '????' 
>		-xm l
>
># This is used to create the directories needed for build
>directories 
>	if !`Exists obj` ; NewFolder obj ; end
>	if !`Exists lib` ; NewFolder lib ; end
>
>
># The SDL library objects
>
>"{ObjDirPPC}SDL.c.x"  {MondoBuild} ":src:SDL.c"
>	{PPCC} ":src:SDL.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_active.c.x"  {MondoBuild} ":src:SDL_active.c"
>	{PPCC} ":src:SDL_active.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_audio.c.x"  {MondoBuild} ":src:SDL_audio.c"
>	{PPCC} ":src:SDL_audio.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_audiocvt.c.x"  {MondoBuild} ":src:SDL_audiocvt.c"
>	{PPCC} ":src:SDL_audiocvt.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_audiomem.c.x"  {MondoBuild} ":src:SDL_audiomem.c"
>	{PPCC} ":src:SDL_audiomem.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit.c.x"  {MondoBuild} ":src:SDL_blit.c"
>	{PPCC} ":src:SDL_blit.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit_0.c.x"  {MondoBuild} ":src:SDL_blit_0.c"
>	{PPCC} ":src:SDL_blit_0.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit_1.c.x"  {MondoBuild} ":src:SDL_blit_1.c"
>	{PPCC} ":src:SDL_blit_1.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit_A.c.x"  {MondoBuild} ":src:SDL_blit_A.c"
>	{PPCC} ":src:SDL_blit_A.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit_AK.c.x"  {MondoBuild} ":src:SDL_blit_AK.c"
>	{PPCC} ":src:SDL_blit_AK.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit_K.c.x"  {MondoBuild} ":src:SDL_blit_K.c"
>	{PPCC} ":src:SDL_blit_K.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_blit_N.c.x"  {MondoBuild} ":src:SDL_blit_N.c"
>	{PPCC} ":src:SDL_blit_N.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_bmp.c.x"  {MondoBuild} ":src:SDL_bmp.c"
>	{PPCC} ":src:SDL_bmp.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_cdrom.c.x"  {MondoBuild} ":src:SDL_cdrom.c"
>	{PPCC} ":src:SDL_cdrom.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_cursor.c.x"  {MondoBuild} ":src:SDL_cursor.c"
>	{PPCC} ":src:SDL_cursor.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_endian.c.x"  {MondoBuild} ":src:SDL_endian.c"
>	{PPCC} ":src:SDL_endian.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_error.c.x"  {MondoBuild} ":src:SDL_error.c"
>	{PPCC} ":src:SDL_error.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_events.c.x"  {MondoBuild} ":src:SDL_events.c"
>	{PPCC} ":src:SDL_events.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_fatal.c.x"  {MondoBuild} ":src:SDL_fatal.c"
>	{PPCC} ":src:SDL_fatal.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_keyboard.c.x"  {MondoBuild} ":src:SDL_keyboard.c"
>	{PPCC} ":src:SDL_keyboard.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_mixer.c.x"  {MondoBuild} ":src:SDL_mixer.c"
>	{PPCC} ":src:SDL_mixer.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_mouse.c.x"  {MondoBuild} ":src:SDL_mouse.c"
>	{PPCC} ":src:SDL_mouse.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_pixels.c.x"  {MondoBuild} ":src:SDL_pixels.c"
>	{PPCC} ":src:SDL_pixels.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_quit.c.x"  {MondoBuild} ":src:SDL_quit.c"
>	{PPCC} ":src:SDL_quit.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_RLEaccel.c.x"  {MondoBuild} ":src:SDL_RLEaccel.c"
>	{PPCC} ":src:SDL_RLEaccel.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_rwops.c.x"  {MondoBuild} ":src:SDL_rwops.c"
>	{PPCC} ":src:SDL_rwops.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_surface.c.x"  {MondoBuild} ":src:SDL_surface.c"
>	{PPCC} ":src:SDL_surface.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_video.c.x"  {MondoBuild} ":src:SDL_video.c"
>	{PPCC} ":src:SDL_video.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_wave.c.x"  {MondoBuild} ":src:SDL_wave.c"
>	{PPCC} ":src:SDL_wave.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_mutex.c.x"  {MondoBuild} ":src:macos:SDL_mutex.c"
>	{PPCC} ":src:macos:SDL_mutex.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_syscdrom.c.x"  {MondoBuild} ":src:macos:SDL_syscdrom.c"
>	{PPCC} ":src:macos:SDL_syscdrom.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_thread.c.x"  {MondoBuild} ":src:macos:SDL_thread.c"
>	{PPCC} ":src:macos:SDL_thread.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_timer.c.x"  {MondoBuild} ":src:macos:SDL_timer.c"
>	{PPCC} ":src:macos:SDL_timer.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_sysaudio.c.x"  {MondoBuild}
>":src:macos:toolbox:SDL_sysaudio.c"
>	{PPCC} ":src:macos:toolbox:SDL_sysaudio.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_sysevents.c.x"  {MondoBuild}
>":src:macos:toolbox:SDL_sysevents.c"
>	{PPCC} ":src:macos:toolbox:SDL_sysevents.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_sysmouse.c.x"  {MondoBuild}
>":src:macos:toolbox:SDL_sysmouse.c"
>	{PPCC} ":src:macos:toolbox:SDL_sysmouse.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_sysvideo.c.x"  {MondoBuild}
>":src:macos:toolbox:SDL_sysvideo.c"
>	{PPCC} ":src:macos:toolbox:SDL_sysvideo.c" -o {Targ} {SDL_CFLAGS}
>
>"{ObjDirPPC}SDL_syswm.c.x"  {MondoBuild} ":src:macos:toolbox:SDL_syswm.c"
>	{PPCC} ":src:macos:toolbox:SDL_syswm.c" -o {Targ} {SDL_CFLAGS}
>
># Objects for the stub library
>
>"{ObjDirPPC}load.c.x"  {MondoBuild} :src:stub:load.c
>	{PPCC} :src:stub:load.c -o {Targ} {STUB_CFLAGS}
>
>"{ObjDirPPC}macmain.c.x"  {MondoBuild} :src:stub:macos:macmain.c
>	{PPCC} :src:stub:macos:macmain.c -o {Targ} {STUB_CFLAGS}
>
>
># Makefile for Apple MPW build environment (currently PPC only)
>
>MAKEFILE     = Makefile
>MondoBuild = #{MAKEFILE}  # Make blank to avoid rebuilds when makefile
>is modified
>SDL_INC = 
>		-i ":include:"
>SymPPC      =
>ObjDirPPC   = :obj:
>
>CFLAGS  = {SDL_INC} {SymPPC}
>
>OBJS  = 
>		"{ObjDirPPC}testwin.c.x"
>LIBS = 	
>		":lib:SDL.o"
>
># This is used to build the application
>testwin  {MondoBuild} {OBJS}
>	PPCLink 
>		-o "{Targ}" {SymPPC} 
>		{OBJS} {LIBS} 
>		"{SharedLibraries}InterfaceLib" 
>		"{SharedLibraries}StdCLib" 
>		"{SharedLibraries}MathLib" 
>		"{PPCLibraries}StdCRuntime.o" 
>		"{PPCLibraries}PPCCRuntime.o" 
>		"{PPCLibraries}PPCToolLibs.o"
>	Rez -a -o {Targ} ":src:stub:macos:SDL.r"
>	Rez -a -o {Targ} ":src:stub:macos:SIZE.r"
>
>"{ObjDirPPC}testwin.c.x"  {MondoBuild} ":test:testwin.c"
>	{PPCC} ":test:testwin.c" -o {Targ} {CFLAGS}






More information about the SDL mailing list