home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
jove-4.16-src.tgz
/
tar.out
/
bsd
/
jove
/
Makefile.bcc
< prev
next >
Wrap
Makefile
|
1996-09-28
|
6KB
|
179 lines
########################################################################
# This program is Copyright (C) 1986-1996 by Jonathan Payne. JOVE is #
# provided to you without charge, and with no warranty. You may give #
# away copies of JOVE, including sources, provided that this notice is #
# included in all the files. #
########################################################################
# Makefile for Borland C/C++ 3.1
#
# - supported targets:
# + jjove.exe (build JOVE, but don't install it)
# + jovedosx.zoo (build executable JOVE kit)
# + jovedosx.zip (build executable JOVE kit)
# + clean
#
# - to install, do the following:
# + copy jjove.exe where you wish
# + copy doc/cmds.doc to <SHAREDIR>/cmds.doc
# + optional: copy some jove rc (none supplied) file to <SHAREDIR>/jove.rc
# ===================================================================
# Jove configuration: default JOVE paths.
# Note that all these can be set from environment variables as well;
# see README.DOS for details.
#
# TMPDIR is where the tmp files get stored, usually /tmp or /usr/tmp.
# RECDIR is the directory in which RECOVER looks for JOVE's tempfiles.
# LIBDIR is for the PORTSRV and RECOVER programs.
# SHAREDIR is for online documentation, and the system-wide jove.rc file.
## BINDIR is where to put the executables JOVE and TEACHJOVE.
# DFLTSHELL is the default shell invoked by JOVE and TEACHJOVE.
TMPDIR = c:/tmp
RECDIR = c:/tmp
LIBDIR = c:/jove
SHAREDIR = $(LIBDIR)
# BINDIR = c:/jove
DFLTSHELL = command
# Compiler:
CC = bcc
# Compiler options
#
# Memory model: 'm' for medium or 'l' for large
# MEM = -ml
# Medium-model:
# Uses a smaller buffer cache (3K vs 64K in large model), but can
# still use (up to) all available memory for editing. If you have
# a disk cache (e.g. smartdrv) running, you probably won't notice.
# The medium model saves about 30K in size of jove.exe
MEM = -mm
# No floating point
FP = -f-
# Use 386 instructions
# CPU = -3
# Optimizations: -Ox is untested
# -Ox : fastest
# -O1 : smallest
# -Od : none at all
OPT = -O1
# Suppress warnings about functions defined first but
# not prototyped (pro) & structures declared but undefined (stu).
# There are still a few unused variable warnings.
WARN = -w-pro -w-stu
# Debugging options:
# -v : source level debugging
# -N : compile in stack checking
DEB =
CFLAGS = $(MEM) $(FP) $(CPU) $(OPT) $(WARN) $(DEB) $(SYSDEFS)
# Linker:
LD = $(CC)
# Flags peculiar to link step. Use '-l' to $(CC) to specify
# a flag that is passed to the linker
# m : create map file
# LINKFLAGS = -lm
LINKFLAGS =
LDFLAGS = $(CFLAGS) $(LINKFLAGS)
# ===================================================================
# Don't rely on Borland make's builtin rules
.SUFFIXES .exe .obj .c
.c.obj:
$(CC) $(CFLAGS) -c $<
.obj.exe:
$(LD) $(LDFLAGS) $<
# Location of BCC libraries (needed to find wildargs.obj)
# for BC/C++ v3.1:
BCCLIB = c:/borlandc/lib
# for BC/C++ v4.0:
#BCCLIB = c:/borlandc/lib/16bit
OBJECTS = keys.obj commands.obj abbrev.obj ask.obj buf.obj c.obj \
case.obj jctype.obj delete.obj extend.obj argcount.obj insert.obj \
io.obj jove.obj macros.obj marks.obj misc.obj mouse.obj move.obj \
paragrap.obj proc.obj re.obj reapp.obj scandir.obj list.obj \
keymaps.obj util.obj vars.obj wind.obj fmt.obj disp.obj term.obj \
fp.obj screen.obj msgetch.obj ibmpcdos.obj
HEADERS = abbrev.h argcount.h ask.h buf.h c.h case.h chars.h commands.h \
jctype.h dataobj.h delete.h disp.h extend.h externs.h \
fmt.h fp.h insert.h io.h iproc.h jove.h \
keymaps.h list.h loadavg.h mac.h macros.h marks.h \
misc.h mouse.h move.h paragraph.h proc.h \
re.h reapp.h rec.h scandir.h screen.h \
sysdep.h sysprocs.h temp.h term.h ttystate.h \
tune.h util.h vars.h version.h wind.h
# This is what we really want to use, but Borland's make complains
# when a target appears in more than one rule. So, as it stands,
# changing a header will *not* force recompilation :-(
#
# $(OBJECTS): $(HEADERS)
#
# For this reason, we can only force the building of paths.h
# by adding it to the dependencies for explicit targets.
# In the hope that it is built soon enough, we put it at the front.
jjove.exe: paths.h $(OBJECTS)
$(LD) $(LDFLAGS) -e$* @&&!
$(BCCLIB)/wildargs.obj $(OBJECTS)
!
jovedosx.zoo: paths.h jjove.exe
-del jovedosx.zoo
-del jove.exe
rename jjove.exe jove.exe
zoo -add jovedosx.zoo jove.exe doc\cmds.doc doc\jove.man doc\jove.doc paths.h README.dos
jovedosx.zip: paths.h jjove.exe
-del jovedosx.zip
-del jove.exe
rename jjove.exe jove.exe
pkzip -aP jovedosx.zip jove.exe doc\cmds.doc doc\jove.man doc\jove.doc paths.h README.dos
# Note that quotes are not stripped by the shell that will
# execute the recipe for paths.h
# The truly bizarre quoting is necessary to quote the pound
# character and the double quotes for Borland make (v3.6).
# This 'feature' is undocumented and fragile. Use at your own risk!
paths.h: makefile.bcc
echo "/* Changes should be made in Makefile, not to this file! */" > paths.h
echo "#"define TMPDIR '"$(TMPDIR)"' >> paths.h
echo "#"define RECDIR '"$(RECDIR)"' >> paths.h
echo "#"define LIBDIR '"$(LIBDIR)"' >> paths.h
echo "#"define SHAREDIR '"$(SHAREDIR)"' >> paths.h
echo "#"define DFLTSHELL '"$(DFLTSHELL)"' >> paths.h
setmaps.exe: commands.tab keys.txt setmaps.c
$(CC) $(CFLAGS) setmaps.c
keys.c: setmaps.exe keys.txt
setmaps < keys.txt > keys.c
clean:
-del *.obj
-del *.exe
-del *.bak
-del *.map
-del keys.c
-rename paths.h paths.old # don't delete (a possibly hand-built) paths.h