#define requote(x) "x"
#endif
-#ifdef PROFILED_LIBS
/*
* Rule for building objects in libraries.
*/
-#if defined(mips) || defined(_AIX) || defined(SOLARIS)
-/*
- * The MIPS, AIX & SOLARIS loaders don't have the -X flag or its functionality.
- * Solaris to make it worse does not have -x
- */
-#if !defined(SOLARIS)
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) PROF_FLAG -c $(CFLAGS) $*.c @@\
- $(MV) $*.o profiled/$*.o @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#else
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) PROF_FLAG -c $(CFLAGS) $*.c @@\
- $(MV) $*.o profiled/$*.o @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#endif
-#else /* ! mips && ! _AIX */
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) PROF_FLAG -c $(CFLAGS) $*.c @@\
- -$(LD) -X -r -o profiled/$*.o $*.o @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#endif /* mips */
-/*
- * cc -R breaks profiling with -p on 4.3BSD on the VAX
- * (and probably elsewhere), so we don't do it for the profiled version.
- */
-
-#define library_ro_object(cfile) @@\
-concat(cfile,.o): concat(cfile,.c) @@\
- $(CC) PROF_FLAG -c $(CFLAGS) concat(cfile,.c) @@\
- -$(LD) -X -r -o profiled/$*.o $*.o @@\
- $(CCRO) -c $(CFLAGS) concat(cfile,.c) @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-
-#define library_asm_object(ofile,sfile) @@\
-ofile: sfile @@\
- $(CP) sfile x.c @@\
- $(CPP) -DPROF x.c | $(AS) - @@\
- -$(LD) -X -r -o profiled/$*.o a.out @@\
- $(CPP) x.c | $(AS) - @@\
- -$(LD) -x -r -o $*.o a.out @@\
- $(RM) a.out x.c
-
-#ifdef USELINT
-#define install_library_lint(libname) @@\
-all:: concat3(llib-l,libname,.ln) @@\
- @@\
-install:: @@\
- $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) @@\
-
-#else
-#define install_library_lint(libname)
-#endif
-
-
-#define install_library_target(libname,objs,srcs,lintlibs) @@\
- @@\
-all:: concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\
- @@\
-concat3(lib,libname,.a): objs @@\
- $(RM) $@.bak @@\
- -$(MV) $@ $@.bak @@\
- $(ARCHIVE) $@ objs @@\
- $(RANLIB) $@ @@\
- @@\
-concat3(lib,libname,_p.a): objs @@\
- $(RM) $@.bak @@\
- -$(MV) $@ $@.bak @@\
- cd profiled; $(ARCHIVE) ../$@ objs @@\
- $(RANLIB) $@ @@\
- @@\
-lint:: concat3(llib-l,libname,.ln) @@\
- @@\
-concat3(llib-l,libname,.ln): srcs @@\
- $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\
- @@\
-clean:: @@\
- $(RM) concat3(lib,libname,.a) concat3(lib,libname,_p.a) @@\
- $(RM) concat3(llib-l,libname,.ln) @@\
- $(RM) objs @@\
- $(RM) profiled/?*.o @@\
- @@\
-install:: @@\
- $(INSTALLRAW) -c -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(INSTALLRAW) -c -m 644 concat3(lib,libname,_p.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
- $(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
- $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
- @@\
-install_library_lint(libname) @@\
-
-#else /* !PROFILED_LIBS */
-/*
- * Rule for building objects in libraries.
- */
-
-#ifdef DEBUG_LIBS
-/* When debugging, leave symbols alone (don't do LD) */
#define library_obj_rule() @@\
.c.o: @@\
$(CC) -c $(CFLAGS) $*.c
-#else
-#define library_obj_rule() @@\
-.c.o: @@\
- $(CC) -c $(CFLAGS) $*.c @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#endif
-
-#define library_ro_object(cfile) @@\
-concat(cfile,.o): concat(cfile,.c) @@\
- $(CCRO) -c $(CFLAGS) concat(cfile,.c) @@\
- -$(LD) -x -r -o a.out $*.o @@\
- $(MV) a.out $*.o
-#define library_asm_object(ofile,sfile) @@\
-ofile: sfile @@\
- $(CPP) x.c | $(AS) - @@\
- -$(LD) -x -r -o $*.o a.out @@\
- $(RM) a.out x.c
-
-#ifdef USELINT
-#define install_library_lint(libname) @@\
-all:: concat3(llib-l,libname,.ln) @@\
+#define install_library_target(libname,objs,srcs) @@\
@@\
-install:: @@\
- $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LINTLIBDIR)/,llib-l,libname,.ln) @@\
-
-#else
-#define install_library_lint(libname)
-#endif
-
-#define install_library_target(libname,objs,srcs,lintlibs) @@\
- @@\
-all:: concat3(lib,libname,.a) @@\
+all:: concat3(lib,libname,.a) @@\
@@\
concat3(lib,libname,.a): objs @@\
$(RM) $@.bak @@\
$(ARCHIVE) $@ objs @@\
$(RANLIB) $@ @@\
@@\
-lint:: concat3(llib-l,libname,.ln) @@\
- @@\
-concat3(llib-l,libname,.ln): srcs @@\
- $(LINT) concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srcs lintlibs @@\
- @@\
clean:: @@\
$(RM) concat3(lib,libname,.a) @@\
- $(RM) concat3(llib-l,libname,.ln) @@\
$(RM) objs @@\
@@\
install:: @@\
$(INSTALLRAW) -c -m 644 concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
$(RANLIB) -t concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a) @@\
- @@\
-install_library_lint(libname) @@\
-
+ $(CHMOD) 444 concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a)
-#endif /* PROFILED_LIBS */
/*
* Rule for building utilities (binaries which don't get installed)
clean:: @@\
$(RM) pgm objs @@\
-/*
- * Rule for building "generator" programs.
- */
-
-#define generate(file,pgm,libs) @@\
- @@\
-pgm: concat(pgm,.c) libs @@\
- $(HCC) $(HCFLAGS) -o $@ $@.c libs $(OSLIBS) @@\
- @@\
-file: pgm @@\
- ./pgm file @@\
- @@\
-clean:: @@\
- $(RM) file pgm concat(pgm,.o)
-
-#define generate_depend(file,pgm,libs) @@\
- generate(file,pgm,libs) @@\
- @@\
-depend:: file
-
-
/*
* Rule for building test programs (something which is not installed)
*/
$(RM) pgm concat(pgm,.o) @@\
/*
- * Rule for compileing files with "et"
+ * Rule for compiling files with "et"
*/
#define comp_et(tbl) @@\
@@\
depend:: concat(src,.h)
-/*
- * Rule for building some random object module
- */
-
-#define host_simple_object(obj,src) @@\
-obj: src @@\
- $(HCC) $(HCFLAGS) -c src @@\
- @@\
-clean:: @@\
- $(RM) obj @@\
-
-#define ro_object(obj,src) @@\
-obj: src @@\
- $(CCRO) $(CFLAGS) -c src @@\
- @@\
-clean:: @@\
- $(RM) obj @@\
-
-/*
- * Rule for building some random object module with compile flags and
- * other dependendcies
- */
-
-#define host_flag_object(obj,src,flags,localdeps) @@\
-obj: src localdeps @@\
- $(HCC) $(HCFLAGS) flags -c src @@\
- @@\
-clean:: @@\
- $(RM) obj @@\
-
-#define ro_flag_object(obj,src,flags,localdeps) @@\
-obj: src localdeps @@\
- $(CCRO) $(CFLAGS) flags -c src @@\
- @@\
-clean:: @@\
- $(RM) obj @@\
-
-/*
- * Rule for building some random object module with compile flags, an
- * intermediate output, and some other dependencies
- */
-
-#define host_cplx_object(obj,interim,src,flags,localdeps) @@\
-obj: interim src localdeps @@\
- $(HCC) $(HCFLAGS) flags -c src @@\
- $(MV) interim obj @@\
- @@\
-clean:: @@\
- $(RM) obj @@\
-
-#define ro_cplx_object(obj,interim,src,flags,localdeps) @@\
-obj: src localdeps interim @@\
- $(CCRO) $(CFLAGS) flags -c src @@\
- $(MV) interim obj @@\
- @@\
-clean:: @@\
- $(RM) obj @@\
-
/*
* Rule for building a program which is to be installed:
*/
clean:: @@\
$(RM) pgm objs @@\
-/*
- * Rule for building a specially installed program
- */
-
-#define program_spinst(pgm,objs,localdeps,syslibs,installdir,instopts) @@\
-all:: pgm @@\
- @@\
-pgm: objs localdeps @@\
- $(CC) $(CFLAGS) -o $@ objs syslibs $(OSLIBS) @@\
- @@\
-install:: @@\
- $(INSTALLRAW) instopts pgm ${DESTDIR}installdir/pgm @@\
- @@\
-clean:: @@\
- $(RM) pgm objs @@\
-
/*
* Rule for installing man pages. Section installing into should match
* suffix, or the man page won't show up when using man(1).
clean:: @@\
$(RM) *~ \#* *.bak $(TAGSFILE)
-#define tags_target() @@\
-tags:: @@\
- $(TAGGER) *.c *.h
-
#define makefile_target() @@\
Makefile:: @@\
-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak @@\
echo "### Done with" `pwd`); \ @@\
done
-#define print_target() @@\
-print:: ${CODE} @@\
- ${LPR} ${CODE}
-
#define src_target() @@\
src:: ${CODE} @@\
@@\
foreach_subdirs(install, subdirs) @@\
foreach_subdirs(clean, subdirs) @@\
foreach_subdirs(depend, subdirs) @@\
- foreach_subdirs(tags, subdirs) @@\
- foreach_subdirs(print, subdirs) @@\
foreach_subdirs(src, subdirs) @@\
#define do_subdirs(subdirs) @@\
/* Compile Embeded SQL source */
-#ifdef INGRES
-#define sqlrule() @@\
-.SUFFIXES: .sc .dc @@\
-.dc.sc: @@\
- $(AWK) -f $(SRCTOP)/util/imake.includes/ingres.awk < $< > $*.sc @@\
- @@\
-.sc.c: @@\
- /usr/ingres/bin/esqlc -p $*
-#define sqlfile(file) @@\
-concat(file,.sc): concat(file,.dc) @@\
-concat(file,.c): concat(file,.sc) @@\
-clean:: @@\
- $(RM) concat(file,.sc) concat(file,.c)
-#endif
-#ifdef INFORMIX
-#define sqlrule() @@\
-.SUFFIXES: .ec .dc @@\
-.dc.ec: @@\
- $(AWK) -f $(SRCTOP)/util/imake.includes/informix.awk < $< > $*.ec @@\
- @@\
-.ec.c: @@\
- /usr/informix/bin/esql -e $*.ec
-#define sqlfile(file) @@\
-concat(file,.ec): concat(file,.dc) @@\
-concat(file,.c): concat(file,.ec) @@\
-clean:: @@\
- $(RM) concat(file,.ec) concat(file,.c)
-#endif
#ifdef ORACLE
-/* have to undef these to keep the ORADEFS line from being attacked */
+/* have to undef these to keep the ORADEFS line from being attacked by Imake */
#undef HESIOD
#undef ZEPHYR
#undef GDSS
#undef ATHENA
ORADEFS= DEFINE=HESIOD DEFINE=ZEPHYR DEFINE=GDSS DEFINE=ATHENA
#define sqlrule() @@\
-.SUFFIXES: .pc .dc @@\
-.dc.pc: @@\
- $(AWK) -f $(SRCTOP)/util/imake.includes/oracle.awk < $< > $*.pc @@\
- @@\
+.SUFFIXES: .pc @@\
.pc.c: @@\
/usr/oracle/bin/proc INAME=$*.pc INCLUDE=$(BUILDTOP)/include INCLUDE=$(BUILDTOP)/lib INCLUDE=$(INCLDIR) $(ORADEFS)
#define sqlfile(file) @@\
-concat(file,.pc): concat(file,.dc) @@\
concat(file,.c): concat(file,.pc) @@\
clean:: @@\
- $(RM) concat(file,.pc) concat(file,.c)
+ $(RM) concat(file,.c)
#endif
*/
/* GLOBAL_CDEFS are passed to every C compile statement */
-/* Here are some of the common definitions which you might add to GLOBAL_CDEFS:
- * HESIOD - use hesiod lookup Moira server name
- * ZEPHYR - report critical errors via Zephyr
- * SYSLOG42 - report critical errors via 4.2BSD-style syslog routines
- * ATHENA - Athena-local hacks other sites probably don't want
- * GDSS - use the generic data signature service to verify user info
- * DBMS=xxx - currently supported is INGRES, INFORMIX, ORACLE
- * ULTRIX022 - if you are running on pre-3.0 Ultrix.
- * SunOS=xx - if you are running SunOS. Set xx to 10 times the release
- * number (e.g. SunOS 3.5 => -DSunOS=35, SunOS 4.0 => -DSunOS=40)
- * NO_GETUSERSHELL - if your system doesn't have getusershell() in libc
- * (type 'nm /lib/libc.a | grep getusershell', if something
- * shows up, you should NOT turn this flag on)
- */
-
-/* Curses library */
-#ifdef SOLARIS
-CURSES= -L/usr/css/lib -lcurses -ltermcap
-#else
-CURSES= -lcurses -ltermcap
-#endif
#ifdef _AIX
-OSDEFS=-D_BSD -D_BSD_INCLUDES -DPOSIX
-OSLIBS=-lbsd
-CURSES=-lcurses
+OSDEFS= -D_BSD -D_BSD_INCLUDES -DPOSIX
+OSLIBS= -lbsd
#endif
-#if defined(sgi)
+#if defined(linux) || defined(__NetBSD__)
OSDEFS= -DPOSIX
#endif
+#ifdef sgi
+OSDEFS= -DPOSIX -DUSE_CRYPT_H
+#endif
+
#if defined(SOLARIS)
-OSDEFS= -DPOSIX -DSOLARIS -I/usr/openwin/include
-OSLIBS= -L/usr/ccs/lib -lcurses -ltermcap -lresolv \
- -lsocket -lnsl -lc -lelf -ldl
-CURSES=
-/* the curses and termcap libs are where they are on purpose. -vrt 4/28/93
- */
+OSDEFS= -DPOSIX -DSOLARIS
+OSLIBS= -lresolv -lsocket -lnsl
#endif
#ifdef NeXT
OSLIBS= -lresolv
#endif
+#ifdef __alpha
+OSDEFS= -DSIXTYFOUR -DPOSIX
+#endif
-GLOBAL_CDEFS= -DHESIOD -DZEPHYR -DGDSS -DATHENA -DDBMS=ORACLE -I/usr/athena/include $(OSDEFS)
+GLOBAL_CDEFS= -DHESIOD -DZEPHYR -DATHENA -DDBMS=ORACLE -I/usr/athena/include $(OSDEFS)
/* SRCTOP is the root of the Moira source tree */
* stamp user records to guarentee their authenticity. Also define
* location of library and includes.
*/
+#if !defined(linux) && !defined(__NetBSD__)
#define GDSS
#ifdef sgi
LIBGDSS= /mit/gdss/lib/libgdss.a
LIBGDSS= /mit/gdss/`machtype`/libgdss.a
#endif
#endif
-GDSSINC= -I/mit/gdss/include
+GDSSINC= -DGDSS -I/mit/gdss/include
+#endif /* GDSS */
/*
* Define your DBMS here. Currently only ORACLE is supported.
*/
/* #define NEED_STRCASECMP */
-/*
- * Define USELINT if you want to build lint libraries while building
- * Moira.
- */
-#if !defined(NeXT) && !defined(_AIX) && !defined(SOLARIS) && !defined(sgi)
-#define USELINT
-#endif
-
-/*
- * LINTLIBFLAG should be the flag used to tell lint to create a lint
- * library. On most BSD systems, this is -C
- */
-#if defined(ultrix) || defined(_AIX)
-LINTLIBFLAG=-o
-#else
-LINTLIBFLAG=-C
-#endif
-
MR_LIB=$(BUILDTOP)/lib/libmoira.a
MR_LIBDEP=$(MR_LIB)
-MR_LINTLIB=$(BUILDTOP)/lib/llib-lmoira.ln
GDB_LIB=$(BUILDTOP)/gdb/libmrgdb.a
GDB_LIBDEP=$(GDB_LIB)
-GDB_LINTLIB=$(BUILDTOP)/gdb/llib-lmrgdb.ln
/*
*/
#ifndef USELOCALLIBS
COM_ERR_DEP = $(COM_ERR)
+COM_ERR_INC = -I$(BUILDTOP)/util/et/
#endif
LLIB = -L/usr/athena/lib
#endif
/* libraries SQL programs need */
-#ifdef INGRES
-SQL_LIB= /usr/ingres/lib/libingres.a -lm
-#endif
-#ifdef INFORMIX
-SQL_LIB= /usr/informix/lib/libsql.a
-#endif
#ifdef ORACLE
SQL_LIB= -L/usr/oracle/lib -lsql /usr/oracle/lib/osntab.o -lsqlnet -lora -lsqlnet -lora -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lsocket -lnsl -lm -lm -ldl -laio
#endif
+/* optional readline support for mrtest */
+READLINE_INCLUDES= -I/mit/gnu/include/readline -DUSE_READLINE
+READLINE_LIBS= -L/mit/gnu/lib -lreadline -ltermcap
/* Define NEED_STRCASECMP if your C library doesn't have the BSD-style
* case insensitive string compare strcasecmp().
#endif
/* HAS_VSPRINTF should be defined if this function is in your C library */
-#if defined(_AIX) || defined(sun) || defined(_AUX_SOURCE) || defined(sgi)
+#if !defined(ultrix) && (!defined(sun) || defined(SOLARIS))
#define HAS_VSPRINTF
+#endif
+
+/* Curses library */
+#ifdef SOLARIS
+CURSES= -L/usr/css/lib -lcurses -ltermcap
+#elif linux
+CURSES= -lncurses -ltermcap
+OSINCLUDES= -I/usr/include/ncurses
+#elif _AIX
+CURSES= -lcurses
#else
-#undef HAS_VSPRINTF
+CURSES= -lcurses -ltermcap
#endif
-/*
- * Define DEBUG_LIBS if you want to create versions of the libraries
- * that have useful debugging information (the default rules will strip
- * out extra symbols, including debugging symbols, from the symbol
- * table.) NOTE: This only works if you do NOT turn on PROFILED_LIBS
- * below.
- * NOTE: this doesn't turn on the debugging flag for your compiler; do
- * that with the DBG make variable, below.
- */
-/* #define DEBUG_LIBS */
+/* X and motif (for mmoira client) */
+#ifdef SOLARIS
+XDIR= /usr/openwin
+#else
+XDIR= /usr/X11
+#endif
-/*
- * Define PROFILED_LIBS if you want to create profiled versions of the
- * libraries used in Kerberos
- */
-#define PROFILED_LIBS
+#if !(defined(linux) || defined(__NetBSD__))
+MOTIFINC= /mit/motif/include
+MOTIFLIB= /mit/motif/`machtype`lib
+#endif
-/*
- * Define PROF_FLAG to be the flag to be passed to your C compiler to
- * turn on profiling.
- */
-#ifdef vax
-#define PROF_FLAG -pg
-#else
-#define PROF_FLAG -p
-#endif
+/* where crypt is, if not libc */
+#ifdef __NetBSD__
+CRYPT= -lcrypt
+#endif
/*
* The name of a command which builds an object library.
*/
ARCHIVE= ar cru
+
/*
* The name of another program needed to post-process the archive.
*/
LD=ld /* The name of the target's linker */
-AS=as /* The name of the target's assembler */
-
-LINT=lint /* The name of `lint' */
-
#ifdef SOLARIS
CC=gcc -traditional
#else
#endif /* _AIX */
#endif /* SOLARIS */
-CCRO=$(CC) -R /* Compile with initialized data read-only
- & shared (if possible) */
-
-HCC=$(CC) /* The name of the C compiler on _this_
- * machine
- */
-
CPP=$(CC) -E /* A command which invokes the C preprocessor */
#ifndef _AIX /* RS6K optomizer is buggy, we don't know if it wall affect moira */
DBG=-O /* Debug or optimize? */
#endif /* _AIX */
-HCFLAGS=$(CFLAGS)
-
-TAGGER=etags /* Program to index source files */
-
SHELL=/bin/sh /* shell to use from make */
MAKE=make /* name of make program */
RM=rm -f /* delete one or more files/directories/links */