# # Mac OS X Makefile # TOPDIR = .. #OPTIMIZATION = -O2 OPTIMIZATION = -g OSG_INCLUDE = ${OSGHOME}/include LOCAL_INCLUDE = $(TOPDIR)/include INCLUDES = -I . -I $(LOCAL_INCLUDE) -I $(OSG_INCLUDE) -I/usr/X11R6/include CARBON_LIB = -framework Carbon GL_LIBS = -framework OpenGL X_LIBS = -lX11 OTHER_LIBS = -lm -lstdc++ LIBS += -losg -losgText -losgProducer -losgDB -losgUtil -losgGA \ -lOpenThreads -lProducer -lSWWReader \ $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) $(CARBON_LIB) LIBDIRS = -L/usr/lib -L/usr/X11R6/lib -L/sw/lib -L/usr/local/lib -L$(TOPDIR)/bin NAME = swollen TARGETDIR = $(TOPDIR)/bin TARGET = $(TARGETDIR)/$(NAME) COMPILER = g++ OBJ = customviewer.o hud.o keyboardeventhandler.o watersurface.o main.o version.o \ bedslope.o createSky.o customtrackball.o customterrainmanipulator.o spotlight.o \ directionallight.o state.o customviewereventhandler.o customargumentparser.o \ animation.o CPPFLAGS = -F/System/Library/Frameworks -Wall -DDARWIN_QUICKTIME \ $(OPTIMIZATION) %.o : %.cpp $(COMPILER) -c $(INCLUDES) $(CPPFLAGS) $< -o $@ $(TARGET) : $(OBJ) g++ $(CPPFLAGS) $(LIBDIRS) $(OBJ) $(LIBS) -o $(TARGET) .PHONY : version.cpp # on every build, recreate version() string based on SVN revision number version.cpp: echo -n 'const char* version() { const char* s = "Revision: ' > version.cpp svnversion -n . >> version.cpp echo '"; return s; }' >> version.cpp clean : rm -f *.o *~ $(TARGET)