
##
## Build file for creating RECFILE.EXE
##
## To build a LARGE model,	"nmake S=L M=4 [BCC=1]"
## To build a COMPACT model,	"nmake S=C M=3 [BCC=1]"
## To build a MEDIUM model,	"nmake S=M M=2 [BCC=1]"
## To build a SMALL model,	"nmake S=S M=1 [BCC=1]"
## To build a TINY model,	"nmake S=T M=0 [BCC=1]"
##
## Add BCC=1 to the line if building using Borland C++
##

## The default is to build a small model.

!ifndef S
!ifdef BCC
S= s
!else
S= S
!endif
!endif
!ifndef M
M= 1
!endif

## The following are search paths

INC  = ..\INC
GINC = ..\..\INC

LBO  =
LBB  = ..\inc


#############################################################################

## The following are command line options compiler, assembler selection

!ifdef BCC

BDIR = c:\borlandc
BLB =  $(BDIR)\lib

## tools selection

IP=%include%
MA= tasm /i. /i$(INC) /i$(GINC) /JQUIRKS /JMASM51 /JNOSMART /m2
CL= bcc  /I$(BDIR)\include /I. /I$(INC) /I$(GINC)
LK= tlink
LB= tlib
CMOD= -m$(S)!

## switches

AS= -mx
AO= -DMODELSIZE=$(M) -DBUILD_NONE=1 -v
CS= -c -Ox
CO= $(CMOD)
LS=
LO= /m /c
ONAM= -o

!else

## tools selection

MA= masm
CL= cl
LK= link
LB= lib
CMOD=-A$(S)

## switches

AS= /Mx
AO= /DMODELSIZE=$(M) /DBUILD_NONE=1
CS= /c /Ox /Zp1
CO= $(CMOD)
LO= /Ma
LS=
ONAM= -Fo

!endif

#############################################################################

DEFAULT: recfile.exe

recfila.obj: recfila.asm
    $(MA) $(AS) $(AO) recfila.asm;

recfile.obj: recfile.c
    $(CL) $(CS) $(CO) /DPROAS=1 recfile.c

!ifdef BCC

recfile.exe: recfile.obj recfila.obj
 $(LK) /L$(CLNK) $(LS) $(LO) $(BLB)\C0$(S) recfile recfila,recfile,,$(LBB)\bvh$(S)lib+$(LBB)\bv$(S)lib+$(BLB)\c$(S).lib;

!else

recfile.exe: recfile.obj recfila.obj
 $(LK) $(LS) $(LO) recfile+recfila,,,$(LBB)\mvh$(S)lib+$(LBB)\mv$(S)lib;

!endif


