# --------------------------------------------------------
#  This file was automatically generated.  Do not edit it.
#  Instead, edit the Make-common file (located in the root
#  (of the LDAP distribution).  See the LDAP INSTALL file
#  for more information.
# --------------------------------------------------------
#
#-----------------------------------------------------------------------------
# Copyright (c) 1994 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
#       LDAP buildtools makefile
#
#-----------------------------------------------------------------------------

all:	FORCE
	@if [ ! -z "$(NEEDUNPROTO)" ]; then \
	    cd unproto; $(MAKE) $(MFLAGS) CC=$(CC); \
	else \
	    exit 0; \
	fi

install:	FORCE

clean:
	cd unproto; $(MAKE) $(MFLAGS) clean
	cd platforms; $(MAKE) $(MFLAGS) clean

veryclean:
	cd unproto; $(MAKE) $(MFLAGS) clean
	cd platforms; $(MAKE) $(MFLAGS) veryclean

links:
	@echo "making links in `$(PWD)`"; \
	$(LN) .src/version .src/platforms .src/Make-append .src/install.sh . ; \
	( $(MKDIR) unproto; cd unproto; $(LN) ../.src/unproto .src; \
	  $(LN) .src/Makefile .src/*.[ch] . )

#
# Do NOT edit this file -- it is automatically appended to all Makefiles
# except the LDAP top-level Makefile. See the LDAP INSTALL file for more
# information.
#
#-----------------------------------------------------------------------------
# Copyright (c) 1994 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
#       LDAP standard Make defines (appended to all but top-level Makefile)
#
#-----------------------------------------------------------------------------

# DEFS are included in CFLAGS
DEFS	= $(PLATFORMCFLAGS) $(LDAP_DEBUG) $(KERBEROS) $(AFSKERBEROS) \
		$(UOFM) $(UOFA) $(NO_USERINTERFACE) $(CLDAP) $(NO_CACHE) \
		$(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \
		$(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \
		$(SLAPD_BACKENDS) $(LDBMBACKEND) $(LDBMINCLUDE) $(PHONETIC)

# SERVERDEFS are added to server builds CFLAGS (in addition to DEFS)
SERVERDEFS	= $(ISODEPACKAGE) $(ICRELEASE) $(LDAP_USE_PP) \
			$(NO_SETPROCTITLE) $(PEPSY_DUMP)

#
# ISODELIBS are used in server/ldapd builds
#
ISODELIBS	= $(ISODEBASELIBS) -lm $(ISODETURBOLIBS)

# ACFLAGS are added to CFLAGS but not passed to mkdep, lint, etc
ACFLAGS		= $(EXTRACFLAGS) $(UNPROTOCFLAGS)

# ALDFLAGS are always placed near the beginning of all linker (cc -o) commands
ALDFLAGS	= $(EXTRALDFLAGS) $(PLATFORMLDFLAGS)

# ALIBS are always placed at the end of all linker (cc -o) commands
ALIBS		= $(PLATFORMLIBS) $(THREADSLIB)

#
# default definitions for Unix utilities (may be over-ridden in Make-platform)
CC	= cc
MAKE	= make
RANLIB	= ranlib
AR	= ar
RM	= rm -f
MV	= mv -f
CP	= cp
CHMOD	= chmod
CAT	= cat
LN	= ln -s
HARDLN	= ln
TAIL	= tail
SED	= sed
LINT	= lint
5LINT	= lint
MKDIR	= mkdir
INSTALL	= install
INSTALLFLAGS = -c
BASENAME= basename
DIRNAME	= dirname
MKDEP	= $(LDAPSRC)/build/mkdep -c gcc -s -f Make-template
PWD	= pwd
DATE	= date
HOSTNAME= hostname


#
# empty target used to force rules to be invoked
#
FORCE:

#
# LDAP SunOS5 GNU C Make-platform file
#

#
# add any platform-specific overrides below here
#


#
# -------------------------------------------------------------------------
# you will probably not need to edit anything below this point
# -------------------------------------------------------------------------
CC	= gcc

# ranlib not needed under SunOS5
RANLIB	= ""

# give full path to hostname since it may not be in user's path
HOSTNAME=/usr/ucb/hostname

# don't count on /usr/ucb/install being present or first in path
INSTALL=$(LDAPSRC)/build/install.sh

PLATFORMCFLAGS=	-Dsunos5 -D_REENTRANT
PLATFORMLIBS= -lsocket -lnsl -lgen
THREADS= -DTHREAD_SUNOS5_LWP
THREADSLIB=-lthread
#-----------------------------------------------------------------------------
# Copyright (c) 1997 PGP inc.
# All rights reserved.
#
#-----------------------------------------------------------------------------
#############################################################################
## Edit the following variables to have appropriate values for your system ##
#############################################################################

vpath %.a $(LDIR):$(PGPCDKDIR)/unix:$(DBLDIR):$(PGPCDKDIR)/priv/keyserver: \
	  $(PGPCDKDIR)/../network/pgpsockets/unix/src

#############################################################################
## LDAP install paths                                                      ##
#############################################################################
#
# by default, everything is installed below INSTROOT
# servers, config files, etc. are put in ETCDIR
# include files get put in INCLUDEDIR
# libraries are put in LIBDIR
# man pages are put under MANDIR
# programs end-users will run are put in BINDIR
#
# Moved INSTROOT declaration to top-level Makefile
# useful for automation.

ETCDIR= $(INSTROOT)/etc
INCLUDEDIR= $(INSTROOT)/include
LIBDIR= $(INSTROOT)/unix
MANDIR= $(INSTROOT)/doc
BINDIR= $(INSTROOT)/unix

#
# if you want things to run in a different directory from where they
# are installed, set this accordingly (this path gets compiled into a
# few binaries). otherwise, leave it alone.
RUNTIMEETCDIR= $(ETCDIR)

#############################################################################
## General compiler options                                                ##
#############################################################################
# Passed to every compile (cc or gcc).  This is where you put -O or -g, etc.
# Added -D_REENTRANT per ldap doc. for Solaris builds <galileo>
OPT=-g
DEBUG=1
UNFINISHED=1
PGP_LEAKS=0
EXTRACFLAGS=-DPGPKEYSERVER -D_REENTRANT $(OPT) -fwritable-strings \
            -DUSE_PGP_LEAKS=$(PGP_LEAKS) -DPGP_DEBUG=$(DEBUG) \
            -DUNFINISHED_CODE_ALLOWED=$(UNFINISHED)

# Passed to every link (ld).  Include -g here if you did in EXTRACFLAGS.

EXTRALDFLAGS=$(OPT)

#############################################################################
## ISODE is required ONLY to build the ldap <-> X.500 server (ldapd)       ##
## If you don't want to build it, you can skip this section.               ##
#############################################################################
#
# To build the ldap server, uncomment the HAVEISODE line,
# and the section describing build settings for your version of isode.
#
HAVEISODE = yes

#############################################################################
## If you don't want to run slapd, skip this section.                      ##
#############################################################################
#
# To build slapd (the stand-alone ldap daemon), uncomment the MAKESLAPD
# line and select the SLAPD_BACKENDS you want to use. If you enable the
# LDBM backend, also select one of the LDBM backends.
MAKESLAPD= yes
#
# remove the defines for backends you don't want to enable 
SLAPD_BACKENDS= -DLDAP_LDBM 
#
# If you have included -DLDAP_LDBM in the SLAPD_BACKENDS line you need
# to specify which low-level database package to use.  There are
# four choices: Berkeley db b-tree, Berkeley db hash, GNU dbm, or ndbm.
#
# berkeley db btree package
LDBMBACKEND=-DLDBM_USE_DBBTREE21
LDBMINCLUDE=
LDBMLIB=-ldb
# berkeley db hash package
#LDBMBACKEND=-DLDBM_USE_DBHASH
#LDBMINCLUDE=-I/usr/local/db/include
#LDBMLIB=-ldb
# gnu dbm (gdbm)
#LDBMBACKEND=-DLDBM_USE_GDBM
#LDBMINCLUDE=-I$(INSTROOT)/servers/slapd/db
#LDBMLIB=-lgdbm
# standard unix ndbm
#LDBMBACKEND=-DLDBM_USE_NDBM
#
# if you want to use a non-default threads package change these lines
#THREADS=-DNO_THREADS
#THREADSLIB=

#############################################################################
## General options                                                         ##
#############################################################################
# uncomment this line to enable debugging code (a good idea)
LDAP_DEBUG=-DLDAP_DEBUG

# uncomment this line to turn on a few U of Michigan specific things
#UOFM=-DUOFM

# uncomment this line to delete a few printfs in the lber and ldap libraries.
#NO_USERINTERFACE=-DNO_USERINTERFACE

# uncomment this line to include Connectionless LDAP support
#CLDAP=-DCLDAP

# uncomment this line to eliminate local caching support in the libldap
#NO_CACHE=-DNO_CACHE

# uncomment this line to enable support for LDAP referrals in libldap
LDAP_REFERRALS=-DLDAP_REFERRALS

# uncomment this line to use soundex for approximate matches in slapd.
# the default is to use the metaphone algorithm.
#PHONETIC=-DSOUNDEX
