#### # $Id$ # # Typical build with .net compiler using nmake # cd to: "ossim/src/packages" # unzip and untar the file gdal.tgz # set the environment variable OSSIM_HOME # cd to the top of ossim # nmake /f makefile.vc # # Edit this file as required. # # NOTE: # # You should either set the environment variable "OSSIM_HOME" or uncomment and # set it in this file for include paths and linking. Since external packages # such as ossim_qt looks for the environment variable, it is preferable to set # the environment variable to setting it in this file. # # See: "Start->Control Panel->System->Advanced->Environment Variables" (XP) # to set the environment variables. ### # OSSIM_HOME = C:\drb\ossim CORE_DIR = $(OSSIM_HOME)\src\ossim_core BINDIR = $(OSSIM_HOME)\bin BIN_DIR = $(OSSIM_HOME)\bin ### # Plugin home. ### OSSIM_PLUGINS_HOME = c:\drb\ossim_plugins OSSIM_PLUGINS_INCLUDES = -I$(OSSIM_PLUGINS_HOME) ### # Library directories. ### LIBDIR = $(OSSIM_HOME)\lib LIB_DIR = $(OSSIM_HOME)\lib ### # OSSIM libraries ### OSSIM_LIB = ossim.lib ### # JPEG support. This can be from gdal or external but one or the other is # mandatory. ### JPEG_DIR = c:\drb\jpeg\jpeg-6b JPEG_INC = -I$(JPEG_DIR) JPEG_LIB = $(JPEG_DIR)\libjpeg.lib ### # TIFF support. ### TIFF_DIR = c:\drb\libtiff\libtiff TIFF_INC = -I$(TIFF_DIR) TIFF_LIB = $(TIFF_DIR)\libtiff.lib ### # Optional geotiff support. ### GEOTIFF_DEFINE =/DGEOTIFF_ENABLED GEOTIFF_DIR = c:\drb\geotiff\libgeotiff GEOTIFF_INC = -I$(GEOTIFF_DIR) -I$(GEOTIFF_DIR)\libxtiff GEOTIFF_LIB = $(GEOTIFF_DIR)\geotiff.lib ### # Optional freetype support. ### FREETYPE_DEFINE =/DFREETYPE_SETTING=1 FREETYPE_DIR = c:\drb\freetype\freetype FREETYPE_INC = -I$(FREETYPE_DIR)\include FREETYPE_LIB = $(FREETYPE_DIR)\objs\.libs\libfreetype.a ### # Optional png support. ### PNG_DIR = c:\drb\png\lpng128 PNG_LIB = $(PNG_DIR)\libpng.lib ### # GDAL support. ### GDAL_DIR = c:\drb\gdal GDAL_INC = -I$(OSSIM_PLUGINS_HOME)\gdal -I$(GDAL_DIR)\gcore -I$(GDAL_DIR)\frmts\mem -I$(GDAL_DIR)\port -I$(GDAL_DIR)\ogr -I$(GDAL_DIR)\ogr\ogrsf_frmts GDAL_LIBS = $(GDAL_DIR)\gdal.lib INC = $(OSSIM_PLUGINS_INCLUDES) -I$(OSSIM_HOME)\src -I$(OSSIM_HOME)\src\ossim_core $(GEOTIFF_INC) $(TIFF_INC) $(JPEG_INC) $(FREETYPE_INC) $(GDAL_INC) ### # Uncomment the first for an optimized build or the second for a debug build. ### OPTIONAL_DEFINES = /D_FILE_OFFSET_BITS=64 /D_LARGE_FILES /DMPI_SETTING=0 /DHAS_OPEN_THREADS=0 $(GEOTIFF_DEFINE) $(FREETYPE_DEFINE) /DHAVE_CONFIG_H CDEBUGFLAGS = OPTFLAGS = /nologo /MD /EHsc $(CDEBUGFLAGS) $(OPTIONAL_DEFINES) OBJ_OPT_FLAGS = $(OPTFLAGS) /DOSSIMUSINGDLL SHARED_APP_OPT_FLAGS = $(OPTFLAGS) /DOSSIMUSINGDLL STATIC_APP_OPT_FLAGS = $(OPTFLAGS) MAKE = nmake CC = cl ### # External stuff ossim links with. ### LINK_EXTERNALS = $(GEOTIFF_LIB) $(TIFF_LIB) $(JPEG_LIB) $(FREETYPE_LIB) ### # Link line for making single ossim library. ### OSSIM_LIB_LINK = $(LINK_EXTERNALS) ### # Static link line for apps. ### STATIC_OSSIM_LINK = /link /LIBPATH:$(LIB_DIR) $(LINK_OSSIM) $(GEOTIFF_LIB) $(TIFF_LIB) $(JPEG_LIB) $(FREETYPE_LIB) ### # Shared link. ### SHARED_OSSIM_LINK = $(LIB_DIR)\ossim.lib ### # Use this to link apps static or shared. ### # OSSIM_LINK = $(STATIC_OSSIM_LINK) # APP_CFLAGS = $(STATIC_APP_OPT_FLAGS) $(INC) $(EXTRAFLAGS) OSSIM_LINK = $(SHARED_OSSIM_LINK) APP_CFLAGS = $(SHARED_APP_OPT_FLAGS) $(INC) $(EXTRAFLAGS) ### # CFLAGS usually left alone. ### CFLAGS = $(OBJ_OPT_FLAGS) $(INC) $(EXTRAFLAGS) #### # Some rules... These are what the ossim_core is built with by default. ### .c.obj: $(CC) $(CFLAGS) /c $*.c .cpp.obj: $(CC) $(CFLAGS) /c $*.cpp ### # Some commands: ### MKDIR = -mkdir RMDIR = rmdir /S /Q RM = del /F /Q CP = copy