Blob Blame History Raw
diff -Naupr starfighter-1.1.orig/makefile starfighter-1.1/makefile
--- starfighter-1.1.orig/makefile	2003-08-18 14:48:23.000000000 +0200
+++ starfighter-1.1/makefile	2007-06-14 14:49:45.000000000 +0200
@@ -1,21 +1,21 @@
-CFLAGS = `sdl-config --cflags` -Wall -DLINUX
+OPTFLAGS = -O3
+CFLAGS = `sdl-config --cflags` -Wall -DLINUX $(OPTFLAGS)
 LIBS = `sdl-config --libs` -lSDL_mixer -lSDL_image
 OBJS = ai.o aliens.o audio.o bullets.o cargo.o collectable.o comms.o debris.o events.o explosions.o game.o globals.o graphics.o init.o intermission.o loadSave.o messages.o misc.o missions.o player.o resources.o script.o shop.o Starfighter.o title.o unpack.o weapons.o
 
 VERSION = 1.1
 PROG = starfighter
 PACK = starfighter.pak
-DOCS = docs/*
 
-BINDIR = /usr/games/
-DATADIR = /usr/share/games/parallelrealities/
-DOCDIR = /usr/share/doc/starfighter/
+PREFIX = /usr
+BINDIR = $(PREFIX)/bin/
+DATADIR = $(PREFIX)/share/starfighter/
 # top-level rule to create the program.
 all: $(PROG)
 
 # compiling other source files.
 %.o: code/%.cpp code/%.h code/structs.h code/defs.h code/classes.h
-	$(CXX) $(CFLAGS) -c -O3 -DVERSION=\"$(VERSION)\" -DPACKLOCATION=\"$(DATADIR)$(PACK)\" $<
+	$(CXX) $(CFLAGS) -c -DVERSION=\"$(VERSION)\" -DPACKLOCATION=\"$(DATADIR)$(PACK)\" $<
 
 # linking the program.
 $(PROG): $(OBJS)
@@ -30,8 +30,6 @@ distclean:
 
 # install
 install:
-	mkdir -p $(DATADIR)
-	strip $(PROG)
-	install -o root -g games -m 755 $(PROG) $(BINDIR)$(PROG)
-	install -o root -g games -m 644 $(PACK) $(DATADIR)$(PACK)
-	cp $(DOCS) $(DOCDIR)
+	mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)
+	install -m 755 $(PROG) $(DESTDIR)$(BINDIR)$(PROG)
+	install -m 644 $(PACK) $(DESTDIR)$(DATADIR)$(PACK)