-clean:
- rm -f *.o vor $(graphics)
-
-install: all
- if [ ! -d $(DATA_PREFIX) ]; then mkdir $(DATA_PREFIX); fi
- if [ ! -d $(DATA_PREFIX)/banners ]; then mkdir $(DATA_PREFIX)/banners; fi
- if [ ! -d $(DATA_PREFIX)/fonts ]; then mkdir $(DATA_PREFIX)/fonts; fi
- if [ ! -d $(DATA_PREFIX)/icons ]; then mkdir $(DATA_PREFIX)/icons; fi
- if [ ! -d $(DATA_PREFIX)/indicators ]; then mkdir $(DATA_PREFIX)/indicators; fi
- if [ ! -d $(DATA_PREFIX)/music ]; then mkdir $(DATA_PREFIX)/music; fi
- if [ ! -d $(DATA_PREFIX)/sounds ]; then mkdir $(DATA_PREFIX)/sounds; fi
- if [ ! -d $(DATA_PREFIX)/sprites ]; then mkdir $(DATA_PREFIX)/sprites; fi
-
- $(INSTALL_PROGRAM) ./vor $(PROGRAM_PREFIX)
- $(INSTALL_DATA) ./data/banners/* $(DATA_PREFIX)/banners/
- $(INSTALL_DATA) ./data/fonts/* $(DATA_PREFIX)/fonts/
- $(INSTALL_DATA) ./data/icons/* $(DATA_PREFIX)/icons/
- $(INSTALL_DATA) ./data/indicators/* $(DATA_PREFIX)/indicators/
- $(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:
- rm -f $(PROGRAM_PREFIX)/vor
- rm -f $(DATA_PREFIX)/banners/*
- rm -f $(DATA_PREFIX)/fonts/*
- rm -f $(DATA_PREFIX)/icons/*
- rm -f $(DATA_PREFIX)/indicators/*
- rm -f $(DATA_PREFIX)/music/*
- rm -f $(DATA_PREFIX)/sounds/*
- rm -f $(DATA_PREFIX)/sprites/*
- rm -f $(DATA_PREFIX)/scores $(DATA_PREFIX)/.highscore
-
- if [ -d $(DATA_PREFIX)/banners ]; then rmdir $(DATA_PREFIX)/banners; fi
- if [ -d $(DATA_PREFIX)/fonts ]; then rmdir $(DATA_PREFIX)/fonts; fi
- if [ -d $(DATA_PREFIX)/icons ]; then rmdir $(DATA_PREFIX)/icons; fi
- if [ -d $(DATA_PREFIX)/indicators ]; then rmdir $(DATA_PREFIX)/indicators; fi
- if [ -d $(DATA_PREFIX)/music ]; then rmdir $(DATA_PREFIX)/music; fi
- if [ -d $(DATA_PREFIX)/sounds ]; then rmdir $(DATA_PREFIX)/sounds; fi
- if [ -d $(DATA_PREFIX)/sprites ]; then rmdir $(DATA_PREFIX)/sprites; fi
- if [ -d $(DATA_PREFIX) ]; then rmdir $(DATA_PREFIX); fi
+tags: *.c *.h
+ exuberant-ctags *.c *.h /usr/include/SDL/*
+
+clean: program-clean
+ rm -f tags
+
+maintainer-clean: program-clean data-clean
+
+program-clean:
+ rm -f *.o vor
+
+data-clean:
+ rm -f $(graphics) font_guts font_guts.pov
+
+mkinstalldirs:
+ if [ ! -d $(DESTDIR)$(pkgdatadir) ]; then mkdir $(DESTDIR)$(pkgdatadir); fi
+
+rminstalldirs:
+ if [ -d $(DESTDIR)$(pkgdatadir) ]; then rmdir $(DESTDIR)$(pkgdatadir); fi
+
+install: all mkinstalldirs install-program install-data
+
+install-program: program
+ $(INSTALL_PROGRAM) ./vor $(DESTDIR)$(bindir)
+
+install-data: data
+ $(INSTALL_DATA) ./data/*.png $(DESTDIR)$(pkgdatadir)/
+ $(INSTALL_DATA) ./data/*.wav $(DESTDIR)$(pkgdatadir)/
+ $(INSTALL_DATA) ./data/*.xm $(DESTDIR)$(pkgdatadir)/
+ @echo
+ @echo "$(pkgdatadir)/icon.png (48x48) or ship.png (32x32) make good icons."
+ @echo
+
+uninstall: uninstall-program uninstall-data rminstalldirs
+
+uninstall-program:
+ rm -f $(DESTDIR)$(bindir)/vor
+
+uninstall-data:
+ rm -f $(DESTDIR)$(pkgdatadir)/*.png
+ rm -f $(DESTDIR)$(pkgdatadir)/*.wav
+ rm -f $(DESTDIR)$(pkgdatadir)/*.xm