##
## This make file controls the building of the CD application programs 
## using any model library of 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 options for the compiler, assembler and linker

MZ= # /Zi

CZ= -Zpi
CO= -Od

LC= /CO 

# The following is the location of the mvXlib.lib library files

LIBDIR= ..\inc

.asm.obj:
	masm $(MZ) $<;

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

# The default is to build the command-line control apps, until it is
# decided if the "mvcd.obj" and the "outbuf.obj" modules will be
# included in the SDK.

cdromapp: cdpause.exe cdstatus.exe cdstop.exe cdplay.exe cdresume.exe cdreset.exe


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

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

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

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

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

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

# These programs control the CD from the command line

cdpause.exe: cdpause.obj 
	link $(LC) cdpause.obj, cdpause.exe,, $(LIBDIR)\mvh$(S)lib.lib;

cdstatus.exe: cdstatus.obj 
	link $(LC) cdstatus.obj, cdstatus.exe,, $(LIBDIR)\mvh$(S)lib.lib ;

cdstop.exe: cdstop.obj 
	link $(LC) cdstop.obj, cdstop.exe,, $(LIBDIR)\mvh$(S)lib.lib ;

cdreset.exe: cdreset.obj 
	link $(LC) cdreset.obj, cdreset.exe,, $(LIBDIR)\mvh$(S)lib.lib ;

cdplay.exe: cdplay.obj 
	link $(LC) cdplay.obj, cdplay.exe,, $(LIBDIR)\mvh$(S)lib.lib ;

cdresume.exe: cdresume.obj 
	link $(LC) cdresume.obj, cdresume.exe,, $(LIBDIR)\mvh$(S)lib.lib ;


