JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
bump version to 0.5.8
[vor.git] / Makefile.in
index 61d5dfe..aa1cd0a 100644 (file)
@@ -25,7 +25,7 @@ exec_prefix = @exec_prefix@
 datarootdir = @datarootdir@
 datadir = @datadir@
 pkgdatadir = $(datadir)/@PACKAGE_TARNAME@
-bindir = $(exec_prefix)/bin
+bindir = @bindir@
 
 CC = @CC@
 CPPFLAGS = @CPPFLAGS@
@@ -40,11 +40,11 @@ exe_name = @PACKAGE_TARNAME@@EXEEXT@
 
 
 paths := -DDATA_PREFIX=\"$(pkgdatadir)\"
-SDL_CFLAGS := @SDL_CFLAGS@
-SDL_LIBS := @SDL_LIBS@
+SDL_CFLAGS := @SDL_CFLAGS@ @SDL_MIXER_CFLAGS@ @SDL_IMAGE_CFLAGS@
+SDL_LIBS := @SDL_LIBS@ @SDL_MIXER_LIBS@ @SDL_IMAGE_LIBS@
 
-ldflags := $(SDL_LIBS) -lSDL_image -lSDL_mixer $(LDFLAGS)
-cflags := $(SDL_CFLAGS) $(paths) $(CFLAGS)
+ldflags := $(SDL_LIBS) $(LDFLAGS) -lm
+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@
@@ -68,12 +68,17 @@ INSTALL_DATA := $(INSTALL) -m 644
 .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
 
@@ -84,13 +89,13 @@ $(my_objects): vorconfig.h
 
 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
 
@@ -119,7 +124,9 @@ clean: program-clean
 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: