VERSION=3.7 CFLAGS= -DTABS=8 -DCHDIR -DVFORK ${DEB} -I${INCLUDES} INCLUDES= STARTUP= /lib/crt0.o FSTARTUP= /lib/fcrt0.o # FP= -f # if no floating point unit PDP=34 # ... or 40 or 70 # # Ex skeletal makefile for version 7, USGS Overlay system # # NB: This makefile doesn't indicate any dependencies on header files. # # Ex is very large - this version will not fit on PDP-11's without overlay # software. Things that can be turned off to save # space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL # (visual \ nonsense on upper case only terminals), CHDIR (the undocumented # chdir command.) CRYPT includes code to handle the -x option to allow # encrypted files. Defining CRYPT drags in most of stdio (from the call # to getpass) and makes vi about 4k text and 4k data bigger). # VMUNIX makes ex considerably larger, raising many limits # and improving speed and simplicity of maintenance. It is suitable only # for a VAX or other large machine, and then probably only in a paged system. # # Don't define VFORK unless your system has the VFORK system call, # which is like fork but the two processes have only one data space until the # child execs. This speeds up ex by saving the memory copy. # # If your system expands tabs to 4 spaces you should -DTABS=4 above # # Make ex.40 for nonseparate I/D machines without floating point, # ex.34 for nonseparate I/D machines with floating point, # and ex.70 if you have separate I/D (and floating point). # Take a look at ex_tune.h and ex_local.h before compiling. # BINDIR= /bin NBINDIR=/usr/new/bin LIBDIR= /usr/lib FOLD= /usr/ucb/fold CTAGS= /usr/ucb/ctags XSTR= /usr/ucb/xstr CC= cc -V AS= as -V LD= ld TERMLIB= -lovtermcap DEBUGFLAGS= -DTRACE NONDEBUGFLAGS= -O DEB= ${NONDEBUGFLAGS} # or ${DEBUGFLAGS} to to debug MKSTR= /usr/ucb/mkstr CXREF= /usr/ucb/cxref # Use ovprintf and ovdoprnt on PDP11's, printf elsewhere # PRINTF= printf.o # PRINTFS=printf.c PRINTF= ovprintf.o ovdoprnt.o PRINTFS=ovprintf.c ovdoprnt.s PR= pr GET= sccs get 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_unix.o \ ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \ ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \ ${PRINTF} bcopy.o ex_extern.o strings.o SRCS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h\ ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c \ ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c \ ex_set.c ex_subr.c ex_temp.c ex_tty.c ex_unix.c \ ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c \ ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c \ ${PRINTFS} bcopy.c .c.o: ${MKSTR} - ex${VERSION}strings x $*.c ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c - rm -f x$*.c ${CC} ${CFLAGS} -c x.c mv x.o $*.o all: ex.${PDP} exrecover expreserve # install in standard place (/bin) cp: ex.${PDP} exrecover expreserve -rm -f ${DESTDIR}${BINDIR}/ex -rm -f ${DESTDIR}${BINDIR}/vi -rm -f ${DESTDIR}${BINDIR}/view -rm -f ${DESTDIR}${BINDIR}/edit -rm -f ${DESTDIR}${BINDIR}/e cp ex.${PDP} ${DESTDIR}${BINDIR}/ex cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/edit ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/e ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/vi ln ${DESTDIR}${BINDIR}/ex ${DESTDIR}${BINDIR}/view chmod 1755 ${DESTDIR}${BINDIR}/ex cp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover cp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve chmod 4755 ${DESTDIR}${LIBDIR}/ex${VERSION}recover ${DESTDIR}${LIBDIR}/ex${VERSION}preserve # The following line normally fails. This is OK. -mkdir ${DESTDIR}/usr/preserve rm *.o ex.${PDP} cmp: ex.${PDP} exrecover expreserve cmp ex.${PDP} ${DESTDIR}${BINDIR}/ex cmp exrecover ${DESTDIR}${LIBDIR}/ex${VERSION}recover cmp expreserve ${DESTDIR}${LIBDIR}/ex${VERSION}preserve rm *.o # 11/23, 34, 40 and other non split I/D machines # each of the 5 overlays must stay less than 16K. ex.40: ${OBJS} ${LD} -X ${FSTARTUP} -n -o ex.40\ -Z ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_re.o \ -Z ex_vadj.o ex_vmain.o ex_voper.o ex_vwind.o ex_vops3.o\ -Z ex_v.o ex_vget.o ex_vops.o ex_vops2.o ex_vput.o\ -Z ex_get.o ex_io.o ex_temp.o ex_tty.o ex_unix.o ex_addr.o ex.o ex_set.o ${TERMLIB} \ -L ex_put.o ex_subr.o ${PRINTF} strings.o \ ex_data.o ex_extern.o -lovc ex.34: ${OBJS} ${LD} -X ${STARTUP} -n -o ex.34\ -Z ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_re.o \ -Z ex_vadj.o ex_vmain.o ex_voper.o ex_vwind.o ex_vops3.o\ -Z ex_v.o ex_vget.o ex_vops.o ex_vops2.o ex_vput.o\ -Z ex_get.o ex_io.o ex_temp.o ex_tty.o ex_unix.o ex_addr.o ex.o ex_set.o ${TERMLIB} \ -L ex_put.o ex_subr.o ${PRINTF} strings.o \ ex_data.o ex_extern.o -lovc ex.70: ${OBJS} ${LD} -X ${STARTUP} -i -o ex.70\ -Z ex_voper.o ex_vget.o ex_vops.o ex_vops2.o ex_vops3.o \ -Z ex_set.o ex_re.o ex_io.o ex_tty.o ex_unix.o ex.o\ -L ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_get.o ex_temp.o\ ex_v.o ex_vadj.o ex_vmain.o ex_vwind.o\ ex_vput.o ex_put.o ex_subr.o ${PRINTF} strings.o \ ex_data.o ex_extern.o ${TERMLIB} -lovc tags: /tmp ${CTAGS} -w ex.[hc] ex_*.[hc] # ex_vars.h: # csh makeoptions ${CFLAGS} strings.o: strings ${XSTR} ${CC} -c -S xs.c # ed -