-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (53 loc) · 1.89 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# contrib/slapd-modules/check_password/Makefile
# Copyright 2007 Michael Steinmann, Calivia. All Rights Reserved.
# Updated by Pierre-Yves Bonnetain, B&A Consultants, 2008
# Updated by Trevor Vaughan, Onyx Point Inc., 2011
#
CC=gcc
# Where to look for the CrackLib dictionaries
#
CRACKLIB=/usr/share/cracklib/pw_dict
# Path to the configuration file
#
# Make sure this is a writable location to use the cpass tests.
CONFIG=/etc/openldap/check_password.conf
#CONFIG=check_password.conf
# Turn on local debugging.
#OPT=-g -O2 -Wall -fpic \
# -DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \
# -DCONFIG_FILE="\"$(CONFIG)\"" \
# -DLDEBUG
OPT=-g -O2 -Wall -fpic \
-DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \
-DCONFIG_FILE="\"$(CONFIG)\""
LDAP_INC_PATH=.
# Where to find the OpenLDAP headers.
#
LDAP_INC=-I$(LDAP_INC_PATH)/include -I$(LDAP_INC_PATH)/servers/slapd -I$(LDAP_INC_PATH)/build-servers/include
# 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
LIBS=$(LDAP_LIB) $(CRACKLIB_LIB)
LIBDIR=/usr/lib/openldap/
all: check_password_test
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)
ln -sf check_password.so libcheck_password.so
check_password_test: check_password
$(CC) -g -O2 -DCONFIG_FILE="\"$(CONFIG)\"" -fpic $(INCS) -Wall check_password_test.c -o cpass -L. -llber -lcheck_password
install: check_password
cp -f check_password.so /usr/lib/openldap/modules/
clean:
$(RM) check_password.o check_password.so check_password.lo libcheck_password.so cpass check_password.conf
$(RM) -r .libs
distclean: clean
$(RM) -rf openldap-*