1 1.1.1.1.6.2 tls # $OpenLDAP$ 2 1.1.1.1.6.2 tls # Copyright 2009 Jonathan Clarke <jonathan (at] phillipoux.net>. 3 1.1.1.1.6.2 tls # All rights reserved. 4 1.1.1.1.6.2 tls # 5 1.1.1.1.6.2 tls # Redistribution and use in source and binary forms, with or without 6 1.1.1.1.6.2 tls # modification, are permitted only as authorized by the OpenLDAP 7 1.1.1.1.6.2 tls # Public License. 8 1.1.1.1.6.2 tls # 9 1.1.1.1.6.2 tls # A copy of this license is available in the file LICENSE in the 10 1.1.1.1.6.2 tls # top-level directory of the distribution or, alternatively, at 11 1.1.1.1.6.2 tls # <http://www.OpenLDAP.org/license.html>. 12 1.1.1.1.6.2 tls 13 1.1.1.1.6.2 tls LDAP_SRC = ../../.. 14 1.1.1.1.6.2 tls LDAP_BUILD = ../../.. 15 1.1.1.1.6.2 tls LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd 16 1.1.1.1.6.2 tls LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \ 17 1.1.1.1.6.2 tls $(LDAP_BUILD)/libraries/liblber/liblber.la 18 1.1.1.1.6.2 tls 19 1.1.1.1.6.2 tls LIBTOOL = $(LDAP_BUILD)/libtool 20 1.1.1.1.6.2 tls CC = gcc 21 1.1.1.1.6.2 tls OPT = -g -O2 -Wall 22 1.1.1.1.6.2 tls DEFS = -DSLAPD_OVER_LASTBIND=SLAPD_MOD_DYNAMIC 23 1.1.1.1.6.2 tls INCS = $(LDAP_INC) 24 1.1.1.1.6.2 tls LIBS = $(LDAP_LIB) 25 1.1.1.1.6.2 tls 26 1.1.1.1.6.2 tls PROGRAMS = lastbind.la 27 1.1.1.1.6.2 tls LTVER = 0:0:0 28 1.1.1.1.6.2 tls 29 1.1.1.1.6.2 tls prefix=/usr/local 30 1.1.1.1.6.2 tls exec_prefix=$(prefix) 31 1.1.1.1.6.2 tls ldap_subdir=/openldap 32 1.1.1.1.6.2 tls 33 1.1.1.1.6.2 tls libdir=$(exec_prefix)/lib 34 1.1.1.1.6.2 tls libexecdir=$(exec_prefix)/libexec 35 1.1.1.1.6.2 tls moduledir = $(libexecdir)$(ldap_subdir) 36 1.1.1.1.6.2 tls 37 1.1.1.1.6.2 tls .SUFFIXES: .c .o .lo 38 1.1.1.1.6.2 tls 39 1.1.1.1.6.2 tls .c.lo: 40 1.1.1.1.6.2 tls $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< 41 1.1.1.1.6.2 tls 42 1.1.1.1.6.2 tls all: $(PROGRAMS) 43 1.1.1.1.6.2 tls 44 1.1.1.1.6.2 tls lastbind.la: lastbind.lo 45 1.1.1.1.6.2 tls $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ 46 1.1.1.1.6.2 tls -rpath $(moduledir) -module -o $@ $? $(LIBS) 47 1.1.1.1.6.2 tls 48 1.1.1.1.6.2 tls clean: 49 1.1.1.1.6.2 tls rm -rf *.o *.lo *.la .libs 50 1.1.1.1.6.2 tls 51 1.1.1.1.6.2 tls install: $(PROGRAMS) 52 1.1.1.1.6.2 tls mkdir -p $(DESTDIR)$(moduledir) 53 1.1.1.1.6.2 tls for p in $(PROGRAMS) ; do \ 54 1.1.1.1.6.2 tls $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \ 55 1.1.1.1.6.2 tls done 56 1.1.1.1.6.2 tls 57