###
# $Id: makefile.vc 16675 2010-02-25 17:43:33Z dburken $
#
# Windows nmake make file.  This code should compile with the Microsoft .NET
# compiler.
# 
# Currently for a typical build on windows you would do the following.
# - cd back to the ossim top and edit its nmake.opt file appropriately.
# - nmake /f makefile
#
# NOTE:  If you make shared apps it's handy to copy the ossim.dll to the bin
#        directory. 
###

!INCLUDE ..\nmake.opt
PLUGIN_ROOT = ossim_reg_plugin

###
# Note: EMBED_MANIFEST variable is set in nmake.opt so make sure it is included
# before this test.
###
!if "$(EMBED_MANIFEST)" == "1"
!include ..\makefile.inc
OSSIM_VC_MANIFEST_EMBED_DLL=$(_VC_MANIFEST_EMBED_DLL)
OSSIM_VC_MANIFEST_CLEAN=$(_VC_MANIFEST_CLEAN)
!else
OSSIM_VC_MANIFEST_EMBED_DLL=
OSSIM_VC_MANIFEST_CLEAN=
!endif

###
# FFTW3 includes and libs.  Found at www.fftw.org.
# WINDOWS : use IntelCompiler7 prebuilt binaries (issues with Visual Studio)
###
FFTW_HOME	= D:\vs9\3rd-party
FFTW_LINK	= $(FFTW_HOME)\lib\libfftw3-3.lib $(FFTW_HOME)\lib\libfftw3f-3.lib
# FFTW_LINK=
FFTW_INCLUDES	= -I$(FFTW_HOME)\includes

INC	=	-I. $(INC) $(FFTW_INCLUDES)
LINK	=	link
LFLAGS	=	/NOLOGO /SUBSYSTEM:WINDOWS /LIBPATH:"$(OSSIM_HOME)\lib" $(SHARED_OSSIM_LINK) $(FFTW_LINK) 

OBJ	= 	ossimRegistrationPluginInit.obj \
		ossimOutlierRejection.obj \
		ossimTieGenerator.obj \
		ossimModelOptimizer.obj \
		ossimRunningSum.obj \
		ossimHarrisCorners.obj \
		ossimRegistrationImageSourceFactory.obj \
		ossimMultiplier.obj \
		ossimNCC_FFTW.obj \
		ossimDensityReducer.obj \
		ossimChipMatch.obj \
		ossimSquareFunction.obj \
		ossimExtremaFilter.obj \
		ossimRegistrationMiscFactory.obj \
		ossimImageCorrelator.obj

default:	$(OBJ)
	link /VERSION:1.7.2 /DLL /OUT:"$(PLUGIN_ROOT).dll" /IMPLIB:"$(PLUGIN_ROOT).lib" $(OBJ) $(LFLAGS)

install:
	$(CP) $(PLUGIN_ROOT).dll $(INSTALL_DIR)

clean:
	$(RM) *.obj
	$(RM) $(LIB_DIR)\$(PLUGIN_ROOT).*
