2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 # Copyright 2003-2013 The OpenLDAP Foundation.
5 # Portions Copyright 2004 by IBM Corporation.
8 # Copyright 2004 Sang Seok Lim, IBM Corp. All Rights Reserved.
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
20 LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
21 LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
22 $(LDAP_BUILD)/libraries/liblber/liblber.la
24 SNACC_DIR = ../$(LDAP_SRC)/snacc
25 SNACC_INC = -I$(SNACC_DIR) -I$(SNACC_DIR)/c-lib/inc
26 SNACC_LIB = $(SNACC_DIR)/c-lib/libcasn1.a
29 SSL_INC = -I$(SSL_DIR)/include/openssl
30 SSL_LIB = -lcrypto -L$(SSL_DIR)/lib
32 LIBTOOL = $(LDAP_BUILD)/libtool
35 DEFS = -DLDAP_COMPONENT
36 INCS = $(LDAP_INC) $(SNACC_INC) $(SSL_INC)
37 LIBS = $(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB)
39 PROGRAMS = compmatch.la
46 libdir=$(exec_prefix)/lib
47 libexecdir=$(exec_prefix)/libexec
48 moduledir = $(libexecdir)$(ldap_subdir)
53 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
57 compmatch.la: componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo
58 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
59 -rpath $(moduledir) -module -o $@ $? $(LIBS)
62 rm -rf *.o *.lo *.la .libs
65 mkdir -p $(DESTDIR)$(moduledir)
66 for p in $(PROGRAMS) ; do \
67 $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \