add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>.
This commit is contained in:
parent
aadd7d4847
commit
1ed40e7c8b
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.README,v 1.176 2006/04/09 01:52:06 christos Exp $
|
||||
# $NetBSD: bsd.README,v 1.177 2006/05/11 23:47:34 mrg Exp $
|
||||
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
|
||||
|
||||
This is the README file for the new make "include" files for the BSD
|
||||
@ -310,10 +310,12 @@ USE_YP If "no", disables building YP (NIS) support into
|
||||
If ${MKYP} is "no", USE_YP will also be forced to "no".
|
||||
|
||||
COPTS.lib<lib>
|
||||
OBJCOPTS.lib<lib>
|
||||
LDADD.lib<lib>
|
||||
CPPFLAGS.lib<lib>
|
||||
CXXFLAGS.lib<lib>
|
||||
COPTS.<prog>
|
||||
OBJCCOPTS.<prog>
|
||||
LDADD.<prog>
|
||||
CPPFLAGS.<prog>
|
||||
CXXFLAGS.<prog> These provide a way to specify additions to the associated
|
||||
@ -956,6 +958,12 @@ LDFLAGS Additional loader flags.
|
||||
|
||||
LINKS See <bsd.links.mk>
|
||||
|
||||
OBJCOPTS Additional flags to the compiler when creating ObjC objects.
|
||||
|
||||
OBJCOPTS.<fn> Additional flags to the compiler when creating the
|
||||
ObjC objects for <fn>.
|
||||
For <fn>.[ly], "<fn>.c" must be used.
|
||||
|
||||
SYMLINKS See <bsd.links.mk>
|
||||
|
||||
MAN Manual pages (should end in .1 - .9). If no MAN variable is
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.lib.mk,v 1.266 2006/04/09 01:52:06 christos Exp $
|
||||
# $NetBSD: bsd.lib.mk,v 1.267 2006/05/11 23:47:34 mrg Exp $
|
||||
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
|
||||
|
||||
.include <bsd.init.mk>
|
||||
@ -13,9 +13,10 @@ realinstall: checkver libinstall
|
||||
clean: cleanlib
|
||||
|
||||
##### LIB specific flags.
|
||||
COPTS+= ${COPTS.lib${LIB}}
|
||||
COPTS+= ${COPTS.lib${LIB}}
|
||||
CPPFLAGS+= ${CPPFLAGS.lib${LIB}}
|
||||
CXXFLAGS+= ${CXXFLAGS.lib${LIB}}
|
||||
OBJCOPTS+= ${OBJCOPTS.lib${LIB}}
|
||||
LDADD+= ${LDADD.lib${LIB}}
|
||||
LDFLAGS+= ${LDFLAGS.lib${LIB}}
|
||||
LDSTATIC+= ${LDSTATIC.lib${LIB}}
|
||||
@ -179,6 +180,7 @@ SHLIB_LDENDFILE?= ${_GCC_CRTENDS} ${DESTDIR}/usr/lib/crtn.o
|
||||
.endif
|
||||
|
||||
CFLAGS+= ${COPTS}
|
||||
OBJCFLAGS+= ${OBJCOPTS}
|
||||
AFLAGS+= ${COPTS}
|
||||
FFLAGS+= ${FOPTS}
|
||||
|
||||
@ -263,28 +265,28 @@ FFLAGS+= ${FOPTS}
|
||||
|
||||
.m.o:
|
||||
${_MKTARGET_COMPILE}
|
||||
${COMPILE.m} ${.IMPSRC} -o ${.TARGET}
|
||||
${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
|
||||
.if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
|
||||
${OBJCOPY} -x ${.TARGET}
|
||||
.endif
|
||||
|
||||
.m.po:
|
||||
${_MKTARGET_COMPILE}
|
||||
${COMPILE.m} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
|
||||
${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
|
||||
.if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
|
||||
${OBJCOPY} -X ${.TARGET}
|
||||
.endif
|
||||
|
||||
.m.go:
|
||||
${_MKTARGET_COMPILE}
|
||||
${COMPILE.m} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
|
||||
${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
|
||||
.if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
|
||||
${OBJCOPY} -X ${.TARGET}
|
||||
.endif
|
||||
|
||||
.m.so:
|
||||
${_MKTARGET_COMPILE}
|
||||
${COMPILE.m} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
|
||||
${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
|
||||
.if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
|
||||
${OBJCOPY} -x ${.TARGET}
|
||||
.endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.prog.mk,v 1.211 2006/03/20 21:48:43 christos Exp $
|
||||
# $NetBSD: bsd.prog.mk,v 1.212 2006/05/11 23:47:34 mrg Exp $
|
||||
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
|
||||
|
||||
.ifndef HOSTPROG
|
||||
@ -19,6 +19,7 @@ clean: cleanprog
|
||||
COPTS+= ${COPTS.${PROG}}
|
||||
CPPFLAGS+= ${CPPFLAGS.${PROG}}
|
||||
CXXFLAGS+= ${CXXFLAGS.${PROG}}
|
||||
OBJCOPTS+= ${OBJCOPTS.${PROG}}
|
||||
LDADD+= ${LDADD.${PROG}}
|
||||
LDFLAGS+= ${LDFLAGS.${PROG}}
|
||||
LDSTATIC+= ${LDSTATIC.${PROG}}
|
||||
@ -27,6 +28,7 @@ LDSTATIC+= ${LDSTATIC.${PROG}}
|
||||
CPPFLAGS+= ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
|
||||
CXXFLAGS+= ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
|
||||
CFLAGS+= ${COPTS}
|
||||
OBJCFLAGS+= ${OBJCOPTS}
|
||||
MKDEP_SUFFIXES?= .o .ln
|
||||
|
||||
# ELF platforms depend on crti.o, crtbegin.o, crtend.o, and crtn.o
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.sys.mk,v 1.128 2006/04/07 19:38:58 mrg Exp $
|
||||
# $NetBSD: bsd.sys.mk,v 1.129 2006/05/11 23:47:34 mrg Exp $
|
||||
#
|
||||
# Build definitions used for NetBSD source tree builds.
|
||||
|
||||
@ -18,8 +18,9 @@ CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
||||
CFLAGS+= -Wno-sign-compare -Wno-traditional
|
||||
.if !defined(HAVE_GCC) || (${HAVE_GCC} == 2)
|
||||
CFLAGS+= -Wno-uninitialized
|
||||
.else
|
||||
CFLAGS+= -Wno-packed
|
||||
.endif
|
||||
.if ${HAVE_GCC} > 3
|
||||
CFLAGS+= -Wno-attributes #-Wno-packed
|
||||
.endif
|
||||
.endif
|
||||
.if ${WARNS} > 1
|
||||
@ -185,7 +186,7 @@ TOOL_ZIC?= zic
|
||||
# used for Objective C source)
|
||||
.m.o:
|
||||
${_MKTARGET_COMPILE}
|
||||
${COMPILE.m} ${.IMPSRC}
|
||||
${COMPILE.m} ${OBJCOPTS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC}
|
||||
|
||||
# Host-compiled C objects
|
||||
# The intermediate step is necessary for Sun CC, which objects to calling
|
||||
|
Loading…
Reference in New Issue
Block a user