summaryrefslogtreecommitdiff
blob: c8adeb89b4ab8a509302e4b72843defe77aeb3f0 (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
--- a/Makefile
+++ b/Makefile
@@ -20,10 +20,11 @@
 BINMODE = 755
 CONFDIR = /etc
 CONFMODE = 644
-SHARED_LIBDIR = /lib
+LIBDIR = lib
+SHARED_LIBDIR = /$(LIBDIR)
 SHARED_LIBDIR_SUN = /usr/lib
 SHARED_LIBDIR_REL = ../..$(SHARED_LIBDIR)
-DEVEL_LIBDIR = /usr/lib
+DEVEL_LIBDIR = /usr/$(LIBDIR)
-SECUREDIR = /lib/security
+SECUREDIR = /$(LIBDIR)/security
 SECUREDIR_SUN = /usr/lib/security
 SECUREDIR_DARWIN = /usr/lib/pam
@@ -48,7 +49,7 @@
 INSTALL_SUN = /usr/ucb/install -c
 CFLAGS = -Wall -W -O2
 CFLAGS_lib = $(CFLAGS) -fPIC
-CFLAGS_bin = $(CFLAGS) -fomit-frame-pointer
+CFLAGS_bin = $(CFLAGS)
 
 LDFLAGS =
 LDFLAGS_shared = --shared
@@ -93,7 +94,7 @@
 
 default: all
 
-all pam utils install install_lib install_pam install_utils uninstall remove remove_lib remove_pam remove_utils:
+all lib pam utils install install_lib install_pam install_utils uninstall remove remove_lib remove_pam remove_utils:
 	case "`uname -s`" in \
 	Linux)	$(MAKE) CFLAGS_lib="$(CFLAGS_lib) -DHAVE_SHADOW" \
 			LDFLAGS_lib="$(LDFLAGS_lib_LINUX)" \
@@ -126,18 +127,20 @@
 
 all_wrapped: pam_wrapped utils_wrapped
 
+lib_wrapped: $(SHARED_LIB) $(DEVEL_LIB)
+
 pam_wrapped: $(SHARED_PAM)
 
 utils_wrapped: $(BINS)
 
 $(SHARED_LIB): $(OBJS_LIB) $(MAP_LIB)
-	$(LD_lib) $(LDFLAGS_lib) $(OBJS_LIB) $(LDLIBS_lib) -o $(SHARED_LIB)
+	$(LD_lib) $(LDFLAGS) $(LDFLAGS_lib) $(OBJS_LIB) $(LDLIBS_lib) -o $(SHARED_LIB)
 
 $(DEVEL_LIB): $(SHARED_LIB)
 	$(LN_s) $(SHARED_LIB) $(DEVEL_LIB)
 
 $(SHARED_PAM): $(OBJS_PAM) $(MAP_PAM) $(DEVEL_LIB)
-	$(LD_lib) $(LDFLAGS_pam) $(OBJS_PAM) $(LDLIBS_pam) -L. -lpasswdqc -o $(SHARED_PAM)
+	$(LD_lib) $(LDFLAGS) $(LDFLAGS_pam) $(OBJS_PAM) $(LDLIBS_pam) -L. -lpasswdqc -o $(SHARED_PAM)
 
 pwqgen: $(OBJS_GEN) $(DEVEL_LIB)
 	$(LD) $(LDFLAGS) $(OBJS_GEN) -L. -lpasswdqc -o $@