#*******************************************************************************
#* SAMPLE PROJECT: cnr Makefile for Windows                                    *
#*                                                                             *
#* COPYRIGHT:                                                                  *
#* ----------                                                                  *
#* Copyright (C) International Business Machines Corp., 1992,1996.             *
#*                                                                             *
#* 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 file assumptions:
#    - Environment variable INCLUDE contains paths to:
#       IBM Compiler target_directory\include;
#       IBM Developer's Toolkit target_directory include paths
#    - Environment variable LIB contains paths to:
#       IBM Compiler target_directory\lib;
#       IBM Developer's Toolkit target_directory lib paths
#    - Current directory contains source files. Originals are in:
#        IBM Compiler target_directory\samples\ioc\cnr
#    - current directory will be used to store:
#        object, executable, and resource files

# --- Tool defintions ---
ERASE=ERASE
GCPPC=ICC
GLINK=ICC
GRC=IRC
GRCV=IRCCNV
GIPFC=IPFC
GHCW=HCW
GIPFCVIEW=IVIEW
GIMAGE=IBMPCNV

# --- Tool flags ---
ICLCPPOPTS=/Gm+ /Gd+ /Gh+ /Ti+ /Fb+ /Q+
GCPPFLAGS=$(LOCALOPTS) $(ICLCPPOPTS)
GCPPLFLAGS=/Tdp /B"/pmtype:pm /debug /browse"
GPERFOBJ=cppwpa3.obj
GRCFLAGS=-DIC_WIN
GRCVFLAGS=
GIPFCFLAGS=/q
GHCWFLAGS=/c /e
GIMAGEFLAGS=

# --- Body ---
all:  cnr.exe

cnr.exe:  acnr.obj acnr.res
      $(GLINK) $(GCPPLFLAGS) $(GCPPFLAGS) /Fe"cnr.exe" \
      acnr.obj $(GPERFOBJ) acnr.res

acnr.obj:  acnr.cpp acnr.hpp acnr.h
      $(GCPPC) /C+ $(GCPPFLAGS) acnr.cpp

acnr.res:  acnr.rc acnr.h mesa.ico brazil.ico cpp2.ico os2logo.ico wklogo.ico
      $(GRC) $(GRCFLAGS) acnr.rc

acnr.rc:  acnr.rcx
      $(GRCV) $(GRCVFLAGS) acnr.rcx acnr.rc

mesa.ico:  mesa.icx
      $(GIMAGE) -I $(GIMAGEFLAGS) mesa.icx mesa.ico

brazil.ico:  brazil.icx
      $(GIMAGE) -I $(GIMAGEFLAGS) brazil.icx brazil.ico

cpp2.ico:  cpp2.icx
      $(GIMAGE) -I $(GIMAGEFLAGS) cpp2.icx cpp2.ico

os2logo.ico:  os2logo.icx
      $(GIMAGE) -I $(GIMAGEFLAGS) os2logo.icx os2logo.ico

wklogo.ico:  wklogo.icx
      $(GIMAGE) -I $(GIMAGEFLAGS) wklogo.icx wklogo.ico


# --- Cleanup ---
clean:
        -$(ERASE) cnr.exe
        -$(ERASE) acnr.obj
        -$(ERASE) acnr.pdb
        -$(ERASE) acnr.res
#        -$(ERASE) acnr.rc
#        -$(ERASE) mesa.ico
#        -$(ERASE) brazil.ico
#        -$(ERASE) cpp2.ico
#        -$(ERASE) os2logo.ico
#        -$(ERASE) wklogo.ico

