datarootdir = @datarootdir@
datadir = @datadir@
pkgdatadir = $(datadir)/@PACKAGE_TARNAME@
-bindir = $(exec_prefix)/bin
+bindir = @bindir@
CC = @CC@
CPPFLAGS = @CPPFLAGS@
SDL_LIBS := @SDL_LIBS@
ldflags := $(SDL_LIBS) -lSDL_image -lSDL_mixer $(LDFLAGS)
-cflags := $(SDL_CFLAGS) $(paths) $(CFLAGS)
+cflags := -I. $(SDL_CFLAGS) $(paths) $(CFLAGS)
my_objects := args.@OBJEXT@ dust.@OBJEXT@ file.@OBJEXT@ mt.@OBJEXT@ rocks.@OBJEXT@ score.@OBJEXT@ sprite.@OBJEXT@ sound.@OBJEXT@ autopilot.@OBJEXT@
my_objects += main.@OBJEXT@
.PHONY: mkinstalldirs rminstalldirs
.PHONY: program program-clean install-program uninstall-program
.PHONY: data data-clean install-data uninstall-data
+.PHONY: build-dir-data-link
.INTERMEDIATE: font_guts font_guts.pov
all: program data
-data: $(graphics)
+data: $(graphics) build-dir-data-link
+
+# symbolic link to data dir so you can run the game from the build dir:
+build-dir-data-link:
+ test -e data || ln -s $(srcdir)/data
program: $(exe_name) @PACKAGE_TARNAME@.desktop
font.@OBJEXT@: font.h
-args.@OBJEXT@: args.h
+args.@OBJEXT@: args.h config.h
dust.@OBJEXT@: globals.h dust.h float.h mt.h
file.@OBJEXT@: file.h common.h
-main.@OBJEXT@: args.h common.h dust.h file.h float.h globals.h mt.h rocks.h score.h sprite.h sound.h autopilot.h
+main.@OBJEXT@: args.h common.h config.h dust.h file.h float.h globals.h mt.h rocks.h score.h sprite.h sound.h autopilot.h
mt.@OBJEXT@: mt.h
distclean: clean
rm -f Makefile config.h config.log config.status
-maintainer-clean: program-clean
+maintainer-clean: distclean
+ @echo 'This command is intended for maintainers to use; it'
+ @echo 'deletes files that may need special tools to rebuild.'
rm -f $(graphics) font_guts font_guts.pov
program-clean: