You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.5 KiB
58 lines
1.5 KiB
diff --git a/Makefile b/Makefile |
|
index 4457bad..91de40b 100644 |
|
--- a/Makefile |
|
+++ b/Makefile |
|
@@ -13,17 +13,10 @@ CRACKLIB=/usr/share/cracklib/pw_dict |
|
# |
|
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) |
|
+CFLAGS+=-fpic \ |
|
+ -DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \ |
|
+ -DCONFIG_FILE="\"$(CONFIG)\"" \ |
|
+ -DDEBUG |
|
|
|
LDAP_LIB=-lldap_r -llber |
|
|
|
@@ -33,27 +26,21 @@ LDAP_LIB=-lldap_r -llber |
|
# |
|
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 |
|
+ $(CC) $(CFLAGS) -c $(LDAP_INC) check_password.c |
|
|
|
check_password: clean check_password.o |
|
- $(CC) -shared -o check_password.so check_password.o $(CRACKLIB_LIB) |
|
+ $(CC) $(LDFLAGS) -shared -o check_password.so check_password.o $(CRACKLIB_LIB) |
|
|
|
install: check_password |
|
- cp -f check_password.so $(LIBDIR) |
|
+ cp -f check_password.so ../../../usr/lib/openldap/modules/ |
|
|
|
clean: |
|
$(RM) check_password.o check_password.so check_password.lo
|
|
|