LIBES = ../com/comobj.a ../hdr/libsc.a
CFLAGS = -O
I = /usr/include

all:            admin bdiff comb delta get prt rmdel what


admin:          admin.c         ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h ../hdr/had.h $I/pwd.h $LIBES
	cc -n $CFLAGS -o admin admin.c $LIBES
/bin/admin:	admin
	/etc/instcmd admin /bin/admin


bdiff:          bdiff.c         ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h $LIBES
	cc -n $CFLAGS -o bdiff bdiff.c $LIBES
/bin/bdiff:	bdiff
	/etc/instcmd bdiff /bin/bdiff

chghist:        rmdel
/bin/chghist:   /bin/rmdel

comb:           comb.c          ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h ../hdr/had.h $LIBES
	cc -n $CFLAGS -o comb comb.c $LIBES
/bin/comb:	comb
	/etc/instcmd comb /bin/comb


delta:          delta.c         ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h ../hdr/had.h $I/pwd.h $LIBES
	cc -n $CFLAGS -o delta delta.c $LIBES
/bin/delta:	delta
	/etc/instcmd delta /bin/delta


get:            get.c           ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h ../hdr/had.h $I/pwd.h $LIBES
	cc -n $CFLAGS -o get get.c $LIBES
/bin/get:	get
	/etc/instcmd get /bin/get


prt:            prt.c           ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h ../hdr/had.h $LIBES
	cc -n $CFLAGS -o prt prt.c $LIBES
/bin/prt:	prt
	/etc/instcmd prt /bin/prt


rmdel:          rmdel.c         ../hdr/defines.h /usr/src/util/macros.h $I/sys/types.h \
				$I/sys/stat.h $I/stdio.h /usr/src/util/fatal.h \
				$I/time.h ../hdr/had.h $I/pwd.h $LIBES
	cc -n $CFLAGS -o rmdel rmdel.c $LIBES
/bin/rmdel:	rmdel
	/etc/instcmd rmdel /bin/rmdel /bin/chghist


what:           what.c          $I/stdio.h $LIBES
	cc -n $CFLAGS -o what what.c $LIBES
/bin/what:	what
	/etc/instcmd what /bin/what

../com/comobj.a:
	cd ../com; make comobj.a
../hdr/libsc.a:
	cd /usr/src/util; make libsc.a
