#*******************************************************************************
#* SAMPLE PROJECT: msgbox 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\msgbox
#    - 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+
!IFDEF USE_IPF
ICLCPPOPTS=/Gm+ /Gd+ /Gh+ /Ti+ /Fb+ /Q+ /DUSE_IPF
!ENDIF
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:  msgbox.exe msgbox.hlp

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

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

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

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

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

# --- RTP Help ---
!IFNDEF USE_IPF
msgbox.hlp:  msgbox.hpj msgbox.rtf
      $(GHCW) $(GHCWFLAGS) msgbox.hpj
!ENDIF

# --- IPF Help ---
!IFDEF USE_IPF
      $(GIPFC) $(GIPFCFLAGS) msgbox.ipf
!ENDIF


# --- Cleanup ---
clean:
        -$(ERASE) msgbox.exe
        -$(ERASE) msgbox.obj
        -$(ERASE) msgbox.res
        -$(ERASE) msgbox.pdb
        -$(ERASE) msgbox.hlp
        -$(ERASE) msgbox.ph
#        -$(ERASE) msgbox.rc
#        -$(ERASE) msgbox.ico

