1# HighMoon - Duel in Space 2# Copyright (c) 2005, 2006 Patrick Gerdsmeier <patrick@gerdsmeier.net> 3 4# __Something like /usr/local/share/highmoon. All Files (Data and Binary) will be copied there:__ 5INSTALLPATH=/home/pat/Programme/Spiele/HighMoon 6 7# __Set this to a bin-Path. The Installer will create a small Execution-Script in that Path:__ 8INSTALLBIN=/home/pat/Programme/Spiele/bin 9 10CACHE = #ccache # use http://ccache.samba.org to speedup compiling 11CXX = $(CACHE) g++ 12CXXFLAGS = -g -O3 -Wall `sdl-config --cflags` 13LDFLAGS = #-static -s 14LIBS = -L. `sdl-config --libs` -lSDL_image 15#LIBS = -L. `sdl-config --static-libs` -lSDL_image -lpng -ljpeg -lz -lm 16SRCDIR = src 17BIN = ufo 18 19OBJS = $(SRCDIR)/main.o $(SRCDIR)/vector_2.o $(SRCDIR)/language.o $(SRCDIR)/sound.o $(SRCDIR)/graphics.o $(SRCDIR)/object.o $(SRCDIR)/galaxy.o $(SRCDIR)/shoot.o 20 21all: $(BIN) 22 23$(BIN): $(OBJS) 24 $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS) 25 26clean: 27 @echo "Removing Backup- and Object-Files." 28 @rm -f $(SRCDIR)/*.o 29 @rm -f $(SRCDIR)/*~ 30 @rm -f *~ 31 32new: clean all 33 34install: 35 @echo -n "Installing HighMoon v" 36 @cat VERSION 37 @echo "Path to Install: $(INSTALLPATH)" 38 @echo "Creating Directories and Installing Files." 39 @mkdir -p $(INSTALLBIN) 40 @mkdir --mode=755 -p $(INSTALLPATH)/gfx $(INSTALLPATH)/snd 41 @install --strip --mode=755 $(BIN) $(INSTALLPATH) 42 @install --mode=644 gfx/* $(INSTALLPATH)/gfx 43 @install --mode=644 snd/* $(INSTALLPATH)/snd 44 @echo "Creating $(INSTALLBIN)/highmoon to run HighMoon." 45 @echo >$(INSTALLBIN)/highmoon '#!/bin/sh' 46 @echo >>$(INSTALLBIN)/highmoon 'cd $(INSTALLPATH)' 47 @echo >>$(INSTALLBIN)/highmoon './$(BIN) $$1' 48 @chmod 755 $(INSTALLBIN)/highmoon 49 50uninstall: 51 @echo -n "Uninstalling HighMoon v" 52 @cat VERSION 53 @echo "Removing Files and Directories." 54 @rm -f $(INSTALLBIN)/highmoon 55 @rm -f -r $(INSTALLPATH) 56