[SDL] Mac Makefile

Sam Lantinga slouken at devolution.com
Sun Aug 1 16:23:01 PDT 1999


> 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 
-------------- next part --------------
# 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}

-------------- next part --------------
# 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