Support static building against a non static PAM.

This commit is contained in:
Roy Marples 2008-01-04 14:01:24 +00:00
parent 3be23bc02d
commit 633297a6ca
3 changed files with 9 additions and 3 deletions

4
README
View File

@ -12,9 +12,13 @@ BIN_LDFLAGS=-static
LIB=lib64 LIB=lib64
DESTDIR=/tmp/openrc-image DESTDIR=/tmp/openrc-image
PAM=pam PAM=pam
PAM=pam-dynamic
TERMCAP=ncurses TERMCAP=ncurses
TERMCAP=termcap 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 You can also brand OpenRC if you so wish like so
BRANDING=\"Gentoo/$(uname -s)\" BRANDING=\"Gentoo/$(uname -s)\"

View File

@ -110,7 +110,7 @@ $(LIBEINFOSO): einfo.map $(LIBEINFOOBJS)
$(CC) $(LDFLAGS) -fPIC -shared \ $(CC) $(LDFLAGS) -fPIC -shared \
-Wl,-soname,$(LIBEINFOSO) \ -Wl,-soname,$(LIBEINFOSO) \
-Wl,-version-script einfo.map \ -Wl,-version-script einfo.map \
-o $(LIBEINFOSO) $(LIBEINFOOBJS) $(LDLIBS) $(LDLIBS_LIBEINFO) -o $(LIBEINFOSO) $(LIBEINFOOBJS) $(LDLIBS_LIBEINFO)
ln -sf $(LIBEINFOSO) libeinfo.so ln -sf $(LIBEINFOSO) libeinfo.so
ar rc libeinfo.a $(LIBEINFOOBJS) ar rc libeinfo.a $(LIBEINFOOBJS)
ranlib libeinfo.a ranlib libeinfo.a
@ -121,7 +121,7 @@ $(LIBRCSO): rc.map $(LIBRCOBJS)
$(CC) $(LDFLAGS) -fPIC -shared \ $(CC) $(LDFLAGS) -fPIC -shared \
-Wl,-soname,$(LIBRCSO) \ -Wl,-soname,$(LIBRCSO) \
-Wl,-version-script rc.map \ -Wl,-version-script rc.map \
-o $(LIBRCSO) $(LIBRCOBJS) $(LDLIBS) $(LDLIBS_LIBRC) -o $(LIBRCSO) $(LIBRCOBJS) $(LDLIBS_LIBRC)
ln -sf $(LIBRCSO) librc.so ln -sf $(LIBRCSO) librc.so
ar rc librc.a $(LIBRCOBJS) ar rc librc.a $(LIBRCOBJS)
ranlib librc.a ranlib librc.a
@ -130,7 +130,7 @@ $(RCOBJS):
$(CC) $(CPPFLAGS) $(CPPFLAGS_SSD) $(CFLAGS) -c $< $(CC) $(CPPFLAGS) $(CPPFLAGS_SSD) $(CFLAGS) -c $<
rc: version.h $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS) rc: version.h $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS)
$(CC) $(LDFLAGS) $(BIN_LDFLAGS) -o rc \ $(CC) $(LDFLAGS) $(BIN_LDFLAGS) -o rc \
$(RCOBJS) $(LDLIBS) $(LDLIBS_RC) $(LDLIBS_LIBEINFO) $(LDLIBS_LIBRC) $(RCOBJS) $(LDLIBS_LIBEINFO) $(LDLIBS_LIBRC) $(LDLIBS_RC)
$(ALL_LINKS): rc $(ALL_LINKS): rc
ln -sf rc $@ ln -sf rc $@

2
src/Makefile.pam-dynamic Normal file
View File

@ -0,0 +1,2 @@
CPPFLAGS_SSD = -DHAVE_PAM
LDLIBS_RC += -Wl,-Bdynamic -lpam