#~!Makefile for diff
# Name:  Makefile Part No.: _______-____r
#
# Copyright 1995 - J B Systems, Morrison, CO
#
# The recipient of this product specifically agrees not to distribute,
# disclose, or disseminate in any way, to any one, nor use for its own
# benefit, or the benefit of others, any information contained  herein
# without the expressed written consent of J B Systems.
#
#                     RESTRICTED RIGHTS LEGEND
#
# Use, duplication, or disclosure by the Government is  subject  to
# restriction  as  set forth in paragraph (b) (3) (B) of the Rights
# in Technical Data and Computer Software  Clause  in  DAR  7-104.9
# (a).
#

#ident	"$Id: makefile,v 1.5 1995/04/18 00:02:26 jbev Exp $"

# $Log $
#

# Make parameters when using NBC on UNIX

ROOT = /
TARGET = /system/bin
SOURCE = .
PREFIX = nb
INCLUDE = /system/nbinclude
SINCLUDE = $(INCLUDE)/sys
BIN = /system/bin
SBIN = /system/bin
UBIN = /system/bin
LIB = /system/bin
YBIN = /system/bin
CC = $(UBIN)/$(PREFIX)cc
CFLAGS = -DMPX
CPP = $(LIB)/$(PREFIX)cpp
CPFLAGS = -M $(CFLAGS)
LD = $(UBIN)/$(PREFIX)cat
LDFLAGS =
YACC = $(YBIN)/$(PREFIX)yacc
YFLAGS =
MAKEFILE = makefile
srcdir = .

# Object files
OBJECTS = diff.o analyze.o cmpbuf.o io.o context.o ed.o normal.o ifdef.o \
	util.o dir.o version.o regex.o side.o \
	diff3.o sdiff.o cmp.o error.o xmalloc.o getopt.o getopt1.o \
	fnmatch.o alloca.o

HDRS = diff.h cmpbuf.h config.h fnmatch.h getopt.h regex.h remap.h system.h 

# The source files for all of the programs.
SRCS = diff.c analyze.c cmpbuf.c io.c context.c ed.c normal.c ifdef.c \
	util.c dir.c version.c regex.c side.c \
	diff3.c sdiff.c cmp.c error.c xmalloc.c getopt.c getopt1.c \
	fnmatch.c alloca.c

MAIN = diff diff3 sdiff cmp

ALL:	all

all:	$(MAIN)
	$(BIN)/echo $(MAIN) is up to date.

#$(MAIN):	$(MAKEFILE) $(OBJECTS)
#	$(CC) $(LDFLAGS) $(OBJECTS) -o $(MAIN)
#	$(BIN)/chmod 755 $(MAIN)
#	$(BIN)/chgrp bin $(MAIN)
#	$(BIN)/chown bin $(MAIN)
	$(BIN)/touch $(MAIN)

CLEAN:  clean

clean:
	$(BIN)/rm -f $(OBJECTS)

CLOBBER: clobber

clobber: clean
	$(BIN)/rm -f $(MAIN)
	$(BIN)/rm -f diffmap diff3map sdiffmap cmpmap

DEPEND: depend

depend: $(SRCS) $(HDRS) $(MAKEFILE)
	$(BIN)/mkdep $(MAKEFILE) >dep.out;
	@for i in $(SRCS); do \
	$(BIN)/echo "# Source file '$$i'" >> dep.out; \
	$(CPP) -DHAVE_CONFIG_H -I$(srcdir) $(CPFLAGS) $$i >> dep.out; \
	done;
	$(BIN)/echo "# End of dependencies" >> dep.out;
	$(BIN)/mv dep.out $(MAKEFILE);

COMPILE = $(CC) -c -DHAVE_CONFIG_H $(CPPFLAGS) -I$(srcdir) $(CFLAGS)

.c.o:
	$(COMPILE) $<

diff_o = diff.o analyze.o cmpbuf.o dir.o io.o util.o \
	context.o ed.o ifdef.o normal.o side.o \
	fnmatch.o getopt.o getopt1.o regex.o version.o $(ALLOCA)
diff: $(diff_o)
	$(CC) -o $@ -Ydiffmap $(LDFLAGS) $(diff_o) $(LIBS)

diff3_o = diff3.o getopt.o getopt1.o version.o
diff3: $(diff3_o)
	$(CC) -o $@ -Ydiff3map $(LDFLAGS) $(diff3_o) $(LIBS)

