X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=Makefile;h=42d1fe9e608efd8de252f6f81ed285eddfc23b7f;hp=943059aa6fd8dca7751263f8cc7e54868c464816;hb=0224eb908d4084f52a22c8d64404a0efb4acfa35;hpb=e0fab1bd78914a12ee88f2a9fcfca9f28a1df0f2 diff --git a/Makefile b/Makefile index 943059a..42d1fe9 100644 --- a/Makefile +++ b/Makefile @@ -18,16 +18,18 @@ 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