# 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 score.o sound.o main.o $(if $(DEBUG),debug.o)
libs := SFont.o
objects := $(libs) $(my_objects)
DATA_PREFIX = /usr/share/vor
PROGRAM_PREFIX = /usr/games/bin
-all: vor
+all: vor data/sprites/ship.png
%.o: %.c
$(CC) $(cflags) -c -o $@ $<
vor: $(objects)
$(CC) $(ldflags) -o $@ $^ $(LIBRARIES)
+data/sprites/ship.png: ship.pov
+ povray -GA -D +A +UA +W32 +H24 ship.pov >/dev/null 2>/dev/null
+ mv ship.png data/sprites/
+
clean:
- rm -f *.o vor
+ rm -f *.o vor data/sprites/ship.png
install: all
if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi