Subject: and static libraries
To: None <tech-toolchain@NetBSD.ORG>
From: Todd Vierling <tv@NetBSD.ORG>
List: tech-toolchain
Date: 04/07/1998 10:30:51
Attached below is a diff that implements two more knobs in <>
similar to the existing ones NOPIC, NOPROFILE, and NOLINT:

- NOSTATICLIB: Prevents build and install of a static version of the given
  library (libNAME.a).  Intended for initial use with libamu and libcc1
  (part of egcs).  Not named NOSTATIC as this could be confused with
  "static program linkage."

- NOPICINSTALL: Prevents install of libNAME_pic.a even if there is a shared
  object ( library to be installed.  Also for the above two
  libraries, but could be used on a system-wide basis just like NOLINT and

I'll commit (with changes to libamu and egcs) on Friday if there are no

-- Todd Vierling (Personal; Bus.

RCS file: /cvsroot/src/share/mk/,v
retrieving revision 1.128
diff -u -r1.128
---	1998/04/01 16:58:33	1.128
+++	1998/04/07 14:23:02
@@ -177,10 +177,14 @@
 	@rm -f ${.TARGET}.o
-.if !defined(NOPROFILE)
-_LIBS=lib${LIB}.a lib${LIB}_p.a
+.if !defined(NOSTATICLIB)
+.if !defined(NOPROFILE)
 .if !defined(NOPIC)
@@ -254,6 +258,7 @@
 .if !target(libinstall)
+.if !defined(NOSTATICLIB)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
 .if !defined(UPDATE)
@@ -264,6 +269,7 @@
 ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
 .if !defined(NOPROFILE)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
@@ -278,7 +284,7 @@
 ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
-.if !defined(NOPIC)
+.if !defined(NOPIC) && !defined(NOPICINSTALL)
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
 .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a