1 1.1.1.4 tron # $OpenLDAP$ 2 1.1 lukem # This work is part of OpenLDAP Software <http://www.openldap.org/>. 3 1.1 lukem # 4 1.1.1.10 christos # Copyright 2003-2024 The OpenLDAP Foundation. 5 1.1 lukem # Portions Copyright 2004 by IBM Corporation. 6 1.1 lukem # All rights reserved. 7 1.1 lukem 8 1.1 lukem # Copyright 2004 Sang Seok Lim, IBM Corp. All Rights Reserved. 9 1.1 lukem # 10 1.1 lukem # Redistribution and use in source and binary forms, with or without 11 1.1 lukem # modification, are permitted only as authorized by the OpenLDAP 12 1.1 lukem # Public License. 13 1.1 lukem # 14 1.1 lukem # A copy of this license is available in the file LICENSE in the 15 1.1 lukem # top-level directory of the distribution or, alternatively, at 16 1.1 lukem # <http://www.OpenLDAP.org/license.html>. 17 1.1 lukem 18 1.1.1.4 tron LDAP_SRC = ../../.. 19 1.1.1.5 christos LDAP_BUILD = $(LDAP_SRC) 20 1.1.1.4 tron LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd 21 1.1.1.9 christos LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ 22 1.1.1.4 tron $(LDAP_BUILD)/libraries/liblber/liblber.la 23 1.1.1.4 tron 24 1.1.1.4 tron SNACC_DIR = ../$(LDAP_SRC)/snacc 25 1.1.1.4 tron SNACC_INC = -I$(SNACC_DIR) -I$(SNACC_DIR)/c-lib/inc 26 1.1.1.4 tron SNACC_LIB = $(SNACC_DIR)/c-lib/libcasn1.a 27 1.1.1.4 tron 28 1.1.1.4 tron SSL_DIR = /usr/local 29 1.1.1.4 tron SSL_INC = -I$(SSL_DIR)/include/openssl 30 1.1.1.4 tron SSL_LIB = -lcrypto -L$(SSL_DIR)/lib 31 1.1.1.4 tron 32 1.1.1.10 christos PLAT = UNIX 33 1.1.1.10 christos NT_LIB = -L$(LDAP_BUILD)/servers/slapd -lslapd 34 1.1.1.10 christos NT_LDFLAGS = -no-undefined -avoid-version 35 1.1.1.10 christos UNIX_LDFLAGS = -version-info $(LTVER) 36 1.1.1.10 christos 37 1.1.1.4 tron LIBTOOL = $(LDAP_BUILD)/libtool 38 1.1.1.4 tron CC = gcc 39 1.1.1.9 christos OPT = -g -O2 40 1.1.1.4 tron DEFS = -DLDAP_COMPONENT 41 1.1.1.4 tron INCS = $(LDAP_INC) $(SNACC_INC) $(SSL_INC) 42 1.1.1.10 christos LIBS = $($(PLAT)_LIB) $(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB) 43 1.1.1.10 christos LD_FLAGS = $(LDFLAGS) $($(PLAT)_LDFLAGS) -rpath $(moduledir) -module 44 1.1.1.4 tron 45 1.1.1.4 tron PROGRAMS = compmatch.la 46 1.1.1.4 tron LTVER = 0:0:0 47 1.1.1.4 tron 48 1.1.1.4 tron prefix=/usr/local 49 1.1.1.4 tron exec_prefix=$(prefix) 50 1.1.1.4 tron ldap_subdir=/openldap 51 1.1.1.4 tron 52 1.1.1.4 tron libdir=$(exec_prefix)/lib 53 1.1.1.4 tron libexecdir=$(exec_prefix)/libexec 54 1.1.1.4 tron moduledir = $(libexecdir)$(ldap_subdir) 55 1.1.1.4 tron 56 1.1.1.4 tron .SUFFIXES: .c .o .lo 57 1.1.1.4 tron 58 1.1.1.4 tron .c.lo: 59 1.1.1.9 christos $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $< 60 1.1.1.4 tron 61 1.1.1.4 tron all: $(PROGRAMS) 62 1.1.1.4 tron 63 1.1.1.4 tron compmatch.la: componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo 64 1.1.1.10 christos $(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS) 65 1.1 lukem 66 1.1.1.4 tron clean: 67 1.1.1.4 tron rm -rf *.o *.lo *.la .libs 68 1.1 lukem 69 1.1.1.4 tron install: $(PROGRAMS) 70 1.1.1.4 tron mkdir -p $(DESTDIR)$(moduledir) 71 1.1.1.4 tron for p in $(PROGRAMS) ; do \ 72 1.1.1.4 tron $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \ 73 1.1.1.4 tron done 74 1.1 lukem 75