Skip to content

Commit

Permalink
Optimize Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Nov 26, 2009
1 parent b281b69 commit 33d48b7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ CRACKLIB=/usr/share/cracklib/pw_dict
#
CONFIG=/etc/openldap/check_password.conf

OPT=-g -O2 -Wall -fpic \
-DHAVE_CRACKLIB -DCRACKLIB_DICTPATH="\"$(CRACKLIB)\"" \
-DCONFIG_FILE="\"$(CONFIG)\"" \
-DDEBUG

# Where to find the OpenLDAP headers.
#
LDAP_INC=-I/home/pyb/tmp/openldap-2.3.39/include \
-I/home/pyb/tmp/openldap-2.3.39/servers/slapd
LDAP_INC=-I/usr/include/openldap/include \
-I/usr/include/openldap/servers/slapd

# Where to find the CrackLib headers.
#
Expand All @@ -37,11 +33,17 @@ 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:
Expand All @@ -51,7 +53,7 @@ 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 ../../../usr/lib/openldap/modules/
cp -f check_password.so $(LIBDIR)

clean:
$(RM) check_password.o check_password.so check_password.lo
Expand Down

0 comments on commit 33d48b7

Please sign in to comment.