aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.darwinx
blob: 5c70e7e21b4732a4d462d0391180642ef5a2b33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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)