#*******************************************************************************
#* SAMPLE PROJECT: hello2 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\hello2
#    - 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:  hello2.exe

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

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

ahellow2.res:  ahellow2.rc ahellow2.h ahellow2.ico
      $(GRC) $(GRCFLAGS) ahellow2.rc

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

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


# --- Cleanup ---
clean:
        -$(ERASE) hello2.exe
        -$(ERASE) ahellow2.obj
        -$(ERASE) ahellow2.pdb
        -$(ERASE) ahellow2.res
#        -$(ERASE) ahellow2.rc
#        -$(ERASE) ahellow2.ico

