Home | History | Annotate | Line # | Download | only in comp_match
Makefile revision 1.1.1.4
      1 # $OpenLDAP$
      2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
      3 #
      4 # Copyright 2003-2014 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 
     18 LDAP_SRC = ../../..
     19 LDAP_BUILD = ../../..
     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
     23 
     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
     27 
     28 SSL_DIR = /usr/local
     29 SSL_INC = -I$(SSL_DIR)/include/openssl
     30 SSL_LIB = -lcrypto -L$(SSL_DIR)/lib
     31 
     32 LIBTOOL = $(LDAP_BUILD)/libtool
     33 CC = gcc
     34 OPT = -g -O2 -Wall
     35 DEFS = -DLDAP_COMPONENT
     36 INCS = $(LDAP_INC) $(SNACC_INC) $(SSL_INC)
     37 LIBS = $(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB)
     38 
     39 PROGRAMS = compmatch.la
     40 LTVER = 0:0:0
     41 
     42 prefix=/usr/local
     43 exec_prefix=$(prefix)
     44 ldap_subdir=/openldap
     45 
     46 libdir=$(exec_prefix)/lib
     47 libexecdir=$(exec_prefix)/libexec
     48 moduledir = $(libexecdir)$(ldap_subdir)
     49 
     50 .SUFFIXES: .c .o .lo
     51 
     52 .c.lo:
     53 	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
     54 
     55 all: $(PROGRAMS)
     56 
     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)
     60 
     61 clean:
     62 	rm -rf *.o *.lo *.la .libs
     63 
     64 install: $(PROGRAMS)
     65 	mkdir -p $(DESTDIR)$(moduledir)
     66 	for p in $(PROGRAMS) ; do \
     67 		$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
     68 	done
     69 
     70