home *** CD-ROM | disk | FTP | other *** search
Makefile | 1988-04-25 | 6.6 KB | 225 lines |
- ###########################################################################
- # This program is Copyright (C) 1986, 1987, 1988 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. #
- ###########################################################################
-
- # TMPDIR is where the tmp files get stored, usually /tmp or /tmp/jove. If
- # your system does not remove subdirectories of /tmp on reboot (lots do
- # remove them these days) then it makes sense to make TMPDIR be /tmp/jove.
- # But if you want to recover buffers on system crashes, you should create a
- # directory that doesn't get clearned upon reboot, and use that instead.
- # You would probably want to clean out that directory periodically with
- # /etc/cron. LIBDIR is for online documentation, the PORTSRV process,
- # RECOVER, and the system-wide .joverc file. BINDIR is where to put the
- # executables JOVE and TEACHJOVE. MANDIR is where the manual pages go for
- # JOVE, RECOVER and TEACHJOVE. MANEXT is the extension for the man pages,
- # e.g., jove.1 or jove.l or jove.m.
-
- DESTDIR =
- TMPDIR = /tmp
- LIBDIR = /usr/lib/jove
- BINDIR = /bin
- MANDIR = /usr/man/man1
- MANEXT = 1
- SHELL = /bin/csh
-
- # These should all just be right if the above ones are.
- JOVE = $(DESTDIR)$(BINDIR)/jove
- RECOVER = $(DESTDIR)$(LIBDIR)/recover
- TEACHJOVE = $(DESTDIR)$(BINDIR)/teachjove
- JOVERC = $(DESTDIR)$(LIBDIR)/.joverc
- CMDS.DOC = $(DESTDIR)$(LIBDIR)/cmds.doc
- TEACH-JOVE = $(DESTDIR)$(LIBDIR)/teach-jove
- PORTSRV = $(DESTDIR)$(LIBDIR)/portsrv
- JOVEM = $(DESTDIR)$(MANDIR)/jove.$(MANEXT)
- RECOVERM = $(DESTDIR)$(MANDIR)/recover.$(MANEXT)
- TEACHJOVEM = $(DESTDIR)$(MANDIR)/teachjove.$(MANEXT)
-
- # Select the right libraries for your system.
- # 2.9BSD: LIBS = -ltermlib -ljobs
- # v7: LIBS = -ltermlib
- # 4.1BSD: LIBS = -ltermlib -ljobs
- # 4.2BSD: LIBS = -ltermlib
- # 4.3BSD: LIBS = -ltermlib
-
- OVLIBS = -lovtermcap -lovjobs
- LIBS = -ltermcap -ljobs
-
- # If you are not VMUNIX (vax running Berkeley Version 4), you must specify
- # the -i flags (split I/D space) and maybe the -x option (for adb to work).
- # 2.9BSD: LDFLAGS = -x -i
- # v7: LDFLAGS = -x -i
- # 4.1BSD: LDFLAGS =
- # 4.2BSD: LDFLAGS =
- # 4.3BSD: LDFLAGS =
-
- LDFLAGS = -x -i
-
- CFLAGS = -O -V
-
- COFLAGS = -rworking -q
-
- BASESEG = funcdefs.o keymaps.o argcount.o ask.o buf.o ctype.o delete.o disp.o fmt.o fp.o \
- insert.o io.o jove.o malloc.o marks.o misc.o move.o re.o \
- screen.o table.o tune.o util.o version.o
- OVLAY1 = abbrev.o rec.o paragraph.o macros.o
- OVLAY2 = c.o wind.o vars.o
- OVLAY3 = extend.o
- OVLAY4 = iproc.o re1.o
- OVLAY5 = proc.o scandir.o term.o case.o
-
- OBJECTS = $(BASESEG) $(OVLAY1) $(OVLAY2) $(OVLAY3) $(OVLAY4) $(OVLAY5)
-
- C-FILES = funcdefs.c abbrev.c argcount.c ask.c buf.c c.c case.c ctype.c delete.c disp.c \
- extend.c fmt.c fp.c insert.c io.c iproc.c iproc-pipes.c iproc-ptys.c \
- jove.c macros.c malloc.c marks.c misc.c move.c paragraph.c proc.c \
- re.c re1.c rec.c scandir.c screen.c table.c term.c util.c vars.c version.c \
- wind.c
-
- H-FILES = ctype.h io.h jove.h re.h rec.h table.h temp.h termcap.h tune.h
-
- BACKUPS = $(C-FILES) $(H-FILES) $(DOCS) teachjove.c recover.c setmaps.c portsrv.c \
- tune.template Makefile Ovmakefile keymaps.txt README tags
-
- DOCS = doc/cmds.doc.nr doc/example.rc doc/jove.1 doc/jove.2 doc/jove.3 \
- doc/jove.4 doc/jove.nr doc/recover.nr doc/system.rc doc/teach-jove \
- doc/teachjove.nr doc/README
-
- all: xjove recover teachjove portsrv
-
- xjove: $(OBJECTS)
- ld $(LDFLAGS) /lib/crt0.o \
- -Z $(OVLAY1) \
- -Z $(OVLAY2) \
- -Z $(OVLAY3) \
- -Z $(OVLAY4) \
- -Z $(OVLAY5) \
- -L $(BASESEG) \
- -o xjove $(OVLIBS) -lovc
- checkobj xjove
- @-size xjove
- @-date
-
- portsrv: portsrv.c
- cc -o portsrv -n -O portsrv.c $(LIBS)
-
- recover: recover.c tune.o rec.h temp.h
- cc -o recover -n -O recover.c tune.o -ljobs
-
- teachjove: teachjove.c
- cc -o teachjove -n -O -DTEACHJOVE=\"$(TEACH-JOVE)\" teachjove.c
-
- setmaps: setmaps.c funcdefs.c
- cc -o setmaps setmaps.c
-
- keymaps.c: setmaps keymaps.txt
- setmaps < keymaps.txt > keymaps.c
-
- tune.c: Makefile tune.template
- @echo "/* Changes should be made in Makefile, not to this file! */" > tune.c
- @echo "" >> tune.c
- @sed -e 's;TMPDIR;$(TMPDIR);' \
- -e 's;LIBDIR;$(LIBDIR);' \
- -e 's;BINDIR;$(BINDIR);' \
- -e 's;SHELL;$(SHELL);' tune.template >> tune.c
-
- install: $(LIBDIR) $(TEACH-JOVE) $(CMDS.DOC) $(JOVERC) $(PORTSRV) $(RECOVER) \
- $(JOVE) $(TEACHJOVE) $(JOVEM) $(RECOVERM) $(TEACHJOVEM)
-
- $(DESTDIR)$(LIBDIR):
- -mkdir (DESTDIR)$(LIBDIR)
-
- $(TEACH-JOVE): doc/teach-jove
- install -c -m 644 doc/teach-jove $(TEACH-JOVE)
-
- $(CMDS.DOC): doc/cmds.doc
- install -c -m 644 doc/cmds.doc $(CMDS.DOC)
-
- $(JOVERC): doc/system.rc
- install -c -m 644 doc/system.rc $(JOVERC)
-
- $(PORTSRV): portsrv
- install -c -m 755 portsrv $(PORTSRV)
-
- $(RECOVER): recover
- install -c -m 755 recover $(RECOVER)
-
- $(JOVE): xjove
- install -c -m 755 xjove $(JOVE)
-
- $(TEACHJOVE): teachjove
- install -c -m 755 teachjove $(TEACHJOVE)
-
- $(JOVEM): doc/jove.nr
- @sed -e 's;TMPDIR;$(TMPDIR);' \
- -e 's;LIBDIR;$(LIBDIR);' \
- -e 's;SHELL;$(SHELL);' doc/jove.nr > /tmp/jove.nr
- install -m 644 /tmp/jove.nr $(JOVEM)
-
- $(RECOVERM): doc/recover.nr
- @sed -e 's;TMPDIR;$(TMPDIR);' \
- -e 's;LIBDIR;$(LIBDIR);' \
- -e 's;SHELL;$(SHELL);' doc/recover.nr > /tmp/recover.nr
- install -m 644 /tmp/recover.nr $(RECOVERM)
-
- $(TEACHJOVEM): doc/teachjove.nr
- @sed -e 's;TMPDIR;$(TMPDIR);' \
- -e 's;LIBDIR;$(LIBDIR);' \
- -e 's;SHELL;$(SHELL);' doc/teachjove.nr > /tmp/teachjove.nr
- install -m 644 /tmp/teachjove.nr $(TEACHJOVEM)
-
- echo:
- @echo $(C-FILES) $(H-FILES)
-
- lint:
- lint -x $(C-FILES)
- echo Done
-
- tags:
- ctags -w $(C-FILES) $(H-FILES)
-
-
- jove.shar:
- shar $(BACKUPS) doc/* > jove.shar
-
- backup:
- tar cf backup $(BACKUPS)
-
- tape-backup:
- tar cbf 20 /dev/rmt0 $(BACKUPS)
-
- clean:
- rm -f a.out core $(OBJECTS) keymaps.c xjove \
- portsrv recover setmaps teachjove
-
- # abbrev.o: jove.h tune.h
- # ask.o: jove.h tune.h
- # buf.o: jove.h tune.h
- # c.o: jove.h tune.h
- # delete.o: jove.h tune.h
- # disp.o: jove.h tune.h termcap.h
- # extend.o: jove.h tune.h
- # fmt.o: jove.h tune.h termcap.h
- # funcdefs.o: jove.h tune.h
- # insert.o: jove.h tune.h
- # io.o: jove.h tune.h termcap.h temp.h
- # iproc.o: jove.h tune.h
- # jove.o: jove.h tune.h termcap.h
- # macros.o: jove.h tune.h
- # marks.o: jove.h tune.h
- # misc.o: jove.h tune.h
- # move.o: jove.h tune.h
- # portsrv.o: jove.h tune.h
- # proc.o: jove.h tune.h
- # re.o: jove.h tune.h
- # rec.o: jove.h tune.h temp.h rec.h
- # recover.o: jove.h tune.h temp.h rec.h
- # screen.o: jove.h tune.h temp.h termcap.h
- # setmaps.o: jove.h tune.h
- # term.o: jove.h tune.h
- # tune.o: tune.h
- # util.o: jove.h tune.h
- # wind.o: jove.h tune.h termcap.h
-