#
#  Makefile for files in this directory.
#

compiler = tcc -c
options  = -O -d -Z -w

libman = tlib

all: modlgate.lib
        @echo Module gate routines compiled.

modlgate.lib: defrpars.obj scandrv.obj optidisk.obj sortdirs.obj chkdski.obj
        @..\..\..\bin\delete modlgate.lib
        @$(libman) modlgate.lib + defrpars.obj
        @$(libman) modlgate.lib + scandrv.obj
        @$(libman) modlgate.lib + optidisk.obj
        @$(libman) modlgate.lib + sortdirs.obj
        @$(libman) modlgate.lib + chkdski.obj
        @..\..\..\bin\delete modlgate.bak

defrpars.obj: defrpars.c 
        @$(compiler) $(options) defrpars.c

scandrv.obj: scandrv.c modlgate.h defrpars.h ..\overlays\ovlhost.h \
             ..\misc\bool.h ..\modules\modules.h
        @$(compiler) $(options) -I..\overlays scandrv.c

optidisk.obj: optidisk.c modlgate.h defrpars.h
        @$(compiler) $(options) optidisk.c

sortdirs.obj: sortdirs.c modlgate.h defrpars.h
        @$(compiler) $(options) sortdirs.c

chkdski.obj: chkdski.c ..\overlays\ovlhost.h ..\misc\bool.h modlgate.h \
             defrpars.h ..\modules\modules.h
        @$(compiler) $(options) -I..\overlays chkdski.c

clean:
        @..\..\..\bin\delete defrpars.obj
        @..\..\..\bin\delete scandrv.obj
        @..\..\..\bin\delete optidisk.obj
        @..\..\..\bin\delete sortdirs.obj
        @..\..\..\bin\delete chkdski.obj
        @..\..\..\bin\delete modlgate.lib
