-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (40 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# contrib/slapd-modules/explockout/Makefile
# Copyright 2018 David Coutadeur, Paris. All Rights Reserved.
#
CC=gcc
# Path of OpenLDAP sources
OLDAP_SOURCES=..
# Final path of explockout installed
LIBDIR=/usr/local/openldap/libexec/openldap
# Where to deploy explockout overlay for now
DSTDIR=/usr/local/openldap/libexec/openldap
LIBTOOL = $(OLDAP_SOURCES)/libtool
DEFS = -DSLAPD_OVER_EXPLOCKOUT=SLAPD_MOD_DYNAMIC
OPT=-g -O2 -Wall -fpic \
-DCONFIG_FILE="\"$(CONFIG)\"" \
-DDEBUG
# Where to find the OpenLDAP headers.
LDAP_INC=-I$(OLDAP_SOURCES)/include \
-I$(OLDAP_SOURCES)/servers/slapd
# Where to find the OpenLDAP libraries.
LDAP_LIBS_DIR=-L$(OLDAP_SOURCES)/libraries/liblber/.libs \
-L$(OLDAP_SOURCES)/libraries/libldap/.libs
LDAP_LIBS_NAME=-lldap -llber
PROGRAMS = explockout.la
LTVER = 0:0:0
.SUFFIXES: .c .o .lo
.c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(LDAP_INC) -c $<
all: $(PROGRAMS)
explockout.la: explockout.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
-rpath $(LIBDIR) -module -o $@ $? $(LDAP_LIBS_NAME) $(LDAP_LIBS_DIR)
install: $(PROGRAMS)
mkdir -p $(DSTDIR)
for p in $(PROGRAMS) ; do \
$(LIBTOOL) --mode=install cp $$p $(DSTDIR) ; \
done
.PHONY: clean
clean:
$(RM) -f *.o *.lo *.la *.so
$(RM) -rf .libs