#$Header: buildtemplate,v 3.5 86/01/21 21:09:20 mann Exp $

o = $(OBJSUFFIX)
m = $(MACHINE)
INCLUDES =

# Copyright (C) 1982 by Walter F. Tichy
#                       Purdue University
#                       Computer Science Department
#                       West Lafayette, IN 47907
#
# All rights reserved. No part of this software may be sold or distributed
# in any form or by any means without the prior written permission of the
# author.
# Report problems and direct all inquiries to
# tichy@purdue, tichy@purdue-tcp, decvax!pur-ee!purdue!tichy


#               INSTRUCTIONS
#               ============
#
# 0.  Do the instructions in rcsbase.h
#
# 1.  Figure out where to put the modified diff and diff3 commands, and
#     install them. (Read the instructions in the Make-files).
#     Define the macros DIFF and DIFF3 accordingly (below).
DIFF      = diff
DIFF3     = /usr/new/lib/rdiff3

# 2.  Implant the macro DIFF3 as modified by you into the file merge.
#     (That's a shell file.)

# 3.  Figure out where to put the RCS commands; define TARGETDIR
#     and merge accordingly.
#TARGETDIR = /usr/new
TARGETDIR = .
#above makes it search down user's PATH for things.

MERGE     = /usr/new/merge

# 4.  Figure out where to put your old RCS commands; define OLDDIR
#     accordingly. This is not needed if you don't have an old release of RCS.
#     Instead, comment out the 5 lines in INSTALLNO that mv the old RCS
#     commands to OLDDIR.
OLDDIR    = /usr/old

# 5.  Decide what loader flags you need, and define LDFLAGS accordingly.
#     On the Vax you need none, on PDP-11s with split i/d you need -i.
#LDFLAGS   =
#LDFLAGS  = -i
LDFLAGS= -v$(Xx)V
LIBS= 

# 6.  RCS can maintain a log of the use of the co and ci commands. If you
#     want the logging, you must
#     a) define SNOOP (that's where the process that writes the log goes),
#     b) define SNOOPFILE (that's the file where SNOOP writes the log; it must
#        be owned by the same user that owns SNOOP),
#     c) include SNOOP and SNOOPFILE in the CFLAGS macro.
#     If you don't want the logging of command usage, omit the SNOOP and
#     SNOOPFILE definitions from CFLAGS.
#     The two variants of the CFLAG macros are given below.
SNOOPFILE = /usr/wft/RCSLOG/log
SNOOP     = /usr/wft/BIN/snoop
#CFLAGS    = -O -DCOMPAT2 '-DDIFF="$(DIFF)"' '-DMERGE="$(MERGE)"' '-DTARGETDIR="$(TARGETDIR)"' '-DSNOOPFILE="$(SNOOPFILE)"' '-DSNOOP="$(SNOOP)"'
CFLAGS   = -O '-DDIFF="$(DIFF)"' '-DMERGE="$(MERGE)"' '-DTARGETDIR="$(TARGETDIR)"'
MIFLAGS = $(CFLAGS) -v$(Xx)V

# 7.  If you don't have release 2 RCS files around (e.g., if you don't have
#     an old release of RCS), remove the word -DCOMPAT2 from whatever
#     variant of CFLAGS you selected. -DCOMPAT2 assures that release 2
#     RCS files can still be read. (After all release 2 RCS files have
#     been updated with release 3 ci or rcs, you can remake RCS without
#     -DCOMPAT2.) Also, make sure that the co commands at the end of this
#     file are commented out; otherwise, Make will complain.
#
# 8.  Now you are ready. Try to make all. If all went well, make
#     INSTALLW if you want the logging of command usage, INSTALLNO otherwise.
#
# 9.  IMPORTANT! When you have RCS installed, rename old RCS files as
#     follows (if you have any):
#     If the working file was "f.c" and the RCS file "f.c.v", rename the
#     RCS file to "f.c,v". If the working file was "f.c" and the RCS file
#     "f.v", rename the RCS file "f.c,v". Thus, suffixes are no longer
#     dropped and RCS files end in ",v" rather than ".v".
#
# 10. If you want to maintain RCS with itself, be sure you preserve the
#     original revision numbers, dates, etc. This is done by checking the
#     files in with the -k option. When done, remove the comments from the
#     co-rules at the end of this file.

OBJECTS = rcslex.$o rcssyn.$o rcsrev.$o rcsgen.$o rcssynTST.$o rcsrevTST.$o\
	rcsedit.$o rcsutil.$o rcsfnms.$o co.$o ci.$o ident.$o rlog.$o rcs.$o\
	rcsdiff.$o rcsmerge.$o rcskeep.$o rcsfcmp.$o snoop.$o
RCSCOMMANDS = ci.$m ident.$m rcs.$m rcsdiff.$m rcsmerge.$m rlog.$m co.$m

default: merge $(RCSCOMMANDS)

clean:
	rm -f *.$o $(RCSCOMMANDS) snoop.$m

relink:
	rm -f $(RCSCOMMANDS) snoop.$m

install:
	$(NETINSTALL) -p  "$(RCSCOMMANDS)" $(VSYS)/bin

depend:;

$(OBJECTS):	rcsbase.h

partime.$o maketime.$o co.$o ci.$o rlog.$o rcsutil.$o:	time.h

CI = ci.$o rcslex.$o rcssyn.$o rcsgen.$o rcsedit.$o rcsrev.$o rcsutil.$o rcsfnms.$o rcskeep.$o rcsfcmp.$o
ci.$m:		$(CI); $(CC) $(LDFLAGS) -o ci.$m $(CI) $(LIBS)

CO = co.$o rcslex.$o rcssyn.$o rcsgen.$o rcsedit.$o rcsrev.$o rcsutil.$o rcsfnms.$o partime.$o maketime.$o
co.$m:		$(CO); $(CC) $(LDFLAGS) -o co.$m $(CO) $(LIBS)

ident.$m:		ident.$o
		$(CC) $(LDFLAGS) -o ident.$m ident.$o $(LIBS)

RLOG = rlog.$o rcslex.$o rcssyn.$o rcsrev.$o rcsutil.$o partime.$o maketime.$o rcsfnms.$o
rlog.$m:		$(RLOG); $(CC) $(LDFLAGS) -o rlog.$m $(RLOG) $(LIBS)

RCS = rcs.$o rcslex.$o rcssyn.$o rcsrev.$o rcsutil.$o rcsgen.$o rcsedit.$o rcsfnms.$o
rcs.$m:		$(RCS); $(CC) $(LDFLAGS) -o rcs.$m $(RCS) $(LIBS)

RCSDIFF = rcsdiff.$o rcsutil.$o rcsfnms.$o rcsrev.$o rcssyn.$o rcslex.$o
rcsdiff.$m:	$(RCSDIFF); $(CC) $(LDFLAGS) -o rcsdiff.$m $(RCSDIFF) $(LIBS)

RCSMERGE = rcsmerge.$o rcsutil.$o rcsfnms.$o rcsrev.$o rcssyn.$o rcslex.$o
rcsmerge.$m:	$(RCSMERGE); $(CC) $(LDFLAGS) -o rcsmerge.$m $(RCSMERGE) $(LIBS)

snoop.$m:		snoop.$o
		$(CC) $(LDFLAGS) -o snoop.$m snoop.$o $(LIBS)

