Minix1.5/commands/elvis/Makefile.s5

# UNIX SysV Makefile for ELVIS - a clone of `vi`
#
# This Makefile is pretty close to what you would want for SysV UNIX.
# You may wish to change the LIBS line to look like this:
#
#	LIBS=	-lterminfo
#
# Also, for SCO Xenix, you should add the following line:
#
#	CC=	cc -M2 -i
#
# Use `make` to to compile all programs
# Use `make clean` to remove all object files
# Use `make clobber` to remove everything except source & documentation
# Use `make tags` to build new "tags" and "refs" files
# Use `make tar` to produce uuencoded compressed tar archives of the source

SRC=	blk.c cmd1.c cmd2.c curses.c cut.c ex.c input.c main.c misc.c\
	modify.c move1.c move2.c move3.c move4.c opts.c redraw.c regexp.c\
	regsub.c system.c tio.c tmp.c vars.c vcmd.c vi.c
OBJS=	blk.o cmd1.o cmd2.o curses.o cut.o ex.o input.o main.o misc.o\
	modify.o move1.o move2.o move3.o move4.o opts.o redraw.o regexp.o\
	regsub.o system.o tio.o tmp.o vars.o vcmd.o vi.o recycle.o
EXTRA=
CFLAGS=	-O -DM_SYSV
LIBS=	-ltermcap

all: elvis ctags ref virecover

elvis: $(OBJS) $(EXTRA)
	$(CC) -o elvis $(OBJS) $(EXTRA) $(LIBS)

ctags: ctags.c
	$(CC) -DSORT ctags.c -o ctags

ref: ref.c
	$(CC) ref.c -o ref

virecover: virecover.c
	$(CC) $(CFLAGS) virecover.c -o virecover

# The file cmd1.c is compiled with the extra flag -DDATE="today's date".
# This date is reported when elvis is run and the :version command is given.
# If you have trouble defining the date in this way, then just comment out
# these two lines so cmd1.c is compiled normally.  The :version command
# won't report the compilation date, but that's really no big deal.
cmd1.o: cmd1.c vi.h
	eval $(CC) -c $(CFLAGS) -DDATE=\'\"`date`\"\' cmd1.c

clean:
	rm -f *.o *.uue core

clobber: clean
	rm -f tags refs elvis ctags ref virecover

tags refs: ctags
	./ctags -r *.[ch]

tar: elvis1.uue elvis2.uue elvis3.uue elvis4.uue elvis5.uue elvis6.uue\
		elvis7.uue elvis8.uue

elvis1.uue:
	tar cf elvis1.tar doc/[a-z]*
	cp doc/README elvis1.uue
	compress -b13 elvis1.tar
	uuencode elvis1.tar.Z <elvis1.tar.Z >>elvis1.uue
	rm elvis1.tar*

elvis2.uue:
	tar cf elvis2.tar doc/[A-Z]* ctags.c ref.c virecover.c
	compress -b13 elvis2.tar
	uuencode elvis2.tar.Z <elvis2.tar.Z >elvis2.uue
	rm elvis2.tar*

elvis3.uue:
	tar cf elvis3.tar Makefile.* cmd1.c cmd2.c
	compress -b13 elvis3.tar
	uuencode elvis3.tar.Z <elvis3.tar.Z >elvis3.uue
	rm elvis3.tar*

elvis4.uue: curses.c curses.h cut.c ex.c input.c main.c
	tar cf elvis4.tar curses.c curses.h cut.c ex.c input.c main.c
	compress -b13 elvis4.tar
	uuencode elvis4.tar.Z <elvis4.tar.Z >elvis4.uue
	rm elvis4.tar*

elvis5.uue:
	tar cf elvis5.tar misc.c modify.c move1.c move2.c move3.c move4.c blk.c recycle.c
	compress -b13 elvis5.tar
	uuencode elvis5.tar.Z <elvis5.tar.Z >elvis5.uue
	rm elvis5.tar*

elvis6.uue:
	tar cf elvis6.tar opts.c regexp.c regexp.h regsub.c
	compress -b13 elvis6.tar
	uuencode elvis6.tar.Z <elvis6.tar.Z >elvis6.uue
	rm elvis6.tar*

elvis7.uue:
	tar cf elvis7.tar system.c tio.c tmp.c vars.c vcmd.c
	compress -b13 elvis7.tar
	uuencode elvis7.tar.Z <elvis7.tar.Z >elvis7.uue
	rm elvis7.tar*

elvis8.uue:
	tar cf elvis8.tar vi.c vi.h redraw.c
	compress -b13 elvis8.tar
	uuencode elvis8.tar.Z <elvis8.tar.Z >elvis8.uue
	rm elvis8.tar*