# Makefile
# For the Extended DOS Utilities

# Copyright (C) 1996 James Hall


# Define the compiler, and a #define for the compiler:
#    MS_QUICK_C            Microsoft Quick C (works with 2.5)

Compiler=/DMS_QUICK_C
CC=QCL /batch /nologo $(Compiler)
#CC=QCL /batch $(Compiler)

# Define the graphics library (for certain compilers)
#Graphics=C:\QC25\LIB\GRAPHICS.LIB
Graphics=G.LIB

# Define all utils to compile:

UTILS=echo.exe clear.exe wait.exe rem.exe ver.exe more.exe type.exe \
date.exe time.exe test.exe choose.exe

# Macros for file management:

ZIP=C:\INFOZIP\ZIP -9k
Version=012


# Suffix rules:

.SUFFIXES:
.SUFFIXES: .c .obj .exe

.c.obj:
	$(CC) -c $<


# Targets to compile:

all: $(UTILS)


echo.exe: echo.obj
	$(CC) echo.obj

clear.exe: clear.obj
	$(CC) clear.obj

wait.exe: wait.obj getkey.obj
	$(CC) wait.obj getkey.obj

rem.exe: rem.obj
	$(CC) rem.obj

ver.exe: ver.obj
	$(CC) ver.obj

more.exe: type.c getkey.obj x_putc.obj x_getc.obj \
x_height.obj utils.h
	$(CC) /DPROG_MORE -o $@ type.c getkey.obj x_putc.obj x_getc.obj \
x_height.obj $(Graphics)

type.exe: type.c getkey.obj x_putc.obj x_getc.obj \
x_height.obj utils.h
	$(CC) /DPROG_TYPE -o $@ type.c getkey.obj x_putc.obj x_getc.obj \
x_height.obj $(Graphics)

date.exe: date.obj getdate.obj
	$(CC) date.obj getdate.obj

time.exe: time.obj gettime.obj
	$(CC) time.obj gettime.obj

test.exe: test.obj
	$(CC) test.obj

choose.exe: choose.obj getkey.obj
	$(CC) choose.obj getkey.obj


# Clean-up:

realclean: clean
	DEL *.EXE

clean:
	DEL *.OBJ

distrib: all
	$(ZIP) UTLX-$(Version).ZIP *.EXE
	$(ZIP) UTLS-$(Version).ZIP *.C *.H Makefile

backup: distrib
	COPY *.ZIP A:
