2011-01-04 18:57:35 +08:00
|
|
|
# $OpenLDAP$
|
|
|
|
# This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
#
|
2015-02-12 05:36:57 +08:00
|
|
|
# Copyright 1998-2015 The OpenLDAP Foundation.
|
2011-01-04 18:57:35 +08:00
|
|
|
# Copyright 2004 Howard Chu, Symas 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>.
|
|
|
|
|
2012-06-15 01:15:48 +08:00
|
|
|
LDAP_SRC = ../../..
|
2014-01-10 15:49:49 +08:00
|
|
|
LDAP_BUILD = $(LDAP_SRC)
|
2012-06-15 01:15:48 +08:00
|
|
|
LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
|
|
|
|
LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
|
|
|
|
$(LDAP_BUILD)/libraries/liblber/liblber.la
|
|
|
|
|
|
|
|
LIBTOOL = $(LDAP_BUILD)/libtool
|
|
|
|
CC = gcc
|
|
|
|
OPT = -g -O2 -Wall
|
|
|
|
DEFS =
|
|
|
|
INCS = $(LDAP_INC)
|
|
|
|
LIBS = $(LDAP_LIB)
|
|
|
|
|
|
|
|
PROGRAMS = authzid.la
|
|
|
|
LTVER = 0:0:0
|
2011-01-04 18:57:35 +08:00
|
|
|
|
|
|
|
prefix=/usr/local
|
|
|
|
exec_prefix=$(prefix)
|
|
|
|
ldap_subdir=/openldap
|
|
|
|
|
|
|
|
libdir=$(exec_prefix)/lib
|
|
|
|
libexecdir=$(exec_prefix)/libexec
|
|
|
|
moduledir = $(libexecdir)$(ldap_subdir)
|
|
|
|
|
2012-06-15 01:15:48 +08:00
|
|
|
.SUFFIXES: .c .o .lo
|
2011-01-04 18:57:35 +08:00
|
|
|
|
2012-06-15 01:15:48 +08:00
|
|
|
.c.lo:
|
|
|
|
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
|
2011-01-04 18:57:35 +08:00
|
|
|
|
2012-06-15 01:15:48 +08:00
|
|
|
all: $(PROGRAMS)
|
2011-01-04 18:57:35 +08:00
|
|
|
|
2012-06-15 01:15:48 +08:00
|
|
|
authzid.la: authzid.lo
|
|
|
|
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
|
2011-01-04 18:57:35 +08:00
|
|
|
-rpath $(moduledir) -module -o $@ $? $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
2012-06-15 01:15:48 +08:00
|
|
|
rm -rf *.o *.lo *.la .libs
|
2011-01-04 18:57:35 +08:00
|
|
|
|
2012-06-15 01:15:48 +08:00
|
|
|
install: $(PROGRAMS)
|
2011-01-04 18:57:35 +08:00
|
|
|
mkdir -p $(DESTDIR)$(moduledir)
|
2012-06-15 01:15:48 +08:00
|
|
|
for p in $(PROGRAMS) ; do \
|
|
|
|
$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
|
|
|
|
done
|
2011-01-04 18:57:35 +08:00
|
|
|
|