#
# Copyright 1991-1994 by The University of Texas at Austin
# All rights reserved.
#
# For infomation contact:
# Rick Watson
# University of Texas
# Computation Center, COM 1
# Austin, TX 78712
# r.watson@utexas.edu
# 512-471-3241
#
#
# MPW-style lines for the MakeFile.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
# TEXT, which is what we want.  The non-ASCII chars are necessary for MPW 
# Make.

all  'CNS Config'

#define dangerouspattersn
INCFOLDER= :::include:

OBJS = 
	kconfig.c.o 
	WindowUtil.c.o 
	kadm.c.o 
	mac_stubs.c.o 
	des_cornell.c.o 
	dnr.c.o

COptions = -sym full -w -mbg ch8 -b -r -i "{INCFOLDER}"

#
# our ldef
#
ldef.rsrc  ldef.c.o
	Link -w -rt LDEF=128 ldef.c.o -o ldef.rsrc
	
#
# kconfig
#
'CNS Config'  kconfig.r kconfig.rsrc kconfig.vers ldef.rsrc {OBJS}
	Delete -i 'CNS Config'
	Link -sym Full -map -mf -ra =resProtected -msg nodup -o 'CNS Config' 
		-t APPL -c 'RWkc' -l 
		{OBJS} 
		"{Libraries}"Interface.o 
		"{CLibraries}"StdCLib.o 
		"{Libraries}"Runtime.o 
		> 'CNS Config.map'
	Rez -append -o 'CNS Config' kconfig.r
	setfile -a B 'CNS Config'
	
SRCS= 
	glue.h 
	ldef.c 
	Makefile 
	kconfig.c 
	kconfig.h 
	kconfig.r 
	kconfig.rsrc 
	kconfig.vers 
	WindowUtil.c 
	WindowUtil.h 
	ReleaseNotes 
	kadm.c 
	kadm.h 
	dnr.c 
	encrypt.h

mac_stubs.c  :::lib:krb:mac_stubs.c
	duplicate -y :::lib:krb:mac_stubs.c mac_stubs.c

# version 8.0 is K8 10/08/93
# version 9.0 is K9 10/14/93
# version 10.0 is version released to Cygnus, 9/8/94
	
newversion 
	set newversion 10.0
	project kconfigProject
	for i in {SRCS}
	  checkin -m -y -t "b{newversion}" "{i},{newversion}"
	end

orphans 
	for i in {SRCS}
		Echo "Delete 'ckid';" | Rez -a -m -o "{i}"
	end

#
# Xport disk
#
xportdisk 
	for i in {SRCS}
		duplicate -y {i} xport:kconfig:{i}
	end

clean 
	delete -y Ŷ~
	delete -y Ŷ#

#
# Prototypes.
#
# Prototypes are not automatically built -- use target "proto" or "depend".
#
# Builds {file}.proto.h.new and then duplicates that file as
# {file}.proto.h only if the files are different. This prevents
# recompiles due to proto.h files that didn't actually change.
# 
# Building {file}.proto.h.new instead of {file}.proto.h also prevents 
# spurious invocations of mkptypes whenever a file that {file}.proto.h 
# depends on changes.
#

PTYPES = 
	:proto:kconfig.proto.h.new 
	:proto:WindowUtil.proto.h.new 
	:proto:kadm.proto.h.new 

# default rule for relating prototype.h.new files to source files
":proto:"  ":"

proto  {PTYPES}

.proto.h.new  .c
	mkptypes -A -e -W "{Default}.c" > "{TargDir}{Default}.proto.h.new"
	equal -d -q "{Default}.proto.h" "{TargDir}{Default}.proto.h.new" || 
		duplicate -y "{TargDir}{Default}.proto.h.new" "{Default}.proto.h"

#
# Dependancies
#
CPP = 
	:cpp:kconfig.cpp 
	:cpp:WindowUtil.cpp 
	:cpp:kadm.cpp 
	:cpp:des_cornell.cpp

# default rule for relating object files to source files
":cpp:"  
	":"

# Rule to build .cpp preprocessor output files. Syntax check only and write cpp output.
.cpp  .c
	C "{DepDir}{Default}.c" -e2 -c {COptions} > "{TargDir}{Default}.cpp"
	
depend  {CPP} proto
	perl "{mpw}local:depend.perl" Makefile ":cpp:" ":obj:" {CPP}
	Rename -y Makefile Makefile.bak
	Rename -y Makefile.new Makefile
	Echo "Include "Makefile.bak" 'ckid';" | Rez -m -a -o "Makefile" #Transfer the ckid


# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE. IT WILL GO AWAY.

kconfig.c.o  "kconfig.proto.h"
kconfig.c.o  "kconfig.c"
kconfig.c.o  "kconfig.vers"
kconfig.c.o  "glue.h"
kconfig.c.o  "kconfig.h"

WindowUtil.c.o  "glue.h"
WindowUtil.c.o  "WindowUtil.c"
WindowUtil.c.o  "WindowUtil.h"

kadm.c.o  "kconfig.proto.h"
kadm.c.o  "kadm.c"
kadm.c.o  "desproto.h"
kadm.c.o  "kadm.h"
kadm.c.o  "glue.h"
kadm.c.o  "kadm.proto.h"
kadm.c.o  "kconfig.h"

des_cornell.c.o  "glue.h"
des_cornell.c.o  "des_cornell.c"
des_cornell.c.o  "desproto.h"
des_cornell.c.o  "encrypt.h"

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY

