#
# Turbo C Makefile for CP/M File eXpress
# Copyright 15 Dec 1991 by 
# Carson Wilson
# 1359 W. Greenleaf, #1D
# Chicago, IL 60626
#
# UUCP:	carson@sputnik.uucp
# 	carson@ddsw1.MCS.COM
#
# BBS:	Antelope Freeway, 1-708-455-0120
#
# Modified to have Turbo C Compiler at F:\TC and
# the output directory in the source directory, which
# should be F:\TC\SRC now (see BINDIR variable below)
# I also deactived the delete commands below install :
#
# The Borland C Compiler 2.01 could be downloaded at
# http://community.borland.com/article/20841
# free (no charge)
#
# Peter Dassow, in June 2006
#
# Name and path of C compiler:
CC = tcc

# Turbo C's home directory (also where WILDARGS.OBJ is)
THOME = F:\TC

MDL = s

CFLAGS = -d- -y- -G -k- -N- -C- -A- -O -Z
INCLUDES = $(THOME)\INCLUDE

TLINK = tlink
TLFLAGS = /c /x
LIBS = $(THOME)\LIB

# Where to put compiled CFX.EXE
BINDIR = $(THOME)\SRC

.c.obj	:
	$(CC) $(CFLAGS) -I$(INCLUDES) -c -m$(MDL) $<

cfx.exe	: cfx.obj lbr.obj unc.obj usq.obj lzh.obj getopt.obj \
	$(THOME)\wildargs.obj
	$(TLINK) $(TLFLAGS) $(LIBS)\c0$(MDL) \
	cfx lbr unc usq lzh getopt $(THOME)\wildargs.obj, \
	cfx, cfx, $(LIBS)\c$(MDL)

install :
#       copy cfx.exe $(BINDIR)
#       del cfx.exe

clean	:
	del cfx.exe
	del cfx.obj
	del lbr.obj 
	del unc.obj 
	del usq.obj 
	del lzh.obj
	del getopt.obj

cfx.obj	: cfx.c cfx.h
lbr.obj	: lbr.c cfx.h
unc.obj	: unc.c cfx.h
usq.obj	: usq.c cfx.h
lzh.obj	: lzh.c cfx.h
getopt.obj : getopt.c		# proprietary Borland code
