| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| •5 |
USE_SDL=1 |
| •6 |
USE_JOYSTICK=1 |
| 7 |
DEBUG=1 |
| 8 |
|
| •9 |
BINDIR=/usr/local/bin |
| 10 |
|
| •11 |
PKG_CONFIG ?= pkg-config |
| •12 |
|
| 13 |
ifeq (1,$(USE_SDL)) |
| •14 |
CFLAGS ?= -g -Wall -O2 -fstack-protector-strong -Wformat -Werror=format-security |
| 15 |
CFLAGS += -DUSE_SDL -DUSE_JOYSTICK `$(PKG_CONFIG) sdl --cflags` |
| 16 |
LIBS= -lm `$(PKG_CONFIG) sdl --libs` |
| 17 |
else |
| •18 |
CFLAGS ?= -O2 -Wall |
| 19 |
LIBS= -lm -lvgagl -lvga |
| 20 |
endif |
| 21 |
|
| 22 |
CC=cc |
| 23 |
TARGET=GravityWars101 |
| 24 |
OBJECTS=memory.o macros.o misc.o water.o score.o hole.o bullet.o pixel.o \ |
| 25 |
blocks.o introutro.o animate.o init.o makepic.o scroll.o moveship.o \ |
| •26 |
control.o vgastubs.o GravityWars101.o |
| 27 |
|
| 28 |
$(TARGET): $(OBJECTS) |
| •29 |
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(OBJECTS2) -o $(TARGET) $(LIBS) |
| 30 |
|
| 31 |
GravityWars101.o: GravityWars101.c config.h macros.h |
| 32 |
|
| 33 |
memory.o: memory.c config.h macros.h |
| 34 |
|
| 35 |
macros.o: config.h memory.o macros.c macros.h |
| 36 |
|
| 37 |
misc.o: misc.c config.h macros.h |
| 38 |
|
| 39 |
water.o: water.c config.h macros.h |
| 40 |
|
| 41 |
score.o: score.c config.h macros.h |
| 42 |
|
| 43 |
hole.o: hole.c config.h macros.h |
| 44 |
|
| 45 |
bullet.o: bullet.c config.h macros.h |
| 46 |
|
| 47 |
pixel.o: pixel.c config.h macros.h |
| 48 |
|
| 49 |
blocks.o: blocks.c config.h macros.h |
| 50 |
|
| 51 |
introutro.o: introutro.c config.h macros.h |
| 52 |
|
| 53 |
animate.o: animate.c config.h macros.h |
| 54 |
|
| 55 |
init.o: init.c config.h macros.h |
| 56 |
|
| 57 |
makepic.o: makepic.c config.h macros.h |
| 58 |
|
| 59 |
scroll.o: scroll.c config.h macros.h |
| 60 |
|
| 61 |
moveship.o: moveship.c config.h macros.h |
| 62 |
|
| 63 |
control.o: control.c config.h macros.h |
| 64 |
|
| •65 |
vgastubs.o: vgastubs.c vgastubs.h |
| 66 |
|
| 67 |
|
| 68 |
clean: |
| 69 |
rm -f $(OBJECTS) |
| 70 |
rm -f $(TARGET) |
| 71 |
|
| 72 |
install: |
| 73 |
do_install |