summaryrefslogtreecommitdiff
blob: bf59170adef4d7022d3b052a17d4e5aa0555c202 (plain)
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
diff -Nuar --exclude 'openldap-2.4*' --exclude p -I '$OpenLDAP' openldap-2.4.17.orig/contrib/slapd-modules/smbk5pwd/Makefile openldap-2.4.17/contrib/slapd-modules/smbk5pwd/Makefile
--- openldap-2.4.17.orig/contrib/slapd-modules/smbk5pwd/Makefile	2009-04-27 16:36:57.000000000 -0700
+++ openldap-2.4.17/contrib/slapd-modules/smbk5pwd/Makefile	2009-07-27 15:00:37.097428029 -0700
@@ -9,37 +9,43 @@
 # top-level directory of the distribution or, alternatively, at
 # <http://www.OpenLDAP.org/license.html>.
 
+#libexecdir=/usr/lib/openldap
+moduledir=$(libexecdir)
 LIBTOOL=../../../libtool
-OPT=-g -O2
+#OPT=
 CC=gcc
 
 # Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
-DEFS=-DDO_KRB5 -DDO_SAMBA
+#DEFS=
 
-HEIMDAL_INC=-I/usr/heimdal/include
+#KRB5_INC=
 SSL_INC=
 LDAP_INC=-I../../../include -I../../../servers/slapd
-INCS=$(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)
+INCS=$(LDAP_INC) $(SSL_INC) $(KRB5_INC)
 
-HEIMDAL_LIB=-L/usr/heimdal/lib -lkrb5 -lkadm5srv
+KRB5_LIB=-lkrb5 -lkadm5srv
 SSL_LIB=-lcrypto
-LDAP_LIB=-lldap_r -llber
-LIBS=$(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB)
-
+LDAP_LIB=-L../../../libraries/libldap_r -lldap_r -llber
+ifneq (DDO_KRB5,$(findstring DDO_KRB5,$(DEFS)))
+	LIBS=$(LDAP_LIB) $(SSL_LIB)
+else
+	LIBS=$(LDAP_LIB) $(KRB5_LIB) $(SSL_LIB)
+endif
+	
 all:	smbk5pwd.la
 
 
 smbk5pwd.lo:	smbk5pwd.c
-	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
+	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(DEFS) $(INCS) -c $?
 
 smbk5pwd.la:	smbk5pwd.lo
-	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
-	-rpath $(PREFIX)/lib -module -o $@ $? $(LIBS)
+	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) -version-info 0:0:0 \
+	-rpath $(moduledir) -module -o $@ $? $(LIBS)
 
 clean:
 	rm -f smbk5pwd.lo smbk5pwd.la
 
 install: smbk5pwd.la
-	mkdir -p $(PREFIX)/lib/openldap
-	$(LIBTOOL) --mode=install cp smbk5pwd.la $(PREFIX)/lib/openldap
-	$(LIBTOOL) --finish $(PREFIX)/lib
+	mkdir -p $(DESTDIR)$(moduledir)
+	$(LIBTOOL) --mode=install cp smbk5pwd.la $(DESTDIR)$(moduledir)
+	$(LIBTOOL) --finish $(DESTDIR)$(libexecdir)