sdiff_o = sdiff.o getopt.o getopt1.o version.o
sdiff: $(sdiff_o)
	$(CC) -o $@ -Ysdiffmap $(LDFLAGS) $(sdiff_o) $(LIBS)

cmp_o = cmp.o cmpbuf.o error.o getopt.o getopt1.o xmalloc.o version.o
cmp: $(cmp_o)
	$(CC) -o $@ -Ycmpmap $(LDFLAGS) $(cmp_o) $(LIBS)

$(diff_o): diff.h system.h
cmp.o diff3.o sdiff.o: system.h
context.o diff.o regex.o: regex.h
cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
diff.o fnmatch.o: fnmatch.h
analyze.o cmpbuf.o cmp.o: cmpbuf.h

diff3.o: diff3.c
	$(COMPILE) -DDIFF_PROGRAM=\"$(bindir)/$(binprefix)diff\" $(srcdir)/diff3.c

sdiff.o: sdiff.c
	$(COMPILE) -DDIFF_PROGRAM=\"$(bindir)/$(binprefix)diff\" $(srcdir)/sdiff.c

# DO NOT DELETE THIS LINE -- the dependencies begin here
# Source file 'diff.c'
diff.o: diff.c
diff.o: ./diff.h
diff.o: ./remap.h
diff.o: ./system.h
diff.o: ./config.h
diff.o: ./remap.h
diff.o: /system/nbinclude/sys/types.h
diff.o: /system/nbinclude/sys/stat.h
diff.o: /system/nbinclude/types.h
diff.o: /system/nbinclude/time.h
diff.o: /system/nbinclude/dirent.h
diff.o: /system/nbinclude/limits.h
diff.o: /system/nbinclude/string.h
diff.o: /system/nbinclude/errno.h
diff.o: /system/nbinclude/ctype.h
diff.o: /system/nbinclude/stdio.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./regex.h
diff.o: ./getopt.h
diff.o: ./fnmatch.h
diff.o: ./fnmatch.h
# Source file 'analyze.c'
analyze.o: analyze.c
analyze.o: ./diff.h
analyze.o: ./remap.h
analyze.o: ./system.h
analyze.o: ./config.h
analyze.o: ./remap.h
analyze.o: /system/nbinclude/sys/types.h
analyze.o: /system/nbinclude/sys/stat.h
analyze.o: /system/nbinclude/types.h
analyze.o: /system/nbinclude/time.h
analyze.o: /system/nbinclude/dirent.h
analyze.o: /system/nbinclude/limits.h
analyze.o: /system/nbinclude/string.h
analyze.o: /system/nbinclude/errno.h
analyze.o: /system/nbinclude/ctype.h
analyze.o: /system/nbinclude/stdio.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./regex.h
analyze.o: ./cmpbuf.h
analyze.o: analyze.c
# Source file 'cmpbuf.c'
cmpbuf.o: cmpbuf.c
cmpbuf.o: ./system.h
cmpbuf.o: ./config.h
cmpbuf.o: ./remap.h
cmpbuf.o: /system/nbinclude/sys/types.h
cmpbuf.o: /system/nbinclude/sys/stat.h
cmpbuf.o: /system/nbinclude/types.h
cmpbuf.o: /system/nbinclude/time.h
cmpbuf.o: /system/nbinclude/dirent.h
cmpbuf.o: /system/nbinclude/limits.h
cmpbuf.o: /system/nbinclude/string.h
cmpbuf.o: /system/nbinclude/errno.h
cmpbuf.o: ./cmpbuf.h
# Source file 'io.c'
io.o: io.c
io.o: ./diff.h
io.o: ./remap.h
io.o: ./system.h
io.o: ./config.h
io.o: ./remap.h
io.o: /system/nbinclude/sys/types.h
io.o: /system/nbinclude/sys/stat.h
io.o: /system/nbinclude/types.h
io.o: /system/nbinclude/time.h
io.o: /system/nbinclude/dirent.h
io.o: /system/nbinclude/limits.h
io.o: /system/nbinclude/string.h
io.o: /system/nbinclude/errno.h
io.o: /system/nbinclude/ctype.h
io.o: /system/nbinclude/stdio.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
io.o: ./regex.h
# Source file 'context.c'
context.o: context.c
context.o: ./diff.h
context.o: ./remap.h
context.o: ./system.h
context.o: ./config.h
context.o: ./remap.h
context.o: /system/nbinclude/sys/types.h
context.o: /system/nbinclude/sys/stat.h
context.o: /system/nbinclude/types.h
context.o: /system/nbinclude/time.h
context.o: /system/nbinclude/dirent.h
context.o: /system/nbinclude/limits.h
context.o: /system/nbinclude/string.h
context.o: /system/nbinclude/errno.h
context.o: /system/nbinclude/ctype.h
context.o: /system/nbinclude/stdio.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
context.o: ./regex.h
# Source file 'ed.c'
ed.o: ed.c
ed.o: ./diff.h
ed.o: ./remap.h
ed.o: ./system.h
ed.o: ./config.h
ed.o: ./remap.h
ed.o: /system/nbinclude/sys/types.h
ed.o: /system/nbinclude/sys/stat.h
ed.o: /system/nbinclude/types.h
ed.o: /system/nbinclude/time.h
ed.o: /system/nbinclude/dirent.h
ed.o: /system/nbinclude/limits.h
ed.o: /system/nbinclude/string.h
ed.o: /system/nbinclude/errno.h
ed.o: /system/nbinclude/ctype.h
ed.o: /system/nbinclude/stdio.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
ed.o: ./regex.h
# Source file 'normal.c'
normal.o: normal.c
normal.o: ./diff.h
normal.o: ./remap.h
normal.o: ./system.h
normal.o: ./config.h
normal.o: ./remap.h
normal.o: /system/nbinclude/sys/types.h
normal.o: /system/nbinclude/sys/stat.h
normal.o: /system/nbinclude/types.h
normal.o: /system/nbinclude/time.h
normal.o: /system/nbinclude/dirent.h
normal.o: /system/nbinclude/limits.h
normal.o: /system/nbinclude/string.h
normal.o: /system/nbinclude/errno.h
normal.o: /system/nbinclude/ctype.h
normal.o: /system/nbinclude/stdio.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
normal.o: ./regex.h
# Source file 'ifdef.c'
ifdef.o: ifdef.c
ifdef.o: ./diff.h
ifdef.o: ./remap.h
ifdef.o: ./system.h
ifdef.o: ./config.h
ifdef.o: ./remap.h
ifdef.o: /system/nbinclude/sys/types.h
ifdef.o: /system/nbinclude/sys/stat.h
ifdef.o: /system/nbinclude/types.h
ifdef.o: /system/nbinclude/time.h
ifdef.o: /system/nbinclude/dirent.h
ifdef.o: /system/nbinclude/limits.h
ifdef.o: /system/nbinclude/string.h
ifdef.o: /system/nbinclude/errno.h
ifdef.o: /system/nbinclude/ctype.h
ifdef.o: /system/nbinclude/stdio.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
ifdef.o: ./regex.h
# Source file 'util.c'
util.o: util.c
util.o: ./diff.h
util.o: ./remap.h
util.o: ./system.h
util.o: ./config.h
util.o: ./remap.h
util.o: /system/nbinclude/sys/types.h
util.o: /system/nbinclude/sys/stat.h
util.o: /system/nbinclude/types.h
util.o: /system/nbinclude/time.h
util.o: /system/nbinclude/dirent.h
util.o: /system/nbinclude/limits.h
util.o: /system/nbinclude/string.h
util.o: /system/nbinclude/errno.h
util.o: /system/nbinclude/ctype.h
util.o: /system/nbinclude/stdio.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
util.o: ./regex.h
# Source file 'dir.c'
dir.o: dir.c
dir.o: ./diff.h
dir.o: ./remap.h
dir.o: ./system.h
dir.o: ./config.h
dir.o: ./remap.h
dir.o: /system/nbinclude/sys/types.h
dir.o: /system/nbinclude/sys/stat.h
dir.o: /system/nbinclude/types.h
dir.o: /system/nbinclude/time.h
dir.o: /system/nbinclude/dirent.h
dir.o: /system/nbinclude/limits.h
dir.o: /system/nbinclude/string.h
dir.o: /system/nbinclude/errno.h
dir.o: /system/nbinclude/ctype.h
dir.o: /system/nbinclude/stdio.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
dir.o: ./regex.h
# Source file 'version.c'
version.o: version.c
version.o: ./config.h
version.o: ./remap.h
# Source file 'regex.c'
regex.o: regex.c
regex.o: ./config.h
regex.o: ./remap.h
regex.o: /system/nbinclude/sys/types.h
regex.o: ./config.h
regex.o: ./remap.h
regex.o: /system/nbinclude/string.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: ./regex.h
regex.o: /system/nbinclude/ctype.h
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
regex.o: regex.c
# Source file 'side.c'
side.o: side.c
side.o: ./diff.h
side.o: ./remap.h
side.o: ./system.h
side.o: ./config.h
side.o: ./remap.h
side.o: /system/nbinclude/sys/types.h
side.o: /system/nbinclude/sys/stat.h
side.o: /system/nbinclude/types.h
side.o: /system/nbinclude/time.h
side.o: /system/nbinclude/dirent.h
side.o: /system/nbinclude/limits.h
side.o: /system/nbinclude/string.h
side.o: /system/nbinclude/errno.h
side.o: /system/nbinclude/ctype.h
side.o: /system/nbinclude/stdio.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
side.o: ./regex.h
# Source file 'diff3.c'
diff3.o: diff3.c
diff3.o: ./system.h
diff3.o: ./config.h
diff3.o: ./remap.h
diff3.o: /system/nbinclude/sys/types.h
diff3.o: /system/nbinclude/sys/stat.h
diff3.o: /system/nbinclude/types.h
diff3.o: /system/nbinclude/time.h
diff3.o: /system/nbinclude/dirent.h
diff3.o: /system/nbinclude/limits.h
diff3.o: /system/nbinclude/string.h
diff3.o: /system/nbinclude/errno.h
diff3.o: /system/nbinclude/stdio.h
diff3.o: /system/nbinclude/ctype.h
diff3.o: ./getopt.h
# Source file 'sdiff.c'
sdiff.o: sdiff.c
sdiff.o: ./system.h
sdiff.o: ./config.h
sdiff.o: ./remap.h
sdiff.o: /system/nbinclude/sys/types.h
sdiff.o: /system/nbinclude/sys/stat.h
sdiff.o: /system/nbinclude/types.h
sdiff.o: /system/nbinclude/time.h
sdiff.o: /system/nbinclude/dirent.h
sdiff.o: /system/nbinclude/limits.h
sdiff.o: /system/nbinclude/string.h
sdiff.o: /system/nbinclude/errno.h
sdiff.o: /system/nbinclude/stdio.h
sdiff.o: /system/nbinclude/ctype.h
sdiff.o: /system/nbinclude/signal.h
sdiff.o: ./getopt.h
# Source file 'cmp.c'
cmp.o: cmp.c
cmp.o: ./system.h
cmp.o: ./config.h
cmp.o: ./remap.h
cmp.o: /system/nbinclude/sys/types.h
cmp.o: /system/nbinclude/sys/stat.h
cmp.o: /system/nbinclude/types.h
cmp.o: /system/nbinclude/time.h
cmp.o: /system/nbinclude/dirent.h
cmp.o: /system/nbinclude/limits.h
cmp.o: /system/nbinclude/string.h
cmp.o: /system/nbinclude/errno.h
cmp.o: /system/nbinclude/stdio.h
cmp.o: ./getopt.h
cmp.o: ./cmpbuf.h
# Source file 'error.c'
error.o: error.c
error.o: ./config.h
error.o: ./remap.h
error.o: /system/nbinclude/stdio.h
error.o: /system/nbinclude/varargs.h
# Source file 'xmalloc.c'
xmalloc.o: xmalloc.c
xmalloc.o: ./config.h
xmalloc.o: ./remap.h
xmalloc.o: /system/nbinclude/sys/types.h
# Source file 'getopt.c'
getopt.o: getopt.c
getopt.o: ./config.h
getopt.o: ./remap.h
getopt.o: /system/nbinclude/stdio.h
getopt.o: ./getopt.h
# Source file 'getopt1.c'
getopt1.o: getopt1.c
getopt1.o: ./config.h
getopt1.o: ./remap.h
getopt1.o: ./getopt.h
getopt1.o: /system/nbinclude/stdio.h
# Source file 'fnmatch.c'
fnmatch.o: fnmatch.c
fnmatch.o: ./config.h
fnmatch.o: ./remap.h
fnmatch.o: /system/nbinclude/errno.h
fnmatch.o: ./fnmatch.h
fnmatch.o: ./fnmatch.h
fnmatch.o: /system/nbinclude/ctype.h
# Source file 'alloca.c'
alloca.o: alloca.c
alloca.o: ./config.h
alloca.o: ./remap.h
# End of dependencies
