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.zor
< prev
next >
Wrap
Makefile
|
1996-09-28
|
5KB
|
146 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 Zortech C 3.0
#
# - 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 = ztc
# Zortech Compiler Flags:
# -e show effects of the preprocessor in error messages and list file (-l)
# -m memory model (M for medium, L for large), also i for integer-only
#
# Same as UNIX:
# -c compile, don't link
# -D define macro
# -g debugger info
# -o optimize (not O!!)
# -ofilename object output
#
# NOTE: quotes around the macro body in a -D are actually taken as part
# of that body!!
# CFLAGS = -g -e -mLi -DZTCDOS
# CFLAGS = -g -e -mMi -DZTCDOS
CFLAGS = -o -e -mMi -DZTCDOS
# Linker:
LD = $(CC)
LDFLAGS = $(CFLAGS)
# ===================================================================
# Zortech's make has no default rules!
# Rules must only refer to defined macros.
.c.obj:
$(CC) $(CFLAGS) -c $<
.obj.exe:
$(LD) $(LDFLAGS) $<
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 Zortech's make doesn't work
# 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) -o$* $(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
paths.h: Makefile.zor
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 -osetmaps.exe
# Zortech's make can't handle redirection in commands.
# A prefix of + forces the use of the more powerful (!) command.com.
keys.c: setmaps.exe keys.txt
+ setmaps < keys.txt > keys.c
clean:
-del *.obj
-del *.exe
-del *.bak
-del *.map
-del keys.c
-del paths.h