#~!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.4 1995/04/19 23:07:58 jbev Exp $"

# $Log $
#

# Make parameters when using NBC on UNIX

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

# Fill in with correct information

OBJECTS = diff.o diffh.o cmp.o sdiff.o

HDRS =

SRCS = diff.c diffh.c cmp.c sdiff.c

MAIN = diff diffh cmp sdiff

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

diff:	$(MAKEFILE) diff.o
	touch diff
##	$(CC) $(LDFLAGS) diff.o -o diff -Ydiffmap
#	$(BIN)/chmod 755 diff
#	$(BIN)/chgrp system diff
#	$(BIN)/chown system diff
#	$(BIN)/touch diff

diffh:	$(MAKEFILE) diffh.o
	touch diffh
##	$(CC) $(LDFLAGS) diffh.o -o diffh -Ydiffhmap
#	$(BIN)/chmod 755 diffh
#	$(BIN)/chgrp system diffh
#	$(BIN)/chown system diffh
#	$(BIN)/touch diffh

cmp:	$(MAKEFILE) cmp.o
	touch cmp
##	$(CC) $(LDFLAGS) cmp.o -o cmp -Ycmpmap
#	$(BIN)/chmod 755 cmp
#	$(BIN)/chgrp system cmp
#	$(BIN)/chown system cmp
#	$(BIN)/touch cmp

sdiff:	$(MAKEFILE) sdiff.o
	touch sdiff
##	$(CC) $(LDFLAGS) sdiff.o -o sdiff -Ysdiffmap
#	$(BIN)/chmod 755 sdiff
#	$(BIN)/chgrp system sdiff
#	$(BIN)/chown system sdiff
#	$(BIN)/touch sdiff

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

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

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

INSTALL: install
install: all
	$(BIN)/cp $(MAIN) $(SBIN)
	$(BIN)/cp $(MAIN) $(BIN)

DELETE: delete
delete:	clobber
	$(BIN)/rm -f $(SRCS) $(HDRS) $(MAKEFILE)

# DO NOT DELETE THIS LINE -- the dependencies begin here
