From 633297a6ca01df281c293cb484d3f377d90af1b3 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 4 Jan 2008 14:01:24 +0000 Subject: Support static building against a non static PAM. --- README | 4 ++++ src/Makefile | 6 +++--- src/Makefile.pam-dynamic | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 src/Makefile.pam-dynamic diff --git a/README b/README index 2f4709d1..18ca3af7 100644 --- a/README +++ b/README @@ -12,9 +12,13 @@ BIN_LDFLAGS=-static LIB=lib64 DESTDIR=/tmp/openrc-image PAM=pam +PAM=pam-dynamic TERMCAP=ncurses TERMCAP=termcap +If you want to build static binaries and use PAM and your PAM implementation +does not have a static pam library and you should use PAM=pam-dynamic. + You can also brand OpenRC if you so wish like so BRANDING=\"Gentoo/$(uname -s)\" diff --git a/src/Makefile b/src/Makefile index c24e75ee..a0d3d67c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -110,7 +110,7 @@ $(LIBEINFOSO): einfo.map $(LIBEINFOOBJS) $(CC) $(LDFLAGS) -fPIC -shared \ -Wl,-soname,$(LIBEINFOSO) \ -Wl,-version-script einfo.map \ - -o $(LIBEINFOSO) $(LIBEINFOOBJS) $(LDLIBS) $(LDLIBS_LIBEINFO) + -o $(LIBEINFOSO) $(LIBEINFOOBJS) $(LDLIBS_LIBEINFO) ln -sf $(LIBEINFOSO) libeinfo.so ar rc libeinfo.a $(LIBEINFOOBJS) ranlib libeinfo.a @@ -121,7 +121,7 @@ $(LIBRCSO): rc.map $(LIBRCOBJS) $(CC) $(LDFLAGS) -fPIC -shared \ -Wl,-soname,$(LIBRCSO) \ -Wl,-version-script rc.map \ - -o $(LIBRCSO) $(LIBRCOBJS) $(LDLIBS) $(LDLIBS_LIBRC) + -o $(LIBRCSO) $(LIBRCOBJS) $(LDLIBS_LIBRC) ln -sf $(LIBRCSO) librc.so ar rc librc.a $(LIBRCOBJS) ranlib librc.a @@ -130,7 +130,7 @@ $(RCOBJS): $(CC) $(CPPFLAGS) $(CPPFLAGS_SSD) $(CFLAGS) -c $< rc: version.h $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS) $(CC) $(LDFLAGS) $(BIN_LDFLAGS) -o rc \ - $(RCOBJS) $(LDLIBS) $(LDLIBS_RC) $(LDLIBS_LIBEINFO) $(LDLIBS_LIBRC) + $(RCOBJS) $(LDLIBS_LIBEINFO) $(LDLIBS_LIBRC) $(LDLIBS_RC) $(ALL_LINKS): rc ln -sf rc $@ diff --git a/src/Makefile.pam-dynamic b/src/Makefile.pam-dynamic new file mode 100644 index 00000000..7393939a --- /dev/null +++ b/src/Makefile.pam-dynamic @@ -0,0 +1,2 @@ +CPPFLAGS_SSD = -DHAVE_PAM +LDLIBS_RC += -Wl,-Bdynamic -lpam -- cgit v1.2.3