JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
made bang dots hit rocks, removed blast_rocks function.
[vor.git] / Makefile
index 943059a..42d1fe9 100644 (file)
--- a/Makefile
+++ b/Makefile
 DATA_PREFIX := /usr/share/vor
 PROGRAM_PREFIX := /usr/games/bin
 
-debug := $(if $(DEBUG),-DDEBUG=1)
+CFLAGS := -Wall -ggdb
+LDFLAGS := 
+
 paths := -DDATA_PREFIX=\"$(DATA_PREFIX)\"
 sdl-cflags := $(shell sdl-config --cflags)
 sdl-ldflags := $(shell sdl-config --libs)
 
-ldflags := $(sdl-ldflags) -lSDL_image -lSDL_mixer
-cflags := $(sdl-cflags) $(debug) $(paths) $(CFLAGS)
+ldflags := $(sdl-ldflags) -lSDL_image -lSDL_mixer $(LDFLAGS)
+cflags := $(sdl-cflags) $(paths) $(CFLAGS)
 
-my_objects := args.o file.o rocks.o score.o shape.o sound.o
-my_objects += $(if $(DEBUG),debug.o) main.o
+my_objects := args.o dust.o file.o mt.o rocks.o score.o sprite.o sound.o
+my_objects += main.o
 libs := SFont.o
 objects := $(libs) $(my_objects)
 
@@ -61,7 +63,25 @@ program: vor
 
 $(my_objects): config.h
 
-main.o file.o: file.h
+SFont.o: SFont.h
+
+args.o: args.h
+
+dust.o: globals.h dust.h mt.h
+
+file.o: file.h common.h
+
+main.o: args.h common.h dust.h file.h globals.h mt.h rocks.h score.h sprite.h sound.h
+
+mt.o: mt.h
+
+rocks.o: rocks.h common.h file.h globals.h mt.h sprite.h
+
+score.o: score.h common.h file.h
+
+sound.o: sound.h args.h common.h
+
+sprite.o: sprite.h common.h
 
 vor: $(objects)
        @echo linking $@ from $^
@@ -69,7 +89,11 @@ vor: $(objects)
 
 include gfx.mk
 
+tags: *.c *.h
+       exuberant-ctags *.c *.h /usr/include/SDL/*
+
 clean: program-clean
+       rm -f tags
 
 maintainer-clean: program-clean data-clean
 
@@ -112,8 +136,6 @@ install-data: data
        $(INSTALL_DATA) ./data/music/* $(DATA_PREFIX)/music/
        $(INSTALL_DATA) ./data/sounds/* $(DATA_PREFIX)/sounds/
        $(INSTALL_DATA) ./data/sprites/* $(DATA_PREFIX)/sprites/
-       touch $(DATA_PREFIX)/scores
-       chmod a+rw $(DATA_PREFIX)/scores
 
 uninstall: uninstall-program uninstall-data rminstalldirs
 
@@ -128,4 +150,4 @@ uninstall-data:
        rm -f $(DATA_PREFIX)/music/*
        rm -f $(DATA_PREFIX)/sounds/*
        rm -f $(DATA_PREFIX)/sprites/*
-       rm -f $(DATA_PREFIX)/scores $(DATA_PREFIX)/.highscore
+       rm -f $(DATA_PREFIX)/scores