2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 # Copyright 1998-2015 The OpenLDAP Foundation.
5 # Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
11 # A copy of this license is available in the file LICENSE in the
12 # top-level directory of the distribution or, alternatively, at
13 # <http://www.OpenLDAP.org/license.html>.
16 LDAP_BUILD = $(LDAP_SRC)
17 LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
18 LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
19 $(LDAP_BUILD)/libraries/liblber/liblber.la
21 LIBTOOL = $(LDAP_BUILD)/libtool
24 DEFS = -DSLAPD_OVER_RDNVAL=SLAPD_MOD_DYNAMIC \
25 -DSLAPD_OVER_PGUID=SLAPD_MOD_DYNAMIC \
26 -DSLAPD_OVER_VERNUM=SLAPD_MOD_DYNAMIC
30 PROGRAMS = pguid.la rdnval.la vernum.la
37 libdir=$(exec_prefix)/lib
38 libexecdir=$(exec_prefix)/libexec
39 moduledir = $(libexecdir)$(ldap_subdir)
44 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
49 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
50 -rpath $(moduledir) -module -o $@ $? $(LIBS)
53 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
54 -rpath $(moduledir) -module -o $@ $? $(LIBS)
57 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
58 -rpath $(moduledir) -module -o $@ $? $(LIBS)
61 rm -rf *.o *.lo *.la .libs
64 mkdir -p $(DESTDIR)$(moduledir)
65 for p in $(PROGRAMS) ; do \
66 $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \