X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=Makefile;h=4c95ae48f3de05d0cfb6f02c85c0b1fd276443a9;hp=0b8ef80f932f5cabdea0f338c7eec91b0e495217;hb=b58849218703efd00152fe6667a4891f28049beb;hpb=6f82bba8833f187abebab53375ac87905487cf8c diff --git a/Makefile b/Makefile index 0b8ef80..4c95ae4 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,11 @@ # 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 := $(shell sdl-config --cflags) -Wall +cflags := $(shell sdl-config --cflags) -Wall -DDEBUG=$(debug) -my_objects := file.o score.o sound.o main.o +my_objects := file.o score.o sound.o main.o $(if $(DEBUG),debug.o) libs := SFont.o objects := $(libs) $(my_objects) @@ -29,7 +30,7 @@ INSTALL_DATA = $(INSTALL) -m 644 DATA_PREFIX = /usr/share/vor PROGRAM_PREFIX = /usr/games/bin -all: vor +all: vor data/sprites/ship.png %.o: %.c $(CC) $(cflags) -c -o $@ $< @@ -41,8 +42,18 @@ main.o file.o: file.h vor: $(objects) $(CC) $(ldflags) -o $@ $^ $(LIBRARIES) +pnmoutline: pnmoutline.c + $(CC) -lnetpbm -o $@ $< + +data/sprites/ship.png: ship.pov pnmoutline Makefile + povray -GA -D +A +UA +W32 +H32 $< >/dev/null 2>/dev/null + pngtopnm ship.png >ship.pnm + ./pnmoutline data/sprites/ship.pnm + pnmtopng -transparent =white data/sprites/ship.pnm >$@ + rm ship.png ship.pnm data/sprites/ship.pnm + clean: - rm -f *.o vor + rm -f *.o vor pnmoutline data/sprites/ship.png install: all if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi