# Ex skeletal makefile for version 6
# NB: This makefile doesn't indicate any dependencies on header files.
# Compiles in both the LISP code and (the undocumented) chdir
# command within the editor; take these out of CFLAGS to make some
# breathing room in the text space if necessary. If you take out -DLISP
# you should move ex_vars.nolisp to ex_vars.h
# If your system expands tabs to 4 spaces you should -DTABS=4 below
# Ex is likely to overflow the symbol table in your C compiler, so
# it uses -t0 which is (purportedly) a C compiler with a larger
# symbol table. -t1 compiles switches into instructions making larger
# text, but saving data space.
# Ex wants stdio only to get the doprnt.o routine; if other stdio stuff
# gets dragged in that is a mistake.
${MKSTR} - ex2.0strings x $*.c
${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
${CC} ${CFLAGS} -O -c x.c
CFLAGS= -DTABS=8 -I/usr/include/retrofit -t0 -t1 -DV6 -DLISP -DCHDIR -DUCVISUAL
INCLUDE=/usr/include/retrofit
OBJS= ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_get.o \
ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_temp.o ex_tty.o \
ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voperate.o \
ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
all: a.out expreserve exrecover
${CC} -i ${OBJS} -ltermlib -lretro -lS
${CC} -o exrecover exrecover.o -lretro -lS
${CC} ${CFLAGS} -c -O exrecover.c
${CC} -o expreserve expreserve.o -lretro -lS
${CC} ${CFLAGS} -c expreserve.c
rm a.out exrecover expreserve ex2.0strings strings errs core trace
install: a.out installutil
-rm -f ${BINDIR}/ex ${BINDIR}/edit /${BINDIR}/vi
ln ${BINDIR}/ex ${BINDIR}/edit
ln ${BINDIR}/ex ${BINDIR}/vi
cp ex2.0strings ${LIBDIR}/ex2.0strings
installutil: exrecover expreserve
cp exrecover ${LIBDIR}/ex2.0recover
cp expreserve ${LIBDIR}/ex2.0preserve
chown root ${LIBDIR}/ex2.0recover ${LIBDIR}/ex2.0preserve
chmod 4755 ${LIBDIR}/ex2.0recover
chmod 4755 ${LIBDIR}/ex2.0preserve
@(size -l a.out ; size *.o) | ${PR} -h sizes
@${PR} -h errno.h ${INCLUDE}/errno.h
@${PR} -h pwd.h ${INCLUDE}/pwd.h
@${PR} -h setjmp.h ${INCLUDE}/setjmp.h
@${PR} -h sgtty.h ${INCLUDE}/sgtty.h
@${PR} -h signal.h ${INCLUDE}/signal.h
@${PR} -h sys/dir.h ${INCLUDE}/sys/dir.h
@${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
@${PR} -h sys/types.h ${INCLUDE}/sys/types.h
@${CXREF} *.c | ${PR} -h XREF