X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=Makefile;h=be17b467a9402e7d32d8caefe6fde3934af66cb2;hp=31c4214ddd545a0d1c75b182731e650e83c8ca75;hb=f8b249157652f109467064877561955910f98fc1;hpb=05bfe1eca8ec4981dc087a97b7dfaa74eb1de59e diff --git a/Makefile b/Makefile index 31c4214..be17b46 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,9 @@ debug := $(if $(DEBUG),1,0) ldflags := $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -cflags := $(shell sdl-config --cflags) -Wall -DDEBUG=$(debug) +cflags := $(shell sdl-config --cflags) -Wall -DDEBUG=$(debug) $(CFLAGS) -my_objects := file.o score.o shape.o sound.o main.o $(if $(DEBUG),debug.o) +my_objects := file.o rocks.o score.o shape.o sound.o main.o $(if $(DEBUG),debug.o) libs := SFont.o objects := $(libs) $(my_objects) @@ -29,7 +29,7 @@ rocks += 20 21 22 23 24 25 26 27 28 29 rocks += 30 31 32 33 34 35 36 37 38 39 rocks += 40 41 42 43 44 45 46 47 48 49 -graphics := data/sprites/ship.png $(rocks:%=data/sprites/rock%.png) +graphics := data/sprites/ship.png data/indicators/life.png $(rocks:%=data/sprites/rock%.png) INSTALL = install INSTALL_PROGRAM = $(INSTALL) -o games -g games @@ -39,7 +39,12 @@ DATA_PREFIX = /usr/share/vor PROGRAM_PREFIX = /usr/games/bin -all: vor $(graphics) + +.PHONY: all clean graphics maintainer-clean install uninstall + +all: graphics vor + +graphics: $(graphics) %.o: %.c $(CC) $(cflags) -c -o $@ $< @@ -51,13 +56,13 @@ main.o file.o: file.h vor: $(objects) $(CC) $(ldflags) -o $@ $^ $(LIBRARIES) -pnmoutline: pnmoutline.c - $(CC) -lnetpbm -o $@ $< - include gfx.mk clean: - rm -f *.o vor pnmoutline $(graphics) + rm -f *.o vor + +maintainer-clean: clean + rm -f $(graphics) install: all if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi