2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 # Copyright 1998-2014 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>.
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 \
27 -DSLAPD_OVER_INSTANCETYPE=SLAPD_MOD_DYNAMIC \
28 -DSLAPD_OVER_SYNTAXCHECKS=SLAPD_MOD_DYNAMIC
33 PROGRAMS = pguid.la rdnval.la vernum.la instancetype.la syntax_checks.la
40 libdir=$(exec_prefix)/lib
41 libexecdir=$(exec_prefix)/libexec
42 moduledir = $(libexecdir)$(ldap_subdir)
47 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
52 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
53 -rpath $(moduledir) -module -o $@ $? $(LIBS)
56 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
57 -rpath $(moduledir) -module -o $@ $? $(LIBS)
60 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
61 -rpath $(moduledir) -module -o $@ $? $(LIBS)
63 instancetype.la: instancetype.lo
64 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
65 -rpath $(moduledir) -module -o $@ $? $(LIBS)
67 syntax_checks.la: syntax_checks.lo
68 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
69 -rpath $(moduledir) -module -o $@ $? $(LIBS)
73 rm -rf *.o *.lo *.la .libs
76 mkdir -p $(DESTDIR)$(moduledir)
77 for p in $(PROGRAMS) ; do \
78 $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \