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 rocks.o score.o shape.o sound.o main.o $(if $(DEBUG),debug.o)
libs := SFont.o
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 $@ $<
include gfx.mk
clean:
- rm -f *.o vor $(graphics)
+ rm -f *.o vor
+
+maintainer-clean: clean
+ rm -f $(graphics)
install: all
if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi