diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-03-01 17:12:26 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-03-01 17:12:26 -0800 |
commit | 7fb6ab0a73c36a9d79f7607652b4194e389a70a0 (patch) | |
tree | 57d481c463d89373597c0da3281279318a3fa9ec /Makefile.darwinx | |
parent | ce1c547246ad8455b3f516a6505919b21e663cf1 (diff) | |
download | grv-7fb6ab0a73c36a9d79f7607652b4194e389a70a0.tar.gz grv-7fb6ab0a73c36a9d79f7607652b4194e389a70a0.tar.xz grv-7fb6ab0a73c36a9d79f7607652b4194e389a70a0.zip |
Actually be able to make a MacOS X bundle
We still turn it into a zip file instead of a native MacOS X disk
image (dmg) file though... not sure how to do that on Linux.
Diffstat (limited to 'Makefile.darwinx')
-rw-r--r-- | Makefile.darwinx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Makefile.darwinx b/Makefile.darwinx index 5c70e7e..6b6ae8f 100644 --- a/Makefile.darwinx +++ b/Makefile.darwinx @@ -4,7 +4,7 @@ # SDLROOT = /home/hpa/games/SDL_mac -SDL = $(SDLROOT)/SDL.framework/Version/Current +SDL = $(SDLROOT)/SDL.framework/Versions/Current SDLMAIN = $(SDLROOT)/devel-lite CC = darwinx-gcc -arch i386 @@ -14,12 +14,14 @@ OPTFLAGS = -O2 -g INCLUDE = -I$(SDL)/Headers CFLAGS = $(CWARN) $(REQFLAGS) $(OPTFLAGS) $(INCLUDE) LDFLAGS = -# We need an extra helping of -lmingw32 before -lSDLMain to make sure -# WinMain is pulled in correctly LIBS = -F$(SDLROOT) -framework SDL -framework Cocoa +INT = darwinx-install_name_tool + X = -ALL = grv$(X) +ALL = grv$(X) Grv.zip + +APP = Grv.app OBJS = grv.o drawlevel.o play.o action.o bullets.o mystery.o \ prefs.o intro.o \ @@ -34,6 +36,9 @@ all: $(ALL) grv$(X): $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + $(INT) -change '@rpath/SDL.framework/Versions/A/SDL' \ + '@executable_path/../Frameworks/SDL.framework/Versions/A/SDL' \ + $@ .c.o: $(CC) $(CFLAGS) -c -o $@ $< @@ -50,5 +55,16 @@ grvfont.c: grvfont.psf psftoc.pl SDLMain.o: $(SDLMAIN)/SDLMain.m $(SDLMAIN)/SDLMain.h $(CC) $(CFLAGS) -I$(SDLMAIN) -c -o $@ $< +Grv.zip: grv$(X) Info.plist + rm -f $@ + rm -rf $(APP) + mkdir -p $(APP)/Contents/MacOS $(APP)/Contents/Frameworks + cp Info.plist $(APP)/Contents/ + cp $< $(APP)/Contents/MacOS/ + cp -a $(SDLROOT)/SDL.framework $(APP)/Contents/Frameworks/ + find $(APP) -name Headers | xargs rm -rf + zip -9r --symlinks $@ $(APP) + clean: rm -f *.o *.i *.s $(ALL) + rm -rf $(APP) |