##
##               INTEL CORPORATION PROPRIETARY INFORMATION
##  This software is supplied under the terms of a license agreement or
##  nondisclosure agreement with Intel Corporation and may not be copied
##  or disclosed except in accordance with the terms of that agreement.
##  Copyright(C) 2001-2003, Intel Corporation. All Rights Reserved.
##
## File    : makefile
## Purpose : Intel(R) Math Kernel Library VML examples creation and run
##
##------------------------------------------------------------------------------
## examples of using:
## "nmake ia32 function=vssin+   - build and run VSSIN example for 32-bit
##                                 applications
## "nmake ia32 TYPE=dll"         - build and run examples with DLL version of MKL
##                                 for 32-bit applications
## "nmake ipf target=exe"        - build examples of MKL for Itanium(R)-based
##                                 applications
## "nmake ipf TYPE=dll"          - run examples with DLL version of MKL for
##                                 Itanium(R)-based applications
#===============================================================================
!INCLUDE vml.lst

!  ifndef function
function = $(VML)
!  endif

!  ifndef target
target = res
!  endif

EXE32 = nmake /nologo -f make_exe E="$(function)" T=$(target) IA=32
EXE64 = nmake /nologo -f make_exe E="$(function)" T=$(target) IA=64
#===============================================================================
# Main targets
#===============================================================================
!  if "$(TYPE)"=="dll" || "$(type)"=="dll"
ia32:
	$(EXE32) PROC=ia32 LD=dynamic MKL_LIB=mkl_s_dll+ F=cvf
ipf:
	$(EXE64) PROC=ipf LD=dynamic MKL_LIB=mkl_dll+ F=intel
!  else
ia32:
	$(EXE32) PROC=ia32 LD=static MKL_LIB=mkl_s+ F=cvf
ipf:
	$(EXE64) PROC=ipf LD=static MKL_LIB=mkl_ipf+ F=intel
!  endif
#===============================================================================
# Additional targets
#===============================================================================
!  if "$(TYPE)"=="dll" || "$(type)"=="dll"
ia32_intel:
	$(EXE32) PROC=ia32 LD=dynamic MKL_LIB=mkl_c_dll+ F=intel
def:
	$(EXE32) PROC=def LD=dynamic MKL_LIB=mkl_s_dll+ F=cvf
p3:
	$(EXE32) PROC=p3 LD=dynamic MKL_LIB=mkl_s_dll+ F=cvf
p4:
	$(EXE32) PROC=p4 LD=dynamic MKL_LIB=mkl_s_dll+ F=cvf
def_intel:
	$(EXE32) PROC=def LD=dynamic MKL_LIB=mkl_c_dll+ F=intel
p3_intel:
	$(EXE32) PROC=p3 LD=dynamic MKL_LIB=mkl_c_dll+ F=intel
p4_intel:
	$(EXE32) PROC=p4 LD=dynamic MKL_LIB=mkl_c_dll+ F=intel
itp:
	$(EXE64) PROC=itp LD=dynamic MKL_LIB=mkl_dll+ F=intel
i2p:
	$(EXE64) PROC=i2p LD=dynamic MKL_LIB=mkl_dll+ F=intel
!  else
ia32_intel:
	$(EXE32) PROC=ia32 LD=static MKL_LIB=mkl_c+ F=intel
def:
	$(EXE32) PROC=def LD=static MKL_LIB=mkl_s+ F=cvf
p3:
	$(EXE32) PROC=p3 LD=static MKL_LIB=mkl_s+ F=cvf
p4:
	$(EXE32) PROC=p4 LD=static MKL_LIB=mkl_s+ F=cvf
def_intel:
	$(EXE32) PROC=def LD=static MKL_LIB=mkl_c+ F=intel
p3_intel:
	$(EXE32) PROC=p3 LD=static MKL_LIB=mkl_c+ F=intel
p4_intel:
	$(EXE32) PROC=p4 LD=static MKL_LIB=mkl_c+ F=intel
itp:
	$(EXE64) PROC=itp LD=static MKL_LIB=mkl_ipf+ F=intel
i2p:
	$(EXE64) PROC=i2p LD=static MKL_LIB=mkl_ipf+ F=intel
!  endif
#===============================================================================
clean:
	if exist _results32 rd /q /s _results32
	if exist _results64 rd /q /s _results64
 