2 # Copyright 2009 Jonathan Clarke <jonathan@phillipoux.net>.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted only as authorized by the OpenLDAP
9 # A copy of this license is available in the file LICENSE in the
10 # top-level directory of the distribution or, alternatively, at
11 # <http://www.OpenLDAP.org/license.html>.
15 LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
16 LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
17 $(LDAP_BUILD)/libraries/liblber/liblber.la
19 LIBTOOL = $(LDAP_BUILD)/libtool
22 DEFS = -DSLAPD_OVER_LASTBIND=SLAPD_MOD_DYNAMIC
26 PROGRAMS = lastbind.la
33 libdir=$(exec_prefix)/lib
34 libexecdir=$(exec_prefix)/libexec
35 moduledir = $(libexecdir)$(ldap_subdir)
40 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
44 lastbind.la: lastbind.lo
45 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
46 -rpath $(moduledir) -module -o $@ $? $(LIBS)
49 rm -rf *.o *.lo *.la .libs
52 mkdir -p $(DESTDIR)$(moduledir)
53 for p in $(PROGRAMS) ; do \
54 $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \