Blame SOURCES/check-password-makefile.patch

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