diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-03-01 07:57:54 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-03-01 07:57:54 -0800 |
commit | eabd706b4753491de0c943b0cc5f9791a1fa4ece (patch) | |
tree | d4afb9e77bd24a2a9541678794eba065c84d79ac /Makefile.darwinx | |
parent | c105886c048e0700de01c6ba327684b67aa0aed1 (diff) | |
download | grv-eabd706b4753491de0c943b0cc5f9791a1fa4ece.tar.gz grv-eabd706b4753491de0c943b0cc5f9791a1fa4ece.tar.xz grv-eabd706b4753491de0c943b0cc5f9791a1fa4ece.zip |
Makefile for MacOS build using DarwinX (still in progress)
There is a lot more things that should work before we have a usable
MacOS product...
Diffstat (limited to 'Makefile.darwinx')
-rw-r--r-- | Makefile.darwinx | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/Makefile.darwinx b/Makefile.darwinx new file mode 100644 index 0000000..5c70e7e --- /dev/null +++ b/Makefile.darwinx @@ -0,0 +1,54 @@ +# -*- makefile -*- +# +# Makefile for GRV under MacOS using DarwinX +# + +SDLROOT = /home/hpa/games/SDL_mac +SDL = $(SDLROOT)/SDL.framework/Version/Current +SDLMAIN = $(SDLROOT)/devel-lite + +CC = darwinx-gcc -arch i386 +CWARN = -W -Wall +REQFLAGS = -D__unix__ -D_REENTRANT +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 + +X = +ALL = grv$(X) + +OBJS = grv.o drawlevel.o play.o action.o bullets.o mystery.o \ + prefs.o intro.o \ + utils.o scoretbl.o highscore.o \ + netopen.o keyboard.o graphics.o grvfont.o random.o SDLMain.o + +SCORED = grvscored.o scoretbl.o + +.SUFFIXES: .c .o .i .s + +all: $(ALL) + +grv$(X): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +.c.i: + $(CC) $(CFLAGS) -E -o $@ $< + +.c.s: + $(CC) $(CFLAGS) -S -o $@ $< + +grvfont.c: grvfont.psf psftoc.pl + $(PERL) psftoc.pl < $< > $@ || rm -f $@ + +SDLMain.o: $(SDLMAIN)/SDLMain.m $(SDLMAIN)/SDLMain.h + $(CC) $(CFLAGS) -I$(SDLMAIN) -c -o $@ $< + +clean: + rm -f *.o *.i *.s $(ALL) |