$(RM) ../$@; \
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
-version.c: $(OBJS)
+version.c: $(OBJS) $(srcdir)/Version.c
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \
h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install-common: all-common install-local
# Version
VERSIONFILE = $(top_srcdir)/build/version
-INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR)
+INCLUDEDIR = -I$(top_srcdir)/include
-LDAP_LIBDIR = $(top_srcdir)/libraries
LDAP_LIBS = -lldif -lldap -llber
-LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a
+LDAP_LIBDEPEND = $(VLIBDIR)/libldif.a $(VLIBDIR)/libldap.a $(VLIBDIR)/liblber.a
# AutoConfig generated
AC_CC = @CC@
# Our Defaults
CC = $(AC_CC)
-DEFS = $(AC_DEFS) $(INCLUDEDIR) $(LDAP_DEFS) $(XDEFS)
-LIBS = -L$(LDAP_LIBDIR) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)
+DEFS = $(LDAP_DEFS) $(VINCLUDEDIR) $(INCLUDEDIR) $(XDEFS) $(AC_DEFS)
+LIBS = $(VLIBS) $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)
CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES)
LDFLAGS = $(AC_LDFLAGS)
FAX5OBJS = main.o faxtotpc.o
RPOBJS = rp500.o faxtotpc.o
PROGRAMS= rp500 fax500
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
rp500 : rpversion.o
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Versionrp.c > $@)
+ < $(srcdir)/Versionrp.c > $@)
fax5version.c: ${FAX5OBJS} $(LDAP_LIBDEPEND)
$(RM) $@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install: $(PROGRAMS) xrpcomp FORCE
-$(MKDIR) -p $(libexecdir)
XSRCS= version.c
OBJS= main.o
PROGRAMS= in.xfingerd
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
in.xfingerd : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
-version.c: ${OBJS} $(LDAP_LIBDEPEND)
+version.c: ${OBJS} ${LDAP_LIBDEPEND}
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install: $(PROGRAMS) FORCE
-$(MKDIR) -p $(libexecdir)
GOOBJS = go500.o detach.o setproctitle.o
GWOBJS = go500gw.o detach.o setproctitle.o
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
go500 : goversion.o
$(CC) $(LDFLAGS) -o $@ $(GOOBJS) goversion.o $(LIBS)
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND)
$(RM) $@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Versiongw.c > $@)
+ < $(srcdir)/Versiongw.c > $@)
install: $(PROGRAMS) go500gw.help FORCE
-$(MKDIR) -p $(libexecdir) $(sysconfdir)
XSRCS= version.c
OBJS= main.o
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
mail500 : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install: $(PROGRAMS) FORCE
-$(MKDIR) -p $(libexecdir)
OBJS= main.o cmds.o help.o query.o
HDRS= rcpt500.h
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
rcpt500 : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install: $(PROGRAMS) rcpt500.help FORCE
-$(MKDIR) -p $(libexecdir) $(sysconfdir)
OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o
XLIBS = -llber -lldap
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
XSRCS = ldsversion.c ldmversion.c lddversion.c ldrversion.c
PROGRAMS = ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Versionlds.c > $@)
+ < $(srcdir)/Versionlds.c > $@)
ldmversion.c: ldapmodify.o $(LDAP_LIBDEPEND)
$(RM) $@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Versionldm.c > $@)
+ < $(srcdir)/Versionldm.c > $@)
lddversion.c: ldapdelete.o $(LDAP_LIBDEPEND)
$(RM) $@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Versionldd.c > $@)
+ < $(srcdir)/Versionldd.c > $@)
ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND)
$(RM) $@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Versionldr.c > $@)
+ < $(srcdir)/Versionldr.c > $@)
installlocal: ldapsearch ldapmodify ldapdelete ldapmodrdn ldapadd FORCE
-$(MKDIR) -p $(bindir)
HDRS= ud.h
PROGRAMS= ud
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
XLIBS = $(LIBTERMCAP)
ud : version.o
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install: $(PROGRAMS) FORCE
-$(MKDIR) -p $(bindir)
$(RM) ldapconfig.h
veryclean-local: clean-local FORCE
+ $(RM) portable.h
depend-local: ldapconfig.h FORCE
-ldapconfig.h: ldapconfig.h.edit Makefile
+ldapconfig.h: $(srcdir)/ldapconfig.h.edit Makefile
@$(RM) $@
@echo "Making ldapconfig.h"
@echo "/*" > $@; \
-e 's;%EDITOR%;$(EDITOR);' \
-e 's;%FINGER%;$(FINGER);' \
-e 's;%SENDMAIL%;$(SENDMAIL);' \
- ldapconfig.h.edit >> $@; \
+ $(srcdir)/ldapconfig.h.edit >> $@; \
$(CHMOD) 444 $@
all-common: all-local
##
LIBRARY = libldap.a
PROGRAMS = ltest ttest
+VINCLUDEDIR = -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L(VLIBDIR)
SRCS = bind.c open.c result.c error.c compare.c search.c \
modify.c add.c modrdn.c delete.c abandon.c ufn.c cache.c \
abandon.o syntax.o association.o kerberos.o LDAP_tables.o \
certificate.o
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
BUILD_OPT = "--enable-ldapd"
BUILD_SRV = @BUILD_LDAPD@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
request.o: LDAP-types.h
detach.o strdup.o tempnam.o repl.o lock.o \
schema.o schemaparse.o monitor.o configinfo.o
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
BUILD_OPT = "--enable-slapd"
BUILD_SRV = @BUILD_SLAPD@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
clean-local: FORCE
@for i in back-* tools; do \
modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
filterindex.o unbind.o kerberos.o close.o
+VINCLUDEDIR= -I../../../include -I$(srcdir)/..
+
BUILD_OPT = "--enable-ldbm"
BUILD_SRV = @BUILD_LDBM@
$(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
SRCS = search.c config.c
OBJS = search.o config.o
+VINCLUDEDIR= -I../../../include
+
BUILD_OPT = "--enable-passwd"
BUILD_SRV = @BUILD_PASSWD@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
OBJS = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \
modify.o modrdn.o compare.o abandon.o result.o
+VINCLUDEDIR= -I../../../include
+
BUILD_OPT = "--enable-shell"
BUILD_SRV = @BUILD_SHELL@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
XSRCS = pwd-version.c
OBJS = passwd-shell.o shellutil.o
+VINCLUDEDIR= -I../../../include
+
passwd-shell: pwd-version.o
$(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS)
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < pwd-Version.c > $@)
+ < $(srcdir)/pwd-Version.c > $@)
HAVE_ISODE = @HAVE_ISODE@
BUILD_LDBM = @BUILD_LDBM@
+VINCLUDEDIR= -I../../../include
+VLIBDIR= ../../../libraries
+VLIBS = -L$(VLIBDIR)
+
PROGRAMS=ldif2index ldif2ldbm ldbmcat ldif2id2entry \
ldif2id2children centipede ldbmtest ldif
reject.o replica.o replog.o ri.o rq.o sanity.o st.o \
tsleep.o
+VINCLUDEDIR= -I../../include
+VLIBDIR= ../../libraries
+VLIBS= -L$(VLIBDIR)
+
BUILD_OPT = "--enable-slurpd"
BUILD_SRV = @BUILD_SLURPD@
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
- < Version.c > $@)
+ < $(srcdir)/Version.c > $@)
install-local: FORCE
@-$(MKDIR) -p $(libexecdir)