X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=Makefile;h=7965c18cbf22792f741118a93bbeabc8989eca58;hp=6ffba099dd2321c45d6eee29e3682a003fe5f7cd;hb=9f0bc6ef9620912ca42eca9c3f4b6ca10dba35ce;hpb=a2af96e68b210b7c3db90b7ec474498c5611a3a7 diff --git a/Makefile b/Makefile index 6ffba09..7965c18 100644 --- a/Makefile +++ b/Makefile @@ -15,13 +15,22 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +debug := $(if $(DEBUG),1,0) ldflags := $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -cflags := -g $(shell sdl-config --cflags) -Wall +cflags := $(shell sdl-config --cflags) -Wall -DDEBUG=$(debug) -my_objects := sound.o file.o main.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) +rocks := 00 01 02 03 04 05 06 07 08 09 +rocks += 10 11 12 13 14 15 16 17 18 19 +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 data/indicators/life.png $(rocks:%=data/sprites/rock%.png) + INSTALL = install INSTALL_PROGRAM = $(INSTALL) -o games -g games INSTALL_DATA = $(INSTALL) -m 644 @@ -29,7 +38,8 @@ INSTALL_DATA = $(INSTALL) -m 644 DATA_PREFIX = /usr/share/vor PROGRAM_PREFIX = /usr/games/bin -all: vor + +all: vor $(graphics) %.o: %.c $(CC) $(cflags) -c -o $@ $< @@ -41,8 +51,10 @@ main.o file.o: file.h vor: $(objects) $(CC) $(ldflags) -o $@ $^ $(LIBRARIES) +include gfx.mk + clean: - rm -f *.o vor + rm -f *.o vor $(graphics) install: all if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi