# -*- 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)