##
## This make file controls the building of the any model library for
## the CDROM routines.
##
## To build a LARGE model,	"nmake S=L M=4"
## To build a COMPACT model,	"nmake S=C M=3"
## To build a MEDIUM model,	"nmake S=M M=2"
## To build a SMALL model,	"nmake S=S M=1"
## To build a TINY model,	"nmake S=T M=0"
##
## The default is to build a small model.

S= S
M= 1

## The following are command line options for the compiler and assembler

MM= /Mx
MZ= # /Zi

CZ= -Zp # -Zi
CO= # -Od

## The following are command line options for the librarian

LIBDIR= ..\..\inc

## The default is to build the model-specific library, and is included
## for compatibility for the "make" program (this is an "nmake" file).

default: $(LIBDIR)\mvh$(S)lib.lib

## The following are the command lines to build each module.
## The output file is named according to the model, the first letter
## of the name representing the model (L, C, M, S, T)

$(S)mscdex.obj: mscdex.asm 
	masm /t $(MM) $(MZ) /DMODELSIZE=$(M) mscdex.asm, $(S)mscdex.obj;

$(S)cdrom.obj: cdrom.c 
	cl -nologo -c $(CO) $(CZ) -A$(S) -Fo$(S)cdrom.obj cdrom.c

$(S)cdmas.obj:
	cl -nologo -c $(CO) $(CZ) -A$(S) -Fo$(S)cdmas.obj cdmaster.c

## The following are the command lines for the librarian

$(LIBDIR)\mvh$(S)lib.lib: $(S)mscdex.obj $(S)cdrom.obj $(S)cdmas.obj
	lib $(LIBDIR)\mvh$(S)lib -+$(S)mscdex.obj ,,$(LIBDIR)\mvh$(S)lib;
	lib $(LIBDIR)\mvh$(S)lib -+$(S)cdrom.obj; ,,$(LIBDIR)\mvh$(S)lib;
	lib $(LIBDIR)\mvh$(S)lib -+$(S)cdmas.obj; ,,$(LIBDIR)\mvh$(S)lib;

