|
|
976c7e |
diff --git a/Makefile b/Makefile
|
|
|
976c7e |
index 4457bad..91de40b 100644
|
|
|
976c7e |
--- a/Makefile
|
|
|
976c7e |
+++ b/Makefile
|
|
|
976c7e |
@@ -13,17 +13,10 @@ CRACKLIB=/usr/share/cracklib/pw_dict
|
|
|
e4ff3b |
#
|
|
|
e4ff3b |
CONFIG=/etc/openldap/check_password.conf
|
|
|
e4ff3b |
|
|
|
976c7e |
-
|
|
|
e4ff3b |
-# Where to find the OpenLDAP headers.
|
|
|
e4ff3b |
-#
|
|
|
976c7e |
-LDAP_INC=-I/usr/include/openldap/include \
|
|
|
976c7e |
- -I/usr/include/openldap/servers/slapd
|
|
|
e4ff3b |
-
|
|
|
e4ff3b |
-# Where to find the CrackLib headers.
|
|
|
e4ff3b |
-#
|
|
|
e4ff3b |
-CRACK_INC=
|
|
|
e4ff3b |
-
|
|
|
e4ff3b |
-INCS=$(LDAP_INC) $(CRACK_INC)
|
|
|
976c7e |
+CFLAGS+=-fpic \
|
|
|
976c7e |
+ -DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \
|
|
|
976c7e |
+ -DCONFIG_FILE="\"$(CONFIG)\"" \
|
|
|
976c7e |
+ -DDEBUG
|
|
|
976c7e |
|
|
|
e4ff3b |
LDAP_LIB=-lldap_r -llber
|
|
|
e4ff3b |
|
|
|
976c7e |
@@ -33,27 +26,21 @@ LDAP_LIB=-lldap_r -llber
|
|
|
976c7e |
#
|
|
|
976c7e |
CRACKLIB_LIB=-lcrack
|
|
|
976c7e |
|
|
|
976c7e |
-CC_FLAGS=-g -O2 -Wall -fpic
|
|
|
976c7e |
-CRACKLIB_OPT=-DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\""
|
|
|
976c7e |
-DEBUG_OPT=-DDEBUG
|
|
|
976c7e |
-CONFIG_OPT=-DCONFIG_FILE="\"$(CONFIG)\""
|
|
|
976c7e |
-
|
|
|
976c7e |
-OPT=$(CC_FLAGS) $(CRACKLIB_OPT) $(CONFIG_OPT) $(DEBUG_OPT)
|
|
|
976c7e |
-
|
|
|
976c7e |
LIBS=$(LDAP_LIB) $(CRACKLIB_LIB)
|
|
|
976c7e |
|
|
|
976c7e |
LIBDIR=/usr/lib/openldap/
|
|
|
976c7e |
|
|
|
976c7e |
+
|
|
|
e4ff3b |
all: check_password
|
|
|
e4ff3b |
|
|
|
e4ff3b |
check_password.o:
|
|
|
e4ff3b |
- $(CC) $(OPT) -c $(INCS) check_password.c
|
|
|
e4ff3b |
+ $(CC) $(CFLAGS) -c $(LDAP_INC) check_password.c
|
|
|
e4ff3b |
|
|
|
e4ff3b |
check_password: clean check_password.o
|
|
|
e4ff3b |
- $(CC) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
|
|
|
e4ff3b |
+ $(CC) $(LDFLAGS) -shared -o check_password.so check_password.o $(CRACKLIB_LIB)
|
|
|
e4ff3b |
|
|
|
e4ff3b |
install: check_password
|
|
|
976c7e |
- cp -f check_password.so $(LIBDIR)
|
|
|
976c7e |
+ cp -f check_password.so ../../../usr/lib/openldap/modules/
|
|
|
976c7e |
|
|
|
976c7e |
clean:
|
|
|
976c7e |
$(RM) check_password.o check_password.so check_password.lo
|