#******************************************************************************/
#*                                                                            */
#* COPYRIGHT:                                                                 */
#* ----------                                                                 */
#* Copyright (C) International Business Machines Corp., 1991,1992.            */
#*                                                                            */
#* DISCLAIMER OF WARRANTIES:                                                  */
#* -------------------------                                                  */
#* The following [enclosed] code is sample code created by IBM                */
#* Corporation.  This sample code is not part of any standard IBM product     */
#* and is provided to you solely for the purpose of assisting you in the      */
#* development of your applications.  The code is provided "AS IS",           */
#* without warranty of any kind.  IBM shall not be liable for any damages     */
#* arising out of your use of the sample code, even if they have been         */
#* advised of the possibility of such damages.                                */
#*                                                                            */
#******************************************************************************/
#--------------------------------------------------------------------------------
#
#      Make the Examples for Collections
#      """""""""""""""""""""""""""""""""
#      Written for use with:
#                               OS:     OS/2 2.0 or later
#                               Make:   nmake
#                               C++:    icc
#-------------------------------------------------------------------------------
#
#  We assume that we have the files of the collection library in following Tree:
#
#                               ..\samples\iclcc   (here we are right now)
#                               ..\ibmclass
#                               ..\lib
#  The environment variable ICLCC points to the root of this tree.
#  When the environment variable ICLCC is not set, we assume we are in the tree.
#
#                                     // The complete tree:
!IF ("$(ICLCC)" == "")
ICLCC=..\..
!ENDIF
#                                     // The include files directory:
ICLCC_INC= -I. -I $(ICLCC)\ibmclass
#                                     // The library file(s):
!IF ("$(ICLCC_LIB)" == "")
ICLCC_LIB=$(ICLCC)\lib\dde4cc.lib
!ENDIF
#
#-------------------------------------------------------------------------------
#
# Options to get Debug Info:
CCDEBUG= -Ti -DIALL_CHECKS
LKDEBUG= -B"/De "
#
# Options for NO Debug Info:
CCDEBUG= -O
LKDEBUG=
#-------------------------------------------------------------------------------
CCFLAGS= -Tdp $(CCDEBUG)
LKFLAGS= -Tdp $(LKDEBUG)
#-------------------------------------------------------------------------------

DefaultTarget:  all

.SUFFIXES: .C .exe .out

# Get the main dependencies from this include file:
# Also these targets are defined there: all, run, clean
!INCLUDE iclccxmp.mak

.C.exe       :
        @echo Contents of variable ICLCC: '$(ICLCC)'
        @echo Contents of variable ICC:   '$(ICC)'
        -del tempinc\*.cpp tempinc\*.obj 2>nul
         icc  $(CCFLAGS) $(LKFLAGS) $(ICLCC_INC)  $*.C  $(ICLCC_LIB)

.exe.out     :
         $*    >    $*.out 2>&1

#
# Sample to demonstrate separation of compile and link:
#
xmulti.exe   : xmulti1.C xmulti2.C xmulti.h
        @echo Contents of variable ICLCC: '$(ICLCC)'
        @echo Contents of variable ICC:   '$(ICC)'
        -del tempinc\*.cpp tempinc\*.obj  2>nul
         icc -c -Ft- $(CCFLAGS) $(ICLCC_INC) xmulti1.C
         icc -c -Ft- $(CCFLAGS) $(ICLCC_INC) xmulti2.C
         icc  $(LKFLAGS) $(ICLCC_INC) -Fe xmulti.exe xmulti1.obj xmulti2.obj  \
              $(ICLCC_LIB)

