#
# OSLab: memory manager makefile
#
# Choice of compiler (1 - Engineering network or 2 - stand alone)

COMPILER=1

# COM - the compiler to use (bcc)
# DIR - the directory to use (either borlandc or campus bc45)

!if $(COMPILER) == 1
COM=bcc
DIR=g:\apps\bc45
!elif $(COMPILER) == 2
COM=bcc
DIR=\borlandc
!else
!error Unknown compiler
!endif

#

obj: m2m.exe m2d.exe

memmgr.obj: memmgr.c module2.h
    $(DIR)\$(COM) -mc -c memmgr.c
    $(DIR)\tlib ..\oslab -+memmgr.obj

display.obj: display.c ..\os.h
    $(DIR)\$(COM) -mc -c display.c
    $(DIR)\tlib ..\oslab -+display.obj

mod2init.obj: mod2init.c module2.h
    $(DIR)\$(COM) -mc -c mod2init.c
    $(DIR)\tlib ..\oslab -+mod2init.obj

hwdata.obj: hwdata.c
    $(DIR)\$(COM) -mc -c hwdata.c

#
# Test routines - compiled and linked explicitly
#
# m2m - test of memory manager
# m2d - test of display
#

m2m.exe: m2m.obj ..\oslab.lib
    $(DIR)\tlink $(DIR)\lib\c0c m2m, m2m, m2m, ..\oslab $(DIR)\lib\cc

m2m.obj: m2m.c module2.h
    $(DIR)\$(COM) -mc -c m2m.c

m2d.exe: m2d.obj hwdata.obj ..\oslab.lib
    $(DIR)\tlink $(DIR)\lib\c0c hwdata m2d, m2d, m2d, ..\oslab $(DIR)\lib\cc

m2d.obj: m2d.c module2.h
    $(DIR)\$(COM) -mc -c m2d.c
