##
##               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    : make_exe
## Purpose : support for makefile
##
#===============================================================================
!INCLUDE fftf.lst

build: install $T

exe: $(FFT_AUX:+=) $(E:+=.obj) cd_exe $(E:+=.exe)

res: exe md_res $(E:+=.res)

install:
	set path=..\..\..\..\..\ia$(IA)\bin;%%path%%
	set lib=..\..\..\..\..\ia$(IA)\lib;%%lib%%
	set include=..\..\..\..\include;%%include%%
	if not exist _results$(IA) md _results$(IA)
	cd _results$(IA)
	if not exist $F md $F
	cd $F
cd_exe:
	if not exist $(LD) md $(LD)
	cd $(LD)
md_res:
	if not exist $(PROC) md $(PROC)
#------------------------------------------------------------------------------
CCOMPILER = cl /Gz
FCOMPILER = df
FOPTS_OBJ = /c /nowarn /threads /fltconsistency

!  IF "$F"=="intel" && "$(IA)"=="32"
FCOMPILER = ifl
CCOMPILER = icl
FOPTS_OBJ = /c /w /MT /Dia$(IA)
!  ENDIF
!  IF "$F"=="intel" && "$(IA)"=="64"
FCOMPILER = efl
CCOMPILER = ecl
FOPTS_OBJ = /c /w /MT /Dia$(IA)
!  ENDIF
#------------------------------------------------------------------------------
.SUFFIXES:: .f .c .obj .exe .res

{..\..\source}.c.obj:
	$(CCOMPILER) /c /w /MT /Dia$(IA) $<

{..\..\source}.f.obj:
	$(FCOMPILER) $(FOPTS_OBJ) $<

{..\}.obj.exe:
	-$(CCOMPILER) /Fm /Fe $< $(FFT_AUX:+=..\) $(MKL_LIB:+=.lib)

.exe.res:
	$< <..\..\..\in\$(@B).in
	if exist $(@B).sum copy $(@B).sum $(PROC)\$@ & del $(@B).s??
