# # Makefile for Gravity Wars, by Sami Niemi # USE_SDL=1 USE_JOYSTICK=1 DEBUG=1 BINDIR=/usr/local/bin PKG_CONFIG ?= pkg-config ifeq (1,$(USE_SDL)) CFLAGS ?= -g -Wall -O2 -fstack-protector-strong -Wformat -Werror=format-security CFLAGS += -DUSE_SDL -DUSE_JOYSTICK `$(PKG_CONFIG) sdl --cflags` LIBS= -lm `$(PKG_CONFIG) sdl --libs` else CFLAGS ?= -O2 -Wall LIBS= -lm -lvgagl -lvga endif CC=cc TARGET=GravityWars101 OBJECTS=memory.o macros.o misc.o water.o score.o hole.o bullet.o pixel.o \ blocks.o introutro.o animate.o init.o makepic.o scroll.o moveship.o \ control.o vgastubs.o GravityWars101.o $(TARGET): $(OBJECTS) $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(OBJECTS2) -o $(TARGET) $(LIBS) GravityWars101.o: GravityWars101.c config.h macros.h memory.o: memory.c config.h macros.h macros.o: config.h memory.o macros.c macros.h misc.o: misc.c config.h macros.h water.o: water.c config.h macros.h score.o: score.c config.h macros.h hole.o: hole.c config.h macros.h bullet.o: bullet.c config.h macros.h pixel.o: pixel.c config.h macros.h blocks.o: blocks.c config.h macros.h introutro.o: introutro.c config.h macros.h animate.o: animate.c config.h macros.h init.o: init.c config.h macros.h makepic.o: makepic.c config.h macros.h scroll.o: scroll.c config.h macros.h moveship.o: moveship.c config.h macros.h control.o: control.c config.h macros.h vgastubs.o: vgastubs.c vgastubs.h clean: rm -f $(OBJECTS) rm -f $(TARGET) install: do_install