diff options
| author | Marc Horowitz <marc@mit.edu> | 1996-07-22 20:49:46 +0000 |
|---|---|---|
| committer | Marc Horowitz <marc@mit.edu> | 1996-07-22 20:49:46 +0000 |
| commit | edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1 (patch) | |
| tree | 6c2974a97b448c040fa4a31708ec5e02f187526c /src/kadmin/config.mk | |
| parent | 013bb1391582ed9e653ae706e398ddb8d08cfcc9 (diff) | |
| download | krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.tar.gz krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.tar.xz krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.zip | |
this commit includes all the changes on the OV_9510_INTEGRATION and
OV_MERGE branches. This includes, but is not limited to, the new openvision
admin system, and major changes to gssapi to add functionality, and bring
the implementation in line with rfc1964. before committing, the
code was built and tested for netbsd and solaris.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8774 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/config.mk')
| -rw-r--r-- | src/kadmin/config.mk/ChangeLog | 10 | ||||
| -rw-r--r-- | src/kadmin/config.mk/aix3.2.def | 40 | ||||
| -rw-r--r-- | src/kadmin/config.mk/architecture | 68 | ||||
| -rw-r--r-- | src/kadmin/config.mk/config | 141 | ||||
| -rw-r--r-- | src/kadmin/config.mk/hpux9.01.def | 32 | ||||
| -rw-r--r-- | src/kadmin/config.mk/irix5.2.def | 22 | ||||
| -rw-r--r-- | src/kadmin/config.mk/linux.def | 23 | ||||
| -rw-r--r-- | src/kadmin/config.mk/netbsd1.def | 22 | ||||
| -rw-r--r-- | src/kadmin/config.mk/rules | 538 | ||||
| -rw-r--r-- | src/kadmin/config.mk/site.def | 52 | ||||
| -rw-r--r-- | src/kadmin/config.mk/solaris2.3.def | 39 | ||||
| -rw-r--r-- | src/kadmin/config.mk/sunos4.1.def | 22 | ||||
| -rw-r--r-- | src/kadmin/config.mk/template | 142 |
13 files changed, 1151 insertions, 0 deletions
diff --git a/src/kadmin/config.mk/ChangeLog b/src/kadmin/config.mk/ChangeLog new file mode 100644 index 000000000..5dd46d71a --- /dev/null +++ b/src/kadmin/config.mk/ChangeLog @@ -0,0 +1,10 @@ +Fri Jul 12 14:39:28 1996 Marc Horowitz <marc@mit.edu> + + * architecture: add uname test for NetBSD + * netbsd1.def: added + +Mon Jul 8 16:39:36 1996 Barry Jaspan <bjaspan@mit.edu> + + * template, site.def, rules: Add SITEMAKEFILES to specify -f + Makefile.ov, add .ct default rule. + diff --git a/src/kadmin/config.mk/aix3.2.def b/src/kadmin/config.mk/aix3.2.def new file mode 100644 index 000000000..44fd07b1f --- /dev/null +++ b/src/kadmin/config.mk/aix3.2.def @@ -0,0 +1,40 @@ +export PS_ALL = ps auxww +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = ps auxww +# Make sure there is a blank space at the end of this line! +export PS_TTY = ps -t +export RSH_CMD = /usr/bin/rsh +export INSTCMD = /usr/local/bin/ginstall -c +export LEX = /usr/local/bin/flex +export AWK_CMD = /usr/local/bin/gawk + +# needed for fd_set to be defined +# Not convinced! Experimenting with disabling _BSD. - jik 3/21/95 +ifndef KRB5B4 +CFLAGS += -D_BSD +endif +CFLAGS += -D_ALL_SOURCE + +PCC_STRUCT_RETURN = -fpcc-struct-return +D_NEEDS_RPCENT = -D_SUN + +D_NEEDS_GETUSERSHELL = -DNEEDS_GETUSERSHELL +D_NEEDS_TREEWALK = -DNEEDS_TREEWALK +D_SETEUID = -DNO_SETEUID -DSETEUID_INCLUDE='<sys/id.h>' \ + -DSETEUIDPRE='setuidx(ID_REAL|ID_EFFECTIVE,' -DSETEUIDPOST=')' +D_NO_SETENV = -DNO_SETENV +D_REGEXP_TYPE = -DPOSIX_REGEXPS + +TERMCAPLIB = -ltermcap + +# extra libraries needed for login +LOGINLIB = -ls -lcfg -lodm + +UTMP_FILE = /etc/utmp +WTMP_FILE = /usr/adm/wtmp + +XINCDIR = /usr/lpp/X11/include +XLIBDIR = /usr/lpp/X11/lib + +OMIT_DOC = true +DONT_STRIP_NXLIBS = true diff --git a/src/kadmin/config.mk/architecture b/src/kadmin/config.mk/architecture new file mode 100644 index 000000000..d976c27b2 --- /dev/null +++ b/src/kadmin/config.mk/architecture @@ -0,0 +1,68 @@ +# $Id$ + +# sample `uname -a` output: +# SunOS dun-dun-n 4.1.3 3 sun4c +# SunOS samosa 5.3 Generic_101318-31 sun4m sparc +# HP-UX strange- A.09.01 A 9000/710 2005970723 two-user license +# AIX krusty 2 3 000131533500 + +# each section here should set ARCH_OS to a symbol specifically describing +# the OS, and also set "relevant" capability symbols + +ifndef ARCH_OS +__UNAME_A := $(shell uname -a) +ifeq "$(strip $(filter SunOS 4.1.3, $(__UNAME_A)))" "SunOS 4.1.3" + export ARCH_OS := sunos4.1 +endif +ifeq "$(strip $(filter SunOS 4.1.3C, $(__UNAME_A)))" "SunOS 4.1.3C" + export ARCH_OS := sunos4.1 +endif +ifeq "$(strip $(filter SunOS 4.1.3_U1, $(__UNAME_A)))" "SunOS 4.1.3_U1" + export ARCH_OS := sunos4.1 +endif +ifeq "$(strip $(filter SunOS 4.1.4, $(__UNAME_A)))" "SunOS 4.1.4" + export ARCH_OS := sunos4.1 +endif +ifeq "$(strip $(filter SunOS 5.3, $(__UNAME_A)))" "SunOS 5.3" + export ARCH_OS := solaris2.3 +endif +# For now, assume that Solaris 2.4 is the same as Solaris 2.3. +ifeq "$(strip $(filter SunOS 5.4, $(__UNAME_A)))" "SunOS 5.4" + export ARCH_OS := solaris2.3 +endif +ifeq "$(strip $(filter HP-UX A.09.01, $(__UNAME_A)))" "HP-UX A.09.01" + export ARCH_OS := hpux9.01 +endif +ifeq "$(strip $(filter AIX 2, $(__UNAME_A)))" "AIX 2" + export ARCH_OS := aix3.2 +endif +ifeq "$(strip $(filter sweet-and-sour-sauce, $(__UNAME_A)))" "sweet-and-sour-sauce" + export ARCH_OS := aix3.2 + d:=$(shell echo "*** WARNING! Used hostname for architecture." 1>&2) +endif +ifeq "$(strip $(filter Linux, $(__UNAME_A)))" "Linux" + export ARCH_OS := linux +endif +ifeq "$(strip $(filter IRIX, $(__UNAME_A)))" "IRIX" + export ARCH_OS := irix5.2 +endif +ifeq "$(strip $(filter NetBSD, $(__UNAME_A)))" "NetBSD NetBSD" + export ARCH_OS := netbsd1 +endif + +ifndef ARCH_OS + d:=$(shell echo "*** WARNING! Unknown architecture: $(__UNAME_A)" 1>&2) + export ARCH_OS := dummy + export ARCH_OS_UNKNOWN := dummy +endif +endif + +ifndef ARCH_OS_UNKNOWN + define IncludeArchFile + include $(CONFDIR)/$(ARCH_OS).def + endef +else + define IncludeArchFile + endef +endif + diff --git a/src/kadmin/config.mk/config b/src/kadmin/config.mk/config new file mode 100644 index 000000000..9bb800e84 --- /dev/null +++ b/src/kadmin/config.mk/config @@ -0,0 +1,141 @@ +# $Id$ +# $Source$ + +# +# local Programs +# + +INSTHDRS = $(TOP)/scripts/inst-hdrs.sh +COMPILE_ET = $(TOP)/../util/et/compile_et +MK_CMDS = $(TOP)/../util/ss/mk_cmds +SYM_RANDOMIZE = $(TOP)/intl/sym-randomize.pl + +# +# Directories +# + +STAGETOP= $(TOP)/.. +STAGE_BINDIR = $(STAGETOP)/bin +STAGE_INCDIR = $(STAGETOP)/include +STAGE_LIBDIR = $(STAGETOP)/lib + +INSTALLTOP= $(TOP)/.. +INSTALL_BINDIR = $(INSTALLTOP)/bin +INSTALL_ETCDIR = $(INSTALLTOP)/etc +INSTALL_INCDIR = $(INSTALLTOP)/include +INSTALL_LIBDIR = $(INSTALLTOP)/lib +INSTALL_CONFDIR = $(INSTALLTOP)/config +INSTALL_PROTODIR = $(INSTALLTOP)/proto +INSTALL_ADMINDIR = $(INSTALLTOP)/admin +INSTALL_SERVERDIR = $(INSTALLTOP)/sbin +INSTALL_INSTDIR = $(INSTALLTOP)/install +INSTALL_DOCDIR = $(INSTALLTOP)/doc +INSTALL_MANDIR = $(INSTALLTOP)/man +INSTALL_SRCDIR = $(INSTALLTOP)/src + +# +# libraries +# + +# system +LIBM = -lm + +# stage +LIBADMCLNT := $(STAGE_LIBDIR)/libkadm5clnt.a +LIBADMSRV := $(STAGE_LIBDIR)/libkadm5srv.a +LIBRPCLIB := $(STAGE_LIBDIR)/libgssrpc.a +LIBDYN := $(STAGE_LIBDIR)/libdyn.a +LIBSS := $(STAGE_LIBDIR)/libss.a +LIBOVSEC_UTIL := $(STAGE_LIBDIR)/libkadm5_util.a +LIBFTPSEC := $(STAGE_LIBDIR)/libftpsec.a + +# install +LIBGSSAPI_KRB5 := $(INSTALL_LIBDIR)/libgssapi_krb5.a +LIBGSSAPI_KRB5_DX := $(INSTALL_LIBDIR)/libgssapi_krb5_dx.a +LIBGSSAPI_KRB5_WX := $(INSTALL_LIBDIR)/libgssapi_krb5_wx.a +LIBGSSAPI_KRB5_NX := $(INSTALL_LIBDIR)/libgssapi_krb5_nx.a +LIBGSSAPI_TRUST := $(INSTALL_LIBDIR)/libgssapi_trust.a +LIBDB := $(INSTALL_LIBDIR)/libdb.a +LIBKRB5 := $(INSTALL_LIBDIR)/libkrb5.a +LIBKDB5 := $(INSTALL_LIBDIR)/libkdb5.a +LIBCRYPTO := $(INSTALL_LIBDIR)/libcrypto.a +ifndef KRB5B4 +LIBISODE := $(INSTALL_LIBDIR)/libisode.a +endif +LIBCOM_ERR := $(INSTALL_LIBDIR)/libcom_err.a +LIBKRB5_ALL := $(LIBKRB5) $(LIBCRYPTO) $(LIBISODE) $(LIBCOM_ERR) +LIBKRB := $(INSTALL_LIBDIR)/libkrb4.a +LIBKDB := $(INSTALL_LIBDIR)/libkdb.a +LIBKADM := $(INSTALL_LIBDIR)/libkadm.a +LIBKRB425 := $(INSTALL_LIBDIR)/libkrb425.a +LIBDES425 := $(INSTALL_LIBDIR)/libdes425.a + +# X libraries. XXX this uses -L! but perhaps it doesn't matter, see +# [secure-build/2649] +XLIB = -L$(XLIBDIR) -lXext -lX11 + +# +# library name mangling for export +# + +ADMIN_INTERFACE_SYMBOL_FILES := $(TOP)/intl/adm-export-symbols \ + $(TOP)/intl/misc-export-symbols +OTHER_INTERFACE_SYMBOL_FILES := $(TOP)/intl/gss-export-symbols + +ADMIN_CRYPTO_LIBS := $(LIBADMCLNT) $(LIBADMSRV) $(LIBRPCLIB) \ + $(LIBGSSAPI_KRB5) $(LIBKRB5) $(LIBKDB5) $(LIBCRYPTO) \ + $(LIBISODE) $(LIBKRB) $(LIBKDB) $(LIBDES425) +OTHER_CRYPTO_LIBS := $(LIBGSSAPI_KRB5_DX) $(LIBGSSAPI_KRB5_WX) \ + $(LIBGSSAPI_KRB5_NX) + +# +# compiler/linker flags +# + +CFLAGS := $(CFLAGS) -I$(INSTALL_INCDIR) + +# +# Variables for testing +# +# These are all exported because lots of test scripts (/bin/sh, perl, +# tcl) use them. +# + +export TESTDIR = $(TOP)/testing +export COMPARE_DUMP = $(TESTDIR)/scripts/compare_dump.pl +export FIX_CONF_FILES = $(TESTDIR)/scripts/fixup-conf-files.pl +export INITDB = $(TESTDIR)/scripts/init_db +export MAKE_KEYTAB = $(TESTDIR)/scripts/make-host-keytab.pl +export LOCAL_MAKE_KEYTAB= $(TESTDIR)/scripts/make-host-keytab.pl +export RESTORE_FILES = $(TESTDIR)/scripts/restore_files.sh +export SAVE_FILES = $(TESTDIR)/scripts/save_files.sh +export SIMPLE_DUMP = $(TESTDIR)/scripts/simple_dump.pl +export TCLUTIL = $(TESTDIR)/tcl/util.t +export BSDDB_DUMP = $(TESTDIR)/util/bsddb_dump +export CLNTTCL = $(TESTDIR)/util/ovsec_kadm_clnt_tcl +export SRVTCL = $(TESTDIR)/util/ovsec_kadm_srv_tcl +export QUALNAME = $(TOP)/inst-scripts/qualname + +export START_SERVERS = $(TESTDIR)/scripts/start_servers $(TEST_SERVER) +export START_SERVERS_LOCAL = $(TESTDIR)/scripts/start_servers_local + +export STOP_SERVERS = $(TESTDIR)/scripts/stop_servers $(TEST_SERVER) +export STOP_SERVERS_LOCAL = $(TESTDIR)/scripts/stop_servers_local + +export KRB5_CONFIG = /krb5/krb5.conf +export KRB5_KDC_PROFILE = /krb5/kdc.conf +export KRB5_KTNAME = /krb5/ovsec_adm.srvtab + +ifdef TEST_SERVER +MAKE_KEYTAB += -server $(TEST_SERVER) +ifdef TEST_PATH +MAKE_KEYTAB += -top $(TEST_PATH) +START_SERVERS += $(TEST_PATH) +STOP_SERVERS += $(TEST_PATH) +endif +endif + +export VERBOSE_TEST DEJALFLAGS + +# We're running low on disk space, so strip installed binaries +STRIP_INSTALLED = true diff --git a/src/kadmin/config.mk/hpux9.01.def b/src/kadmin/config.mk/hpux9.01.def new file mode 100644 index 000000000..17da13c52 --- /dev/null +++ b/src/kadmin/config.mk/hpux9.01.def @@ -0,0 +1,32 @@ +export ARCH_SKIP_RANLIB := 1 +export INSTCMD = ginstall -c +export PS_ALL = ps -ef +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = ps -fp +# Make sure there is a blank space at the end of this line! +export PS_TTY = ps -t +export STATIC_LINK_GUI := 1 +export RSH_CMD = /usr/bin/remsh + +PCC_STRUCT_RETURN = -fpcc-struct-return +# this must always be at the end. +REGEXLIB = -lc -lPW +TERMCAPLIB = -ltermcap + +XINCDIR = /usr/include/X11R5 +XLIBDIR = /usr/lib/X11R5 +NDBMLIB := /usr/lib/libndbm.a +ARCH_CFLAGS = -mpa-risc-1-0 + +CFLAGS := $(ARCH_CFLAGS) $(CFLAGS) + +UTMP_FILE = /etc/utmp +WTMP_FILE = /etc/wtmp + +D_RANDOM = -Dsrandom=srand48 -Drandom=lrand48 +D_SETEUID = -DNO_SETEUID \ + -DSETEUIDPRE='setresuid(-1,' -DSETEUIDPOST=',-1)' +D_FATALINLIBS = -Dfatal=ftpd_fatal +D_NO_SETENV = -DNO_SETENV +D_REGEXP_TYPE = -DPOSIX_REGEXPS + diff --git a/src/kadmin/config.mk/irix5.2.def b/src/kadmin/config.mk/irix5.2.def new file mode 100644 index 000000000..053d9328e --- /dev/null +++ b/src/kadmin/config.mk/irix5.2.def @@ -0,0 +1,22 @@ +export PS_ALL = /usr/bin/ps -ef +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = /usr/bin/ps -fp +# Make sure there is a blank space at the end of this line! +export PS_TTY = /usr/bin/ps -t + +RANLIB = /bin/true +D_NO_SETENV = -DNO_SETENV +D_HAVE_SYSLOG_H = -DHAVE_SYSLOG_H +D_HAVE_STDARG_H = -DHAVE_STDARG_H +D_HAVE_SYSLOG = -DHAVE_SYSLOG +D_HAVE_VSPRINTF = -DHAVE_VSPRINTF +D_HAVE_OPENLOG = -DHAVE_OPENLOG +D_HAVE_CLOSELOG = -DHAVE_CLOSELOG +D_HAVE_STRFTIME = -DHAVE_STRFTIME + +# libgen.a is for regcmp and regex, used in /usr/lib/libXm.a; this is +# a different set of regexp routines than used by svr_iters.c +XM_LIB = /usr/lib/libXm.a /usr/lib/libgen.a +XT_LIB = /usr/lib/libXt.a +X_LIB = /usr/lib/libX11.so + diff --git a/src/kadmin/config.mk/linux.def b/src/kadmin/config.mk/linux.def new file mode 100644 index 000000000..69a0c6287 --- /dev/null +++ b/src/kadmin/config.mk/linux.def @@ -0,0 +1,23 @@ +export PS_ALL = ps auxww +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = ps auxww +export RSH_CMD = /usr/bin/rsh + +XINCDIR = /usr/include +XLIBDIR = /usr/lib + +NDBMLIB = -ldbm + +PERL = /usr/bin/perl +LEX_LIB = -lfl + +OMIT_GUI = true +OMIT_XM_KPASSWD = true +OMIT_DOC = true + +UTMP_FILE = /etc/utmp +WTMP_FILE = /var/adm/wtmp + +LIBTCL = -ltcl + +TERMCAPLIB = -ltermcap diff --git a/src/kadmin/config.mk/netbsd1.def b/src/kadmin/config.mk/netbsd1.def new file mode 100644 index 000000000..2b6090355 --- /dev/null +++ b/src/kadmin/config.mk/netbsd1.def @@ -0,0 +1,22 @@ +export PS_ALL = ps auxww +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = ps auxww +# Make sure there's no extra whitespace at the end of this line! +export PS_TTY = ps -t +export RSH_CMD = /usr/bin/rsh + +PCC_STRUCT_RETURN = +TERMCAPLIB = -ltermcap + +XINCDIR = /usr/X11/include +XLIBDIR = /usr/X11/lib + +UTMP_FILE = /etc/utmp +WTMP_FILE = /usr/adm/wtmp + +D_NO_SETENV = -DNO_SETENV + +SHLIBCFLAGS := -fpic +SHLIBLDFLAGS := -assert pure-text +SHLIBEXT := so +SHLIBSEP := . diff --git a/src/kadmin/config.mk/rules b/src/kadmin/config.mk/rules new file mode 100644 index 000000000..35b647bda --- /dev/null +++ b/src/kadmin/config.mk/rules @@ -0,0 +1,538 @@ +# +# $Id$ +# $Source$ +# + +# +# DefaultRules --- clean, depend, all, stage, includes, and +# install. +# + +define DefaultRules +clean:: + $(CLEAN) core *.o *~ *.bak #* y.output + +depend:: + +all:: + +includes:: + +stage:: + +install:: + +unit-test:: + +traverse:: + +endef + + +# +# SubdirTarget +# +# SUBDIRS = subdirs to work in +# +define SubdirTarget +__SUBDIR_TARGET := clean +expand _DoSubdir + +__SUBDIR_TARGET := depend +expand _DoSubdir + +__SUBDIR_TARGET := all +expand _DoSubdir + +__SUBDIR_TARGET := includes +expand _DoSubdir + +__SUBDIR_TARGET := stage +expand _DoSubdir + +__SUBDIR_TARGET := install +expand _DoSubdir + +__SUBDIR_TARGET := unit-test +expand _DoSubdir + +__SUBDIR_TARGET := traverse +expand _DoSubdir + +ALL_SUBDIRS_TARGET := everything +expand AllTargetsTarget +endef + +# +# Makes the target $(ALL_SUBDIRS_TARGET) perform the targets includes +# depend stage all install in $(SUBDIRS). +# +define AllTargetsTarget +$(ALL_SUBDIRS_TARGET):: + @cwd=`pwd`; \ + for d in $(SUBDIRS); do \ + echo "--- Making includes depend stage all install in $(CUR_DIR)/$$$$d"; \ + cd $$$$d && \ + $(MAKE) includes depend CUR_DIR=$(CUR_DIR)/$$$$d; \ + $(MAKE) stage all install CUR_DIR=$(CUR_DIR)/$$$$d; \ + cd $$$$cwd; \ + done + +endef + +define _DoSubdir +# $(__SUBDIR_TARGET):: +# @echo "--- SKIPPING $(__SUBDIR_TARGET) in $(SUBDIRS)" +$(__SUBDIR_TARGET):: + @cwd=`pwd`; \ + for d in $(SUBDIRS); do \ + echo "--- Making $(__SUBDIR_TARGET) in $(CUR_DIR)/$$$$d"; \ + cd $$$$d && \ + $(MAKE) $(SITEMAKEFLAGS) $(__SUBDIR_TARGET) CUR_DIR=$(CUR_DIR)/$$$$d; \ + cd $$$$cwd; \ + done +endef + +# +# Program -- compile prog, adds all and clean targets +# +# PROG program name +# OBJS object files +# DEPS additional dependencies (e.g.: libraries) +# LIBS libraries +# LDFLAGS arguments for link stage +# PUREFLAGS arguments for purify +# PURELIBS extra libraries to link in when using purify +# +define Program +all:: $(PROG) + +$(PROG): $(OBJS) $(DEPS) $(filter-out -L% -l%, $(LIBS)) +ifdef BUILD_IN_TMP + rm -f /tmp/$(PROG).$(__PID__) + $(CC) $(LDFLAGS) -o /tmp/$(PROG).$(__PID__) $(OBJS) $(LIBS) $(STD_LIBS) + mv /tmp/$(PROG).$(__PID__) $(PROG) +else + $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) $(STD_LIBS) +endif + +clean:: + $(CLEAN) $(PROG) + +proof:: $(PROG).tc + +$(PROG).tc: $(OBJS) $(DEPS) $(filter-out -L% -l%, $(LIBS)) +ifdef BUILD_IN_TMP + rm -f /tmp/$(PROG).tc.$(__PID__) + $(PROOF) $(CC) $(LDFLAGS) -o /tmp/$(PROG).tc.$(__PID__) $(OBJS) \ + $(LIBS) $(STD_LIBS) + mv /tmp/$(PROG).tc.$(__PID__) $(PROG).tc +else + $(PROOF) $(CC) $(LDFLAGS) -o $(PROG).tc $(OBJS) $(LIBS) $(STD_LIBS) +endif + +clean:: + $(CLEAN) $(PROG).tc $(PROG).tc.* + +pure:: $(PROG).pure + +$(PROG).pure: $(OBJS) $(DEPS) $(filter-out -L% -l%, $(LIBS)) +ifdef BUILD_IN_TMP + rm -f /tmp/$(PROG).pure.$(__PID__) + $(PURIFY) $(PUREFLAGS) \ + $(CC) $(LDFLAGS) -o /tmp/$(PROG).pure.$(__PID__) $(OBJS) \ + $(LIBS) $(STD_LIBS) $(PURELIBS) + mv /tmp/$(PROG).pure.$(__PID__) $(PROG).pure +else + $(PURIFY) $(PUREFLAGS) $(CC) $(LDFLAGS) -o $(PROG).pure $(OBJS) $(LIBS) $(STD_LIBS) $(PURELIBS) +endif + +clean:: + $(CLEAN) $(PROG).pure $(PROG).pure.pure_* + +quant:: $(PROG).quant + +$(PROG).quant: $(OBJS) $(DEPS) $(filter-out -L% -l%, $(LIBS)) +ifdef BUILD_IN_TMP + rm -f /tmp/$(PROG).quant.$(__PID__) + $(QUANTIFY) $(QUANTFLAGS) \ + $(CC) $(LDFLAGS) -o /tmp/$(PROG).quant.$(__PID__) $(OBJS) \ + $(LIBS) $(STD_LIBS) $(QUANTLIBS) + mv /tmp/$(PROG).quant.$(__PID__) $(PROG).quant +else + $(QUANTIFY) $(QUANTFLAGS) $(CC) $(LDFLAGS) -o $(PROG).quant $(OBJS) $(LIBS) $(STD_LIBS) $(QUANTLIBS) +endif + +clean:: + $(CLEAN) $(PROG).quant $(PROG).quant.quant.*.qv +endef + +# +# InstallProgram -- build program, install in INSTALL_BINDIR, adds +# install target +# +define InstallProgram +__INST_DIR := $(INSTALL_BINDIR) +expand Program +expand InstallExecutable +endef + +# +# InstallUtil -- build program, install in INSTALL_ETCDIR, adds +# install target +# +define InstallUtil +__INST_DIR := $(INSTALL_ETCDIR) +expand Program +expand InstallExecutable +endef + +# +# InstallAdmin -- build program, install in INSTALL_ADMINDIR, adds +# install target +# +define InstallAdmin +__INST_DIR := $(INSTALL_ADMINDIR) +expand Program +expand InstallExecutable +endef + +# +# InstallServer -- build program, install in INSTALL_SERVERDIR, adds +# install target +# +define InstallServer +__INST_DIR := $(INSTALL_SERVERDIR) +expand Program +expand InstallExecutable +endef + +# +# InstallExecuteable(bin, as, dir) +# +define InstallExecutable +ifndef INST_NAME +install:: $(PROG) + rm -f $(__INST_DIR)/$(PROG) + $(INSTCMD) $(INST_PROG_FLAGS) $(PROG) $(__INST_DIR)/$(PROG) +else +install:: $(PROG) + rm -f $(__INST_DIR)/$(INST_NAME) + $(INSTCMD) $(INST_PROG_FLAGS) $(PROG) $(__INST_DIR)/$(INST_NAME) +endif +endef + +# +# Library -- create library from object files and ranlib it, adds all +# and clean targets +# +# LIB name of library (e.g. libfoo.a) +# OBJS object files in library +# +define Library +all:: $(LIB) + +$(LIB): $(OBJS) $(OTHER_OBJS) + $(RM) -f $(LIB) + $(AR) $(ARFLAGS) $(LIB) $(OBJS) +ifndef ARCH_SKIP_RANLIB + $(RANLIB) $(LIB) +endif + +clean:: + $(CLEAN) $(LIB) +endef + +# +# SharedLibrary -- create shared library from object files, adds all +# and clean targets +# +# LIB basename of library (e.g. libfoo) +# (this will be basenamified, anyway) +# OBJS object files in library +# VERSION version of shared library +# +define SharedLibrary +ifdef DO_SHARED_LIBRARIES +ifdef SHLIBLDFLAGS +ifdef SHLIBSEP +__LIB := $(basename $(LIB)).$(SHLIBEXT)$(SHLIBSEP)$(VERSION) +else +__LIB := $(basename $(LIB)).$(SHLIBEXT) +endif +__LIBNV := $(basename $(LIB)).$(SHLIBEXT) +expand SharedLibrary_1 +endif +endif +endef + +define SharedLibrary_1 +ifdef DO_SHARED_LIBRARIES +all:: $(__LIB) + +$(__LIB): $(OBJS) $(OTHER_OBJS) + $(RM) -f $(__LIB) $(__LIBNV) + $(LD) -o $(__LIB) $(SHLIBLDFLAGS) $(OBJS) + $(LNSOFT) $(__LIB) $(__LIBNV) +clean:: + $(CLEAN) $(__LIB) $(__LIBNV) +endif +endef + +# +# StageLibrary -- build library, install in STAGE_LIBDIR, adds stage target +# +define StageLibrary +expand Library + +stage:: $(STAGE_LIBDIR)/$(LIB) + +$(STAGE_LIBDIR)/$(LIB): $(LIB) + $(INSTCMD) $(LIB) $(STAGE_LIBDIR)/$(LIB) +ifndef ARCH_SKIP_RANLIB + $(RANLIB) $(STAGE_LIBDIR)/$(LIB) +endif +endef + +# +# StageSharedLibrary -- build library, install in STAGE_LIBDIR, adds +# stage target +# +define StageSharedLibrary +ifdef DO_SHARED_LIBRARIES +expand SharedLibrary +expand StageSharedLibrary_1 +endif +endef + +define StageSharedLibrary_1 +ifdef DO_SHARED_LIBRARIES +ifdef __LIB +stage:: $(STAGE_LIBDIR)/$(__LIB) + +$(STAGE_LIBDIR)/$(__LIB): $(__LIB) + $(INSTCMD) $(__LIB) $(STAGE_LIBDIR)/$(__LIB) +endif +endif +endef + +# +# InstallLibrary -- build library, install in INSTALL_LIBDIR, +# adds install target +# +define InstallLibrary +expand Library + +install:: $(INSTALL_LIBDIR)/$(LIB) + +$(INSTALL_LIBDIR)/$(LIB): $(LIB) + $(INSTCMD) $(LIB) $(INSTALL_LIBDIR)/$(LIB) +ifndef ARCH_SKIP_RANLIB + $(RANLIB) $(INSTALL_LIBDIR)/$(LIB) +endif +endef + +# +# InstallSharedLibrary -- build library, install in INSTALL_LIBDIR, +# adds install target +# +define InstallSharedLibrary +ifdef DO_SHARED_LIBRARIES +expand SharedLibrary +expand InstallSharedLibrary_1 +endif +endef + +define InstallSharedLibrary_1 +ifdef DO_SHARED_LIBRARIES +ifdef __LIB +install:: $(INSTALL_LIBDIR)/$(__LIB) + +$(INSTALL_LIBDIR)/$(__LIB): $(__LIB) + $(INSTCMD) $(__LIB) $(INSTALL_LIBDIR)/$(__LIB) +endif +endif +endef + +# +# StageFiles(files, dir) +# +define StageFiles +stage:: $(FILES) + $(INSTCMD) $(FILES) $(DIR) +endef + +# +# StageIncludes -- copy include files to staging area, adds includes +# and stage target +# +# HDRS header files to copy +# HDRS_DIR subdir of STAGE_INCDIR to copy to +# +define StageIncludes +includes:: $(HDRS) + $(INSTHDRS) $(STAGE_INCDIR)/$(HDRS_DIR) $(HDRS) + +stage:: $(HDRS) + $(INSTHDRS) $(STAGE_INCDIR)/$(HDRS_DIR) $(HDRS) +endef + +# +# InstallIncludes -- copy include files to staging area, adds includes +# and install target +# +# HDRS header files to copy +# HDRS_DIR subdir of INSTALL_INCDIR to copy to +# +define InstallIncludes +includes:: $(HDRS) + $(INSTHDRS) $(INSTALL_INCDIR)/$(HDRS_DIR) $(HDRS) + +install:: $(HDRS) + $(INSTHDRS) $(INSTALL_INCDIR)/$(HDRS_DIR) $(HDRS) +endef + +# +# Depend -- run makedepend +# +# SRCS source files to generate dependencies for +# DEPENDS dependencies for "make depend" +# ETABLES error tables whose .c and .h files are implicitly +# dependencies of make depend +# +define Depend +depend:: $(DEPENDS) $(addsuffix .c,$(basename $(ETABLES))) $(addsuffix .h,$(basename $(ETABLES))) + +ifeq (,$(findstring -a,$(__MDFLAGS))) + @rm -f Makefile.depend; touch Makefile.depend +endif + $(MAKEDEPEND) $(__MDFLAGS) $(MDFLAGS) -fMakefile.depend -- $(CFLAGS) -- $(SRCS) + +clean:: + $(CLEAN) Makefile.depend + +ifeq (,$(findstring -a,$(__MDFLAGS))) +__MDFLAGS += -a +endif +endef + +# +# NormalProgram -- everything for a single program +# +# PROG = program name +# SRCS = list of .c sources +# HDRS = list of .h sources +# OBJS = list of .o files to depend and link against +# STAGELIBS = foo.a within the stage area tree to link against +# INSTALLLIBS = foo.a within the install area tree to link against +# LIBS = system libraries to link against +# +# STAGELIBS And INSTALLLIBS are added to the dependencies for PROG. +# +define NormalProgram +expand SaveStuff +LIBS := $(addprefix $(STAGE_LIBDIR)/,$(STAGELIBS)) \ + $(addprefix $(INSTALL_LIBDIR)/,$(INSTALLLIBS)) \ + $(LIBS) +DEPS := $(addprefix $(STAGE_LIBDIR)/,$(STAGELIBS)) \ + $(addprefix $(INSTALL_LIBDIR)/,$(INSTALLLIBS)) \ + $(DEPS) + +clean:: + $(CLEAN) $(OBJS) + +expand InstallProgram +expand Depend +expand RestoreStuff +endef + +define NormalLibrary +expand Library + +clean:: + $(CLEAN) $(OBJS) + +expand Depend +endef + +# +# ErrorTables -- compile an error table with compile_et +# +# ETABLES list of .et files +# CFLAGS for saber target +# +# +define ErrorTables +__ETABLE_HS := $(addsuffix .h,$(basename $(ETABLES))) +__ETABLE_CS := $(addsuffix .c,$(basename $(ETABLES))) +expand ErrorTables_1 +endef + +define ErrorTables_1 + +saber:: + #load $(CFLAGS) $(__ETABLE_CS) + +clean:: + $(CLEAN) $(__ETABLE_HS) $(__ETABLE_CS) +endef + +# +# StageErrorTables -- copy generated include file into staging area. +# +# ETABLES list of .et file +# HDRS_DIR subdir of STAGE_INCDIR to copy to +# +define StageErrorTables +expand ErrorTables +expand StageErrorTables_1 +endef + +define StageErrorTables_1 +includes:: $(__ETABLE_HS) + $(INSTHDRS) $(STAGE_INCDIR)/$(HDRS_DIR) $(__ETABLE_HS) + +stage:: $(__ETABLE_HS) + $(INSTHDRS) $(STAGE_INCDIR)/$(HDRS_DIR) $(__ETABLE_HS) +endef + +define SaveStuff +__LIBS := $(LIBS) +__DEPS := $(DEPS) +endef + +define RestoreStuff +LIBS := $(__LIBS) +DEPS := $(__DEPS) +endef + +# +# XDR -- generate .c and .h from .x +# +# XDRS list of .x files +# +define XDR +__XDR_HS := $(addsuffix .h,$(basename $(XDRS))) +__XDR_CS := $(addsuffix .c,$(basename $(XDRS))) +expand XDR_1 +endef + +define XDR_1 +saber:: + #load $(CFLAGS) $(__XDR_CS) + +clean:: + $(CLEAN) $(__XDR_HS) $(__XDR_CS) +endef + + + +# +# Saber -- load files into saber +# +# SRCS list of .c files +# +define Saber +saber:: + #load $(CFLAGS) $(SRCS) +endef diff --git a/src/kadmin/config.mk/site.def b/src/kadmin/config.mk/site.def new file mode 100644 index 000000000..be7fe9e25 --- /dev/null +++ b/src/kadmin/config.mk/site.def @@ -0,0 +1,52 @@ +# $Id$ + +# XXXX this file will probably have lots of ARCH_OS defines in it. + +# +# Misc settings +# + +# +# site-specific compiler/linker flags +# + +CFLAGS := $(CFLAGS) -I$(TOP)/../../src/include \ + -I$(TOP)/../../src/include/krb5 \ + -I$(TOP)/../include \ + -I$(TOP)/../include/krb5 \ + $(PCC_STRUCT_RETURN) -g + +SITEMAKEFLAGS := -f Makefile.ov + +# +# Packages whose locations we need to know +# + +ifeq ($(shell ls -d /.afs/gza.com/product/secure 2>/dev/null),/.afs/gza.com/product/secure) +AFS_ROOT=/.afs +else +AFS_ROOT=/afs +endif + +PERL = /afs/athena/contrib/perl/p +# /afs/sipb/project/tcl/lib/libtcl.a +LIBTCL = /mit/gnu/lib/libtcl.a +# /afs/sipb/project/tcl/include +TCLINC = /mit/gnu/include + +# +# Default locations +# + +YACC = bison -y + +# +# I'm not really sure where this should go, but it is often useful to +# be able to set up a test environment from anywhere in the build +# tree. +# +start-servers: + $(START_SERVERS) + +stop-servers: + $(STOP_SERVERS) diff --git a/src/kadmin/config.mk/solaris2.3.def b/src/kadmin/config.mk/solaris2.3.def new file mode 100644 index 000000000..d18e0e164 --- /dev/null +++ b/src/kadmin/config.mk/solaris2.3.def @@ -0,0 +1,39 @@ +export PS_ALL = /usr/bin/ps -ef +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = /usr/bin/ps -fp +# Make sure there is a blank space at the end of this line! +export PS_TTY = /usr/bin/ps -t +export RSH_CMD = /usr/ucb/rsh +export INSTCMD = /usr/ucb/install +export PATH := $(PATH):/usr/ucb:/usr/ccs/bin + +PCC_STRUCT_RETURN = -fpcc-struct-return +D_NEEDS_RPCENT = -DNEEDS_RPCENT +D_SYSV = -DSYSV +D_POSIX = -DPOSIX +D_NO_SETENV = -DNO_SETENV +D_POSIX_SIGNALS = -DPOSIX_SIGNALS +D_RANDOM = -Dsrandom=srand48 -Drandom=lrand48 +D_REGEXP_TYPE = -DSOLARIS_REGEXPS +NETLIB = -lsocket -lnsl +#BSDLIB = /usr/ucblib/libucb.a +TERMCAPLIB = -lcurses -ltermcap +REGEXLIB = -lgen +LOGINLIB = -lcmd + +XINCDIR = /usr/openwin/include +XLIBDIR = /usr/openwin/lib +RANLIB = /bin/true + +OMIT_GUI = true + +# These are used by admin/v4server/Makefile. They are determined +# automatically by the krb5 beta 4 auto-configure, but we're not using +# that right now. +WAIT_USES_INT = true +OPEN_NEEDS_FCNTL = true + +UTMP_FILE = /var/adm/utmp +WTMP_FILE = /var/adm/wtmp +UTMPX_FILE = /var/adm/utmpx +WTMPX_FILE = /var/adm/wtmpx diff --git a/src/kadmin/config.mk/sunos4.1.def b/src/kadmin/config.mk/sunos4.1.def new file mode 100644 index 000000000..942615511 --- /dev/null +++ b/src/kadmin/config.mk/sunos4.1.def @@ -0,0 +1,22 @@ +export PS_ALL = ps auxww +# Make sure there's no extra whitespace at the end of this line! +export PS_PID = ps auxww +# Make sure there's no extra whitespace at the end of this line! +export PS_TTY = ps -t +export RSH_CMD = /usr/ucb/rsh + +PCC_STRUCT_RETURN = -fpcc-struct-return +TERMCAPLIB = -ltermcap + +XINCDIR = /usr/openwin/include +XLIBDIR = /usr/openwin/lib + +UTMP_FILE = /etc/utmp +WTMP_FILE = /usr/adm/wtmp + +D_NO_SETENV = -DNO_SETENV + +SHLIBCFLAGS := -fpic +SHLIBLDFLAGS := -assert pure-text +SHLIBEXT := so +SHLIBSEP := . diff --git a/src/kadmin/config.mk/template b/src/kadmin/config.mk/template new file mode 100644 index 000000000..caf3a2d9d --- /dev/null +++ b/src/kadmin/config.mk/template @@ -0,0 +1,142 @@ +# $Id$ +# $Source$ + +export TOP + +KRB5B4 = true +CONFDIR = $(TOP)/config.mk + +ifndef CUR_DIR +CUR_DIR = . +endif + +# +# get the os name +# + +include $(CONFDIR)/architecture + +# +# Programs +# +IMAKE = imake +# The purpose of this variable setting is to prevent -w from being +# passed down via environment variables into sub-makes that use SunOS +# Make rather than GNU make. +ifndef MAKE_PRINT_DIRECTORY +MAKE := $(MAKE) --no-print-directory MAKEFLAGS=$(MAKEFLAGS) MFLAGS=$(MFLAGS) +endif +CC = gcc +AR = ar +RANLIB = ranlib +LD = ld +RM = rm +CLEAN = rm -f +MV = mv +LN = ln +LNSOFT = $(LN) -s +MAKEDEPEND = makedepend +RPCGEN = rpcgen +PERL = /usr/local/bin/perl +DUMPPERL = /usr/local/bin/perl.static +UNDUMP = undump +YACC = $(TOP)/scripts/newyacc.sh +GENPROT = $(TOP)/scripts/genproto.sh +INSTCMD = install -c +export INSTCMD +PURIFY = purify +PROOF = proof +QUANTIFY = quantify +LEX_LIB = -ll +PERL = /usr/local/bin/perl +OBJDUMP = /usr/local/bin/gobjdump +OBJCOPY = /usr/local/bin/gobjcopy + +# Dejagnu variables + +# We have to set the host with --host so that setup_xfail will work. +# If we don't set it, then the host type used is "native", which +# doesn't match "*-*-*". + +DEJAFLAGS := $(DEJALFLAGS) $(CLFLAGS) --debug --host \ + unknown-$(shell uname -m)-$(shell uname -s)$(shell uname -r) +ifdef VERBOSE_TEST +DEJAFLAGS += --verbose +endif + +RUNTEST := runtest $(DEJAFLAGS) + +# +# Flags. Since this is the initial setting, don't preserve current +# values; otherwise, recursive makes will get the sum of everything. +# +YFLAGS = -d +ARFLAGS = cru +CFLAGS := $(CLFLAGS) +LDFLAGS := $(CLFLAGS) + +# +# The default target is "all". Put this before any includes, in case +# the includes define new targets. Or perhaps they should be allowed +# to define a new default target... +# +all:: + +# +# Get a unique number for files built in /tmp +# +__PID__ := $(shell echo $$$$) + +include $(CONFDIR)/config + +include $(CONFDIR)/rules + +expand IncludeArchFile + +include $(CONFDIR)/site.def + +ifdef STRIP_INSTALLED +INST_PROG_FLAGS = -s +endif + +# avoid makefiles from failing on default rules +expand DefaultRules + +# include dependencies +ifeq ($(shell [ -r Makefile.depend ] && echo yes),yes) +include Makefile.depend +endif + +# disable RCS frobbing +% :: RCS/%,v + +# fix lex rule +.l.c: + $(RM) -f $@ + $(LEX) $(LFLAGS) -t $< > $@ + +# error table rule +.SUFFIXES: .et +.et.c: + $(COMPILE_ET) $< +.et.h: + $(COMPILE_ET) $< + +# rpcgen rule +.SUFFIXES: .x +.x.c: + $(RPCGEN) -o $@ -c $< +.x.h: + $(RPCGEN) -o $@ -h $< + +# command table rule +.SUFFIXES: .ct +.ct.c: + $(MK_CMDS) $< +.ct.h: + $(MK_CMDS) $< + +CMD="echo 'You must specify CMD to use the 'execute' rule.'; exit 1" + +execute: + @eval $(CMD) |
