summaryrefslogtreecommitdiffstats
path: root/Makefile.w32
blob: 9f5db6f085ed94332b76640738d23f9391062eec (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
55
56
# -*- makefile -*-
#
# Makefile for GRV under Win32 using MinGW32
#
# To use this Makefile you need the following packages installed:
#
# MinGW32 and MSYS from http://www.mingw.org/
# The SDL 1.2 development libraries for MinGW32 from http://www.libsdl.org/
#

CC	 = gcc
CWARN	 = -W -Wall -Wno-pointer-sign
REQFLAGS = -D_REENTRANT -DSDL_SUBDIR
OPTFLAGS = -O2 -g
CFLAGS	 = $(CWARN) $(REQFLAGS) $(OPTFLAGS) $(INCLUDE)
# -mwindows makes this a GUI application; -mconsole would make it a
# console application.  Both are also possible, useful to get a console
# window for debugging output.
LDFLAGS  = -mwindows -L$(SDL)/lib
# We need an extra helping of -lmingw32 before -lSDLmain to make sure
# WinMain is pulled in correctly
LIBS     = -lmingw32 -lSDLmain -lSDL -lws2_32

X	 = .exe
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 \
	   sysrand.o homedir.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 $@

clean:
	rm -f *.o *.i *.s $(ALL)