#===================================================================
#
#                           XComp/2 Makefile
#
#               Copyright (C) by Stangl Roman, 1999, 2000              
#  This Code may be freely distributed, provided the Copyright isn't
#  removed, under the conditions indicated in the documentation.
#
#   supports: Compiler: IBM C Set++ V2.1
#                       IBM VisualAge C++ V3.0
#             Toolkit : IBM Developers Toolkit 2.1
#                       IBM Warp 3 Developers Toolkit
#                       IBM Warp 4 Developers Toolkit
#                       IBM Warp 4.5 Developers Toolkit
#
#===================================================================

# ICC Flags
#   /Tdp    C++
#   /Ti     Include debug information for IPMD
#   /Kb     Warning, if no prototypes found (prevents from incorrect params)
#   /c      Compile only, we link more than one ressource
#   /Se     Allow IBM C language extentions and migration
#   /Ms     Set the default linkage to _System
#   /Re     Produce Code in IBM C Set/2 Run Time environment
#   /Rn     No language environment. Allow system programming and subsystem development
#   /ss     Allow // as comments
#   /Gm     Link with multitasking libraries, because we're multithreaded
#   /Gn     Do not generate default libraries in object
#   /Ge-    Link with libraries that assume a DLL
#   /Gs     Remove stack probes
#   /O      Turn on code optimization (turns also function inlining on)
#   /Oi     Turn on function inlining
#   /Oc     Optimize for speed and size
#   /G5     Optimize for Pentium


!ifndef NODEBUG
CFLAGS = /Tdp /Ti             /Tm /Se /Ms /Re /Gm /ss /W3 /G5 /DDEBUG
!else
CFLAGS = /Tdp     /Gs+ /O /Oc     /Se /Ms /Re /Gm /ss /W3 /G5
!endif # NODEBUG

CC = icc $(CFLAGS)

all: XComp.exe

clean:
    -@del *.exe
    -@del *.obj
    -@del *.map

save:
    zip -9 -r XComp *
    unzip -t XComp

UExcp.obj: UExcp.cpp UExcp.hpp
    $(CC) /c UExcp.cpp

UProfiling.obj: UProfiling.cpp UProfiling.hpp
    $(CC) /c UProfiling.cpp


XComp.obj: XComp.cpp XComp.hpp UExcp.hpp
    $(CC) /c XComp.cpp

XComp.exe: XComp.obj UExcp.obj UProfiling.obj XComp.def
    $(CC) XComp.obj UExcp.obj UProfiling.obj XComp.def

