# Simple makefile for Borland C++ 3.1

SOURCES	= args.c eiffel.c entry.c fortran.c get.c keyword.c main.c \
	options.c parse.c read.c sort.c strlist.c vstring.c

# Adjust the paths to your location of the borland C files
BCCLOC  = c:\borlandc
CC	= $(BCCLOC)\bin\bcc
INC	= -I$(BCCLOC)\include
LIB	= -L$(BCCLOC)\lib

# Add this file for wildcard expansion (does NOT work with 4.0!)
#EXTRA   =   $(BCCLOC)\lib\wildargs.obj

# The following compile options can be changed for better machines.
#	replace -1- with -2 to produce code for a 80286 or higher
#	replace -1- with -3 to produce code for a 80386 or higher
#	add -v for source debugging
OPTIMIZE= -1- -O1

CFLAGS	= -DMSDOS -mc -d -w-ccc -w-par -w-pia -w-rch -w-sus $(INC)
LFLAGS	= $(LIB) $(EXTRA)

ctags.exe: $(SOURCES) respbcc
	$(CC) $(OPTIMIZE) -e$@ @respbcc

debug: dctags.exe

dctags.exe: $(SOURCES) respbcc debug.c
	$(CC) -DDEBUG -v -e$@ @respbcc debug.c

respbcc: makefile.bc3
	copy &&|
$(CFLAGS)
$(LFLAGS)
$(SOURCES)
| $@

clean:
	del *.exe
	del *.obj
	del respbcc
	del tags
