#################################################################################
#
# Makefile for OS/2 Toolkit VSD Resource File sample
#
#       Generates one DLL module:
#              SAMPLE.DLL - Sample VSD Resource File DLL
#
#
#
# Copyright (c) IBM Corporation  1993
# All Rights Reserved
#################################################################################

!if  [SET LIB=..\..\lib;%LIB%]                  || \
     [SET INCLUDE=..\..\h;..\..\inc;%INCLUDE%]
!endif

.SUFFIXES: .com .sys .exe .obj .mbj .asm .inc .def .lrf .crf .ref \
           .lst .sym .map .c .h .lib .msg .pro .txt

NAMEDLL=SAMPLE
NAMEINIT=SAMPLE

#################################
# Definitions for C Compiler
#################################
CC=icc

CFLAGS=  /C+ /Gd- /Ge- /Gm+ /Gs- /Re /J- /Kb- /Ki- /Ms /Sm /Sn /Ss+ /DINCL_32


#################################
# Definitions for linker
#################################
LINK386=link386
LFLAGS386= /batch /map /nod /noi /map /packcode /packdata /exepack /align:16 /nologo
LIBS= DDE4MBS.LIB os2386.lib MMPM2.LIB

#################################
# Definitions for resource compiler
#################################

RC = rc

MAP=mapsym $(NAMEDLL)

#################################
# Inference Rules
#################################

.c.obj:
                $(CC) $(CFLAGS) /Fo$(<R).obj $(<R).c

.rc.res:
        $(RC) /r $(<B).rc

#################################
# Object file lists
#################################
RCOBJ=dummy.obj

#################################
# Target Descriptions
#################################

all: dll res

dll: $(NAMEDLL).dll
res: $(NAMEDLL).res

$(NAMEDLL).dll:   makefile $(NAMEDLL).res $(NAMEDLL).lrf $(NAMEDLL).def
                                  $(LINK386) $(LFLAGS386) @$(NAMEDLL).lrf
                  $(RC) $(NAMEDLL).RES $*.DLL

#****************************************************************************
# $(NAMEDLL).RES
#****************************************************************************

$(NAMEDLL).res: $(NAMEDLL).rc makefile
        @echo $@ > con
        $(RC) $(RINC) -r $*.rc $@


$(NAMEDLL).def: makefile
                @echo Creating file <<$(@B).def
LIBRARY $(NAMEDLL)
DESCRIPTION '$(FILEVER)'
DATA MULTIPLE NONSHARED
STACKSIZE 8192
<<keep

$(NAMEDLL).lrf: makefile
        @echo Creating file <<$(@B).lrf
$(RCOBJ)
$(NAMEDLL).dll
$(NAMEDLL).map $(LFLAGS386)
$(LIBS)
$(NAMEDLL).def;
<<keep






