-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
61 lines (42 loc) · 1.33 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
58
59
60
# contrib/slapd-modules/check_password/Makefile
# Copyright 2007 Michael Steinmann, Calivia. All Rights Reserved.
# Updated by Pierre-Yves Bonnetain, B&A Consultants, 2008
#
CC=gcc
# Where to look for the CrackLib dictionaries
#
CRACKLIB=/usr/share/cracklib/pw_dict
# Path to the configuration file
#
CONFIG=/etc/openldap/check_password.conf
# Where to find the OpenLDAP headers.
#
LDAP_INC=-I/usr/include/openldap/include \
-I/usr/include/openldap/servers/slapd
# Where to find the CrackLib headers.
#
CRACK_INC=
INCS=$(LDAP_INC) $(CRACK_INC)
LDAP_LIB=-lldap_r -llber
# Comment out this line if you do NOT want to use the cracklib.
# You may have to add an -Ldirectory if the libcrak is not in a standard
# location
#
CRACKLIB_LIB=-lcrack
CC_FLAGS=-g -O2 -Wall -fpic
CRACKLIB_OPT=-DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\""
DEBUG_OPT=-DDEBUG
CONFIG_OPT=-DCONFIG_FILE="\"$(CONFIG)\""
OPT=$(CC_FLAGS) $(CRACKLIB_OPT) $(CONFIG_OPT) $(DEBUG_OPT)
LIBS=$(LDAP_LIB) $(CRACKLIB_LIB)
LIBDIR=/usr/lib/openldap/
all: check_password
check_password.o:
$(CC) $(OPT) -c $(INCS) check_password.c
check_password: clean check_password.o
$(CC) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
install: check_password
cp -f check_password.so $(LIBDIR)
clean:
$(RM) check_password.o check_password.so check_password.lo
$(RM) -r .libs