#
#  makefile for bindedit.c
#
#  93.10.28 by Curt Sampson
#  Copyright 1993 by Fluor Daniel, Inc.
#
#  Type "make" to make bindedit, or "make bindread" to make bindread (the
#  version of bindedit with the -w option disabled).
#
#  You'll want to replace cslibs.lib in the LIBS line with your edition
#  of a small model library that has getopt() in it.
#

CC = tcc
CFLAGS = -d -O -Z -G
#CFLAGS = -v
LIBS=cslibs.lib snit.lib

# probably NOT a good idea to install this in a public directory where
# just anyone can get at it.
BINDIR=v:\tool\util
DOCDIR=v:\tool\doc

ARCHIVE = readme licence bindedit.exe bindread.exe bindedit.doc \
	  bindedit.c makefile

bindedit: bindedit.exe

bindread: bindread.exe

install: bindedit.exe
    -flag $(BINDIR)\bindedit.exe rw
    copy bindedit.exe $(BINDIR)
    copy bindedit.doc $(DOCDIR)

bindedit.exe: bindedit.obj
    $(CC) $(CFLAGS) bindedit.obj cslibs.lib snit.lib

bindread.exe: bindread.obj
    $(CC) $(CFLAGS) bindread.obj cslibs.lib snit.lib

bindread.obj:
    $(CC) -c $(CFLAGS) -DWRITE_DISABLED -obindread.obj bindedit.c

archive: bindedit.zip

bindedit.zip: $(ARCHIVE)
    pkzip -o bindedit.zip $(ARCHIVE)
    
clean:
    -del bindedit.obj >nul:
    -del bindedit.exe >nul:
    -del bindread.obj >nul:
    -del bindread.exe >nul:

.c.obj:
    $(CC) -c $(CFLAGS) {$< }
