1# $OpenLDAP$ 2# This work is part of OpenLDAP Software <http://www.openldap.org/>. 3# 4# Copyright 2003-2011 The OpenLDAP Foundation. 5# Portions Copyright 2004 by IBM Corporation. 6# All rights reserved. 7 8# Copyright 2004 Sang Seok Lim, IBM Corp. All Rights Reserved. 9# 10# Redistribution and use in source and binary forms, with or without 11# modification, are permitted only as authorized by the OpenLDAP 12# Public License. 13# 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>. 17 18topsrcdir = ../../.. 19snaccdir = ../$(topsrcdir)/snacc 20openssldir = /usr/local/include/openssl 21 22LIBTOOL=$(topsrcdir)/libtool 23OPT=-g -O2 -DLDAP_COMPONENT 24CC=gcc 25 26SNACC_INC=-I$(snaccdir) -I$(snaccdir)/c-lib/inc 27LDAP_INC=-I$(topsrcdir)/include -I$(topsrcdir)/servers/slapd -I$(topbuilddir)/include 28OPENSSL_INC=-I$(openssldir) 29INCS=$(LDAP_INC) $(SNACC_INC) $(OPENSSL_INC) 30 31SNACC_LIB=$(snaccdir)/c-lib/libcasn1.a 32SSL_LIB=/usr/local/lib/lcrypto 33 34LIBS=$(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB) 35 36all: compmatch.la 37 38 39componentlib.lo: componentlib.c 40 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $? 41 42certificate.lo: certificate.c 43 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $? 44 45crl.lo: crl.c 46 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $? 47 48authorityKeyIdentifier.lo: authorityKeyIdentifier.c 49 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $? 50 51asn_to_syn_mr.lo: asn_to_syn_mr.c 52 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $? 53 54init.lo: init.c 55 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $? 56 57compmatch.la: componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo 58 $(LIBTOOL) --mode=link $(CC) $(OPT) $(LIBS) -version-info 0:0:0 \ 59 -rpath /usr/local/libexec/openldap -module -o $@ $? $(LIBS) 60 61clean: 62 \rm compmatch.la componentlib.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo\ 63 init.o init.lo componentlib.o certificate.o asn_to_syn_mr.o authorityKeyIdentifier.o crl.o 64install: 65 cp -r .libs $(topsrcdir)/tests/data/comp_libs 66 cp compmatch.la $(topsrcdir)/tests/data/comp_libs 67