# IBM Visualage C++ 3.0

.SUFFIXES: .res .rc .obj .asm .c .cpp

MFLAGS     = -nologo
MDUMMY     =

OBJ        = .obj
CO         = .obj
LBI        = .lib
LBO        = .lib
RES        = .res

CC         = icc
CFLAGS     = -Ss -Q -Gm -Gd+ -W3 -DOS2 -DNOSYSTEMSTATICMEMBER -Wdcl -Wenu
CFLAGS_DLL = -Ge- -DLL
CFLAGS_DBG = -Ti -Tx -DDEBUG=$(DEBUG)
CFLAGS_MEM = -Tm
CFLAGS_OPT = -Gf -Gi -O -G5

CL         = ilink
LFLAGS     = /NOL /NOE
LFLAGS_DLL = /DLL
LFLAGS_PM  = /PM:PM
LFLAGS_IO  = /PM:VIO
LFLAGS_DBG = /DEB
LFLAGS_OPT = /PACKC /PACKD /OPTF /EXEP:2
LFLAGS_OUT = /OUT:
LDEF_PREFX =
LDEF_SUFFX = _icc.def
LOBJ_PREFX =
LOBJ_SUFFX =
LLIB_PREFX =
LLIB_SUFFX =

AS         = nasm
AFLAGS     = -fobj

LB         = ilib /nobackup /quiet /nologo /noi
LBENDL     = ;

LI         = implib /nologo /noi
IFLAGS_OUT =

RC         = rc
RFLAGS     = -n

!ifdef TCP40
LIBS_TCP = so32dll.lib tcp32dll.lib
MFLAGS   = $(MFLAGS) TCP40=Yes
CFLAGS   = $(CFLAGS) -DTCPV40HDRS
!else
LIBS_TCP = tcpip32.lib
!endif

LIBS_MM  = mmpm2.lib
LIBS_UNI = libconv.lib libuls.lib
INCLUDE  = $(INCDIR);$(INCLUDE)

!ifdef EXE_PM
LFLAGS = $(LFLAGS) $(LFLAGS_PM)
!endif
!ifdef EXE_IO
LFLAGS = $(LFLAGS) $(LFLAGS_IO)
!endif

!ifdef DEBUG
CFLAGS = $(CFLAGS) $(CFLAGS_DBG)
LFLAGS = $(LFLAGS) $(LFLAGS_DBG)
MFLAGS = $(MFLAGS) DEBUG=$(DEBUG)
!else
CFLAGS = $(CFLAGS) $(CFLAGS_OPT)
LFLAGS = $(LFLAGS) $(LFLAGS_OPT)
!endif

!ifdef DEBUG_ALLOC
CFLAGS = $(CFLAGS) $(CFLAGS_MEM)
MFLAGS = $(MFLAGS) DEBUG_ALLOC=Yes
!endif

!ifdef DLL
CFLAGS = $(CFLAGS) $(CFLAGS_DLL)
LFLAGS = $(LFLAGS) $(LFLAGS_DLL)
!endif

.c.obj:
	$(CC) $(CFLAGS) -c $<

.cpp.obj:
	$(CC) $(CFLAGS) -c $<

.rc.res:
	$(RC) $(RFLAGS) -r $<

.asm.obj:
	$(AS) $(AFLAGS) $<
