*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Sun, 23 Sep 2001 22:33:19 +0000
changeset 1992ad0957f6265
parent 198 49bf25403f5e
child 200 ec77d3d32201
*** empty log message ***
README.MacOSX
     1.1 --- a/README.MacOSX	Sun Sep 23 22:16:02 2001 +0000
     1.2 +++ b/README.MacOSX	Sun Sep 23 22:33:19 2001 +0000
     1.3 @@ -18,19 +18,6 @@
     1.4  
     1.5  (You may need to create the subdirs of /usr/local manually.)
     1.6  
     1.7 -/*
     1.8 -To use the library once it's built, you need to use the "Carbon
     1.9 -framework", which is the port of the old Mac Toolbox to OS X.
    1.10 -To do this, use the -F and -framework arguments for compiling
    1.11 -and linking, respectively:
    1.12 -
    1.13 -	cc -c myprog.c -I/usr/local/include/SDL -F/System/Library/Frameworks/Carbon.framework
    1.14 -	cc myprog.o -L/usr/local/lib -lSDL -framework Carbon
    1.15 -
    1.16 -sdl-config knows about the linking path and -framework, so it's
    1.17 -recommended to use it to fill in your Makefile variables.
    1.18 -*/
    1.19 -
    1.20  To use the library once it's built, you essential have two possibilities:
    1.21  use the traditional autoconf/automake/make method, or use Apple's Project Builder.
    1.22  
    1.23 @@ -65,19 +52,21 @@
    1.24  
    1.25  3) Add something like the following rule to your Makefile.am:
    1.26  
    1.27 -APP_NAME.app: EXE_NAME
    1.28 -	mkdir -p $@/Contents/MacOS
    1.29 -	mkdir -p $@/Contents/Resources
    1.30 -	mkdir -p $@/Contents/Resources/SDL_main.nib
    1.31 -	echo "APPL????" > $@/Contents/PkgInfo
    1.32 -	$(INSTALL_DATA) Info.plist $@/Contents/
    1.33 -	$(INSTALL_DATA) SDL_main.nib/*.nib $@/Contents/Resources/
    1.34 -	$(INSTALL_PROGRAM) $< $@/Contents/MacOS/
    1.35 +bundle_contents = APP_NAME.app/Contents
    1.36 +APP_NAME_bundle: EXE_NAME
    1.37 +	mkdir -p $(bundle_contents)/MacOS
    1.38 +	mkdir -p $(bundle_contents)/Resources
    1.39 +	mkdir -p $(bundle_contents)/Resources/SDL_main.nib
    1.40 +	echo "APPL????" > $(bundle_contents)/PkgInfo
    1.41 +	$(INSTALL_DATA) Info.plist $(bundle_contents)/
    1.42 +	$(INSTALL_DATA) SDL_main.nib/*.nib $(bundle_contents)/Resources/SDLMain.nib
    1.43 +	$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/
    1.44  
    1.45     You should replace EXE_NAME with the name of the executable. APP_NAME is what
    1.46     will be visible to the user in the Finder. Usually it will be the same
    1.47     as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME 
    1.48 -   usually is "TestGame"
    1.49 +   usually is "TestGame". You might also want to use @PACKAGE@ to use the package
    1.50 +   name as specified in your configure.in file.
    1.51  
    1.52     If your project builds more than one application, you will have to do a bit more.
    1.53     For each of your target applications, you need a seperate rule. Furthermore, each
    1.54 @@ -92,12 +81,13 @@
    1.55  4) If you want the create bundles to be installed, you may want to add this
    1.56     rule to your Makefile.am:
    1.57  
    1.58 -install-exec-local: Exult.app
    1.59 -	mkdir -p /Applications/
    1.60 -	cp -r $< /Applications/
    1.61 +install-exec-hook: APP_NAME_bundle
    1.62 +	rm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app
    1.63 +	mkdir -p $(DESTDIR)$(prefix)/Applications/
    1.64 +	cp -r $< /$(DESTDIR)$(prefix)Applications/
    1.65  
    1.66     This rule takes the Bundle created by the rule from step 3 and installs them
    1.67 -   into /Applications/. An alternate installation place would be $HOME/Applications/
    1.68 +   into $(DESTDIR)$(prefix)/Applications/.
    1.69  
    1.70     Again, if you want to install multiple applications, you will have to augment
    1.71     the make rule accordingly.