We now build and optionally work with static libraries.

This commit is contained in:
Roy Marples 2007-10-16 13:49:00 +00:00
parent 068b4798c2
commit a28dd2d4ef
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,10 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts # ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
16 Oct 2007; Roy Marples <uberlord@gentoo.org>:
We now build and optionally work with static libraries.
15 Oct 2007; Roy Marples <uberlord@gentoo.org>: 15 Oct 2007; Roy Marples <uberlord@gentoo.org>:
rc-status now orders services in start order, #195630 rc-status now orders services in start order, #195630

View File

@ -62,6 +62,7 @@ RCOBJS = checkown.o env-update.o fstabinfo.o mountinfo.o \
LDLIBS_RC = -leinfo -lrc -lutil LDLIBS_RC = -leinfo -lrc -lutil
LIB_TARGETS = $(LIBEINFOSO) $(LIBRCSO) LIB_TARGETS = $(LIBEINFOSO) $(LIBRCSO)
ULIB_TARGETS = libeinfo.a librc.a
SBIN_TARGETS = rc SBIN_TARGETS = rc
SYS_WHITELIST = env_whitelist SYS_WHITELIST = env_whitelist
@ -114,6 +115,8 @@ $(LIBEINFOSO): einfo.map $(LIBEINFOOBJS)
-Wl,-version-script einfo.map \ -Wl,-version-script einfo.map \
-o $(LIBEINFOSO) $(LIBEINFOOBJS) $(LDLIBS) $(LDLIBS_LIBEINFO) -o $(LIBEINFOSO) $(LIBEINFOOBJS) $(LDLIBS) $(LDLIBS_LIBEINFO)
ln -sf $(LIBEINFOSO) libeinfo.so ln -sf $(LIBEINFOSO) libeinfo.so
ar rc libeinfo.a $(LIBEINFOOBJS)
ranlib libeinfo.a
$(LIBRCOBJS): $(LIBRCOBJS):
$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c $< $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c $<
@ -123,11 +126,13 @@ $(LIBRCSO): rc.map $(LIBRCOBJS)
-Wl,-version-script rc.map \ -Wl,-version-script rc.map \
-o $(LIBRCSO) $(LIBRCOBJS) $(LDLIBS) $(LDLIBS_LIBRC) -o $(LIBRCSO) $(LIBRCOBJS) $(LDLIBS) $(LDLIBS_LIBRC)
ln -sf $(LIBRCSO) librc.so ln -sf $(LIBRCSO) librc.so
ar rc librc.a $(LIBRCOBJS)
ranlib librc.a
$(RCOBJS): $(RCOBJS):
$(CC) $(CPPFLAGS) $(CPPFLAGS_SSD) $(CFLAGS) -c $< $(CC) $(CPPFLAGS) $(CPPFLAGS_SSD) $(CFLAGS) -c $<
rc: $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS) rc: $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS)
$(CC) $(LDFLAGS) -o rc $(RCOBJS) $(LDLIBS) $(LDLIBS_RC) $(CC) $(LDFLAGS) -o rc $(RCOBJS) $(LDLIBS) $(LDLIBS_RC) $(LDLIBS_LIBEINFO) $(LDLIBS_LIBRC)
$(ALL_LINKS): rc $(ALL_LINKS): rc
ln -sf rc $@ ln -sf rc $@
@ -138,6 +143,8 @@ install: $(TARGET)
install -m 0755 $(LIB_TARGETS) $(DESTDIR)/$(LIB) install -m 0755 $(LIB_TARGETS) $(DESTDIR)/$(LIB)
ln -sf $(LIBEINFOSO) $(DESTDIR)/$(LIB)/libeinfo.so ln -sf $(LIBEINFOSO) $(DESTDIR)/$(LIB)/libeinfo.so
ln -sf $(LIBRCSO) $(DESTDIR)/$(LIB)/librc.so ln -sf $(LIBRCSO) $(DESTDIR)/$(LIB)/librc.so
install -m 0755 -d $(DESTDIR)/usr/$(LIB)
install -m 0644 $(ULIB_TARGETS) $(DESTDIR)/usr/$(LIB)
install -m 0755 -d $(DESTDIR)/usr/include install -m 0755 -d $(DESTDIR)/usr/include
install -m 0644 einfo.h rc.h $(DESTDIR)/usr/include install -m 0644 einfo.h rc.h $(DESTDIR)/usr/include
install -m 0755 -d $(DESTDIR)/bin install -m 0755 -d $(DESTDIR)/bin
@ -161,7 +168,7 @@ clean-links:
rm -f $(ALL_LINKS) rm -f $(ALL_LINKS)
clean: clean-links clean: clean-links
rm -f $(TARGET) rm -f $(TARGET)
rm -f *.o *~ *.core *.so .depend rm -f *.o *~ *.core *.so *.a .depend
check: check:
$(MAKE) -C test $@ $(MAKE) -C test $@