#############################################################################
#
#                               MAKEFILE.OS2
#
#                      Socket Services makefile for OS2
#
#           Copyright (c) Award Software International Inc., 1994
#
#
#############################################################################

# Tools Location ############################################################

OS2_DDK   = ..\..\..\..
MSA_ROOT  = ..\..\..\..\MASM60             # MS Macro Assembler V6.11

# Do not modify below this line #############################################

MSA_BIN         = $(MSA_ROOT)\BINP
MSA_INC         = $(MSA_ROOT)\INCLUDE

H               = $(OS2_DDK)\H
TOOLSPATH       = $(OS2_DDK)\TOOLS
OS2DDK_INC      = $(OS2_DDK)\INC
OS2DDK_LIB      = $(OS2_DDK)\LIB

OS2LINK         = $(TOOLSPATH)\LINK.EXE
OS2MAP2SYM      = $(TOOLSPATH)\MAPSYM.EXE
ASM             = $(MSA_BIN)\ML         # Microsoft Macro Assembler

# Definitions ################################################################

AFLAGS  = -DALIGNCODE -W3 -c -nologo -Cp
LFLAGS  = /noe /nod /map /EXEPACK /ALIGN:16 /FAR
INC     = $(MSA_INC);$(OS2DDK_INC)

DEF     = SSPCIC.DEF

#
# Since the compiler/linker and other tools use environment
# variables ( INCLUDE, LIB, etc ) in order to get the location of files,
# the following line will check the environment for the LIFE of the
# makefile and will be specific to this set of instructions. All MAKEFILES
# are requested to use this format to insure that they are using the correct
# level of files and tools.
#

!if [set INCLUDE=$(INC)] || [set LIB=$(OS2DDK_LIB)] || [set PATH=$(TOOLSPATH)]
!endif

!include      "$(H)\version.mak"

INCS    = ssmac.inc ssdefs.inc sspcic.inc ss_segm.inc ssmsg.inc ssos2.inc

OBJS    = sspcicut.obj sspcicdp.obj sspcic.obj sspcicin.obj sspcicva.obj \
          sspcicwm.obj ssmsg.obj ssos2drv.obj

.asm.obj:
        $(ASM) $(AFLAGS) /Fo$@ %s

# Main target #################################################################

sspcic.sys:  $(OBJS) MAKEFILE
        Rem Create DEF file <<$(DEF)
LIBRARY SSPCIC
DESCRIPTION '$(FILEVER)  Award OS/2 Socket Services Driver'
PROTMODE
CODE PRELOAD
DATA PRELOAD
SEGMENTS
        _DATA     CLASS 'DATA'     PRELOAD
        CONST     CLASS 'CONST'    PRELOAD
        _BSS      CLASS 'BSS'      PRELOAD
        _TEXT     CLASS 'CODE'     PRELOAD
        INIT_DATA CLASS 'INITDATA' PRELOAD
        INIT_CODE CLASS 'INITCODE' PRELOAD IOPL
<<keep

        $(OS2LINK) $(LFLAGS) @<<$(@B).LNK
ssos2drv.obj  +
sspcicut.obj  +
sspcicdp.obj  +
sspcic.obj    +
sspcicin.obj  +
sspcicva.obj  +
sspcicwm.obj  +
ssmsg.obj
sspcic.sys
sspcic.map
$(OS2DDK_LIB)\doscalls.lib $(OS2DDK_LIB)\os2286p.lib
$(DEF)
<<keep

        $(OS2MAP2SYM) sspcic.MAP


sspcicut.obj:    sspcicut.asm $(INCS)

sspcicdp.obj:    sspcicdp.asm $(INCS)

sspcic.obj:      sspcic.asm   $(INCS)

sspcicin.obj:    sspcicin.asm $(INCS)

ssmsg.obj:       ssmsg.asm    $(INCS)

sspcicva.obj:    sspcicva.asm $(INCS)

sspcicwm.obj:    sspcicwm.asm $(INCS)

ssos2drv.obj:    ssos2drv.asm $(INCS)

