Makefile 2.12 KB
Newer Older
Sang Seok Lim's avatar
Sang Seok Lim committed
1
2
3
# $OpenLDAP$
# This work is part of OpenLDAP Software <http://www.openldap.org/>.
#
Kurt Zeilenga's avatar
Kurt Zeilenga committed
4
# Copyright 2003-2005 The OpenLDAP Foundation.
Sang Seok Lim's avatar
Sang Seok Lim committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Portions Copyright 2004 by IBM Corporation.
# All rights reserved.

# Copyright 2004 Sang Seok Lim, IBM Corp. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
# Public License.
#
# A copy of this license is available in the file LICENSE in the
# top-level directory of the distribution or, alternatively, at
# <http://www.OpenLDAP.org/license.html>.

topbuilddir = ../../../../build
topsrcdir = ../../..
Sang Seok Lim's avatar
Sang Seok Lim committed
20
snaccdir = /usr/local/snacc
21
openssldir = /usr/local/include/openssl
Sang Seok Lim's avatar
Sang Seok Lim committed
22

23
LIBTOOL=$(topbuilddir)/libtool
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
24
OPT=-g -O2 -DLDAP_COMPONENT
Sang Seok Lim's avatar
Sang Seok Lim committed
25
26
27
28
CC=gcc

SNACC_INC=-I$(snaccdir) -I$(snaccdir)/c-lib/inc
LDAP_INC=-I$(topsrcdir)/include -I$(topsrcdir)/servers/slapd -I$(topbuilddir)/include
29
30
OPENSSL_INC=-I$(openssldir)
INCS=$(LDAP_INC) $(SNACC_INC) $(OPENSSL_INC)
Sang Seok Lim's avatar
Sang Seok Lim committed
31
32

SNACC_LIB=$(snaccdir)/c-lib/libcasn1.a
33
SSL_LIB=/usr/local/lib/lcrypto
34

Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
35
LIBS=$(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB)
Sang Seok Lim's avatar
Sang Seok Lim committed
36
37
38
39
40
41
42
43
44
45

all:	compmatch.la


componentlib.lo:	componentlib.c
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?

certificate.lo:	certificate.c
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?

46
47
48
crl.lo:	crl.c
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?

49
50
51
authorityKeyIdentifier.lo:	authorityKeyIdentifier.c
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?

Sang Seok Lim's avatar
Sang Seok Lim committed
52
53
54
55
56
57
asn_to_syn_mr.lo:	asn_to_syn_mr.c
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?

init.lo:	init.c
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?

58
compmatch.la:	componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo
Sang Seok Lim's avatar
Sang Seok Lim committed
59
	$(LIBTOOL) --mode=link $(CC) $(OPT) $(LIBS) -version-info 0:0:0 \
Jong Hyuk Choi's avatar
Jong Hyuk Choi committed
60
	-rpath /usr/local/libexec/openldap -module -o $@ $? $(LIBS)
Sang Seok Lim's avatar
Sang Seok Lim committed
61
62

clean:
63
64
	\rm compmatch.la componentlib.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo\
		init.o init.lo componentlib.o certificate.o asn_to_syn_mr.o authorityKeyIdentifier.o crl.o
Sang Seok Lim's avatar
Sang Seok Lim committed
65
66
67
install:
	cp -r .libs $(topsrcdir)/tests/data/comp_libs
	cp compmatch.la  $(topsrcdir)/tests/data/comp_libs