--- Makefile.orig Thu Jul 29 14:17:13 2004 +++ Makefile Sun Jul 22 14:27:56 2007 @@ -1,10 +1,7 @@ -CC=g++ -CFLAGS=`sdl-config --cflags` #-g -Wall #-O2 -#CFLAGS=`sdl-config --cflags` -I./physfs#-g -Wall #-O2 +CXXFLAGS += -I${LOCALBASE}/include `${SDL_CONFIG} --cflags` OBJS := ${patsubst %.cpp, %.o, ${wildcard src/*.cpp}} -LIBS = -s -Bstatic `sdl-config --static-libs` -lSDL_image -lSDL_ttf -L. -lphysfs -lopenal -Bdynamic -lGL -lGLU +LIBS = -L${LOCALBASE}/lib `${SDL_CONFIG} --libs` -lSDL_image -lSDL_ttf -lphysfs -lopenal -lalut -lGL -lGLU #LIBS = -s -Bstatic `sdl-config --static-libs` SDL_image/*.o SDL_ttf/*.o -L. physfs/*.o openal/*.o -ljpeg -lpng -ltiff -lfreetype -Bdynamic -lGL -lGLU -PREFIX=/usr/local BINDIR=$(PREFIX)/bin/ DATADIR=$(PREFIX)/share/excido/ @@ -16,21 +13,21 @@ .cpp.o: - $(CC) $(CFLAGS) $(DEFINES) -o ${patsubst %.cpp, %.o, $<} -c $< + $(CXX) $(CXXFLAGS) $(DEFINES) -o ${patsubst %.cpp, %.o, $<} -c $< all: $(TARGET) $(TARGET): $(OBJS) - $(CC) $(CFLAGS) -o $(TARGET) $(LIBS) $(OBJS) + $(CXX) $(LDFLAGS) -o $(TARGET) $(LIBS) $(OBJS) clean: rm -f $(OBJS) $(TARGET) install: [ -d $(BINDIR) ] || mkdir $(BINDIR) - $(INSTALL) -m 755 $(TARGET) $(BINDIR) + $(BSD_INSTALL_PROGRAM) $(TARGET) $(BINDIR) [ -d $(DATADIR) ] || mkdir $(DATADIR) - $(INSTALL) -m 644 data/* $(DATADIR) + $(BSD_INSTALL_DATA) data/* $(DATADIR) uninstall: rm $(BINDIR)$(TARGET)