# SCCSID = @(#)makefile 13.6 93/07/15
#################################################################################
#
# Makefile to build Resource DLL and Help file for the Toolkit
# Generic Installation Sample
#
#   Generates one dll:
#      CARDINFO.DLL         - DLL containing data about the adapter to be
#                             installed by the Generic Installation DLL
#   Generates one help file:
#      VIDHELP.HLP          - Help file containing help for installing
#                             a Video Blaster adapter
#
# 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

RCDLL=CARDINFO
RCRES=CARDINFO
HELPFILE=VIDHELP

#################################
# 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
#################################
LINK=link386
MAP = mapsym $(RCDLL)
LFLAGS= /batch /map /nod /noe /noi /packcode /packdata /exepack /align:16
LIBS= DDE4MBS.LIB os2386.lib MMPM2.LIB

#########################################
# Definitions for RESOURCE compiler
#########################################
RC  = rc

#########################################
# Definitions for Help Compiler
#########################################
MS386=icc
IPF=ipfc
L=ENU
P=437
C=1

#################################
# Inference Rules
#################################
.c.obj:
        $(CC) $(CFLAGS) /Fo$(<R).obj $(C_LST) $(<R).c

#################################
# Object file lists
#################################

RCOBJS = rcstub.obj

#################################
# Target Descriptions
#################################
all: rc help

##################################
# CARDINFO.DLL Target Descriptions
##################################

rc: $(RCDLL).dll

$(RCDLL).dll:   $(RCOBJS) $(RCRES).rc makefile $(RCDLL).lrf $(RCDLL).def
        $(LINK)  @$(RCDLL).lrf
        $(RC) $(RCRES).rc $(RCDLL).dll
        $(MAP)

$(RCDLL).def: makefile
        @echo Creating file <<$(@B).def
LIBRARY $(RCDLL)
DESCRIPTION 'DLL file containing resources'
STUB 'OS2STUB.EXE'
DATA NONE
<<keep

$(RCDLL).lrf: makefile
        @echo Creating file <<$(@B).lrf
$(RCOBJS)
$(RCDLL).dll
$(RCDLL).map $(LFLAGS)
$(LIBS)
$(RCDLL).def;
<<keep

##################################
# VIDHELP.HLP Target Descriptions
##################################
help: $(HELPFILE).hlp
$(HELPFILE).hlp: $(HELPFILE).itl makefile
        @echo Creating file $@ > con
        $(IPF) $(HELPFILE).itl /l=$(L) /codepage=$(P) /country=$(C)

