# # Mac OS X Makefile # TOPDIR = .. OPTIMIZATION = -O2 #OPTIMIZATION = -g NETCDF_INCLUDE = /sw/include OSG_INCLUDE = ${OSGHOME}/include LOCAL_INCLUDE = $(TOPDIR)/include GDAL_INCLUDE = `gdal-config --cflags` INCLUDES = -I $(LOCAL_INCLUDE) -I $(NETCDF_INCLUDE) -I $(OSG_INCLUDE) $(GDAL_INCLUDE) CARBON_LIB = -framework Carbon GL_LIBS = -framework OpenGL NETCDF_LIBS = -lnetcdf X_LIBS = -lX11 GDAL_LIBS = `gdal-config --libs` OTHER_LIBS = -lm -lstdc++ -lobjc LIBS += -losg -losgDB -lOpenThreads $(NETCDF_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) $(CARBON_LIB) $(GDAL_LIBS) LIBDIRS = -L/usr/lib -L/usr/X11R6/lib -L/sw/lib -L/usr/local/lib NAME = swwreader TARGET = $(TOPDIR)/bin/lib$(NAME).dylib $(TARGET) : $(NAME).o g++ $(OPTIMIZATION) -dynamiclib -F/System/Library/Frameworks $(LIBDIRS) $(NAME).o $(LIBS) -o $(TARGET) $(NAME).o : $(NAME).cpp $(LOCAL_INCLUDE)/$(NAME).h g++ $(OPTIMIZATION) $(INCLUDES) -c $(NAME).cpp clean : rm -f *.o *~ $(TARGET)