2013-01-27 06:31:44 +04:00
|
|
|
# $NetBSD: bsd.sys.mk,v 1.223 2013/01/27 02:31:44 christos Exp $
|
1995-10-22 03:45:53 +03:00
|
|
|
#
|
2001-11-12 00:41:00 +03:00
|
|
|
# Build definitions used for NetBSD source tree builds.
|
1995-12-13 04:25:05 +03:00
|
|
|
|
2003-07-28 06:38:33 +04:00
|
|
|
.if !defined(_BSD_SYS_MK_)
|
|
|
|
_BSD_SYS_MK_=1
|
2001-11-18 01:55:24 +03:00
|
|
|
|
2010-12-25 21:56:44 +03:00
|
|
|
.if ${MKREPRO:Uno} == "yes"
|
|
|
|
CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
|
|
|
|
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
|
2012-09-06 02:40:30 +04:00
|
|
|
CPPFLAGS+= -Wp,-iremap,${X11SRCDIR}:/usr/xsrc
|
2010-12-25 21:56:44 +03:00
|
|
|
.endif
|
|
|
|
|
2011-05-17 05:12:34 +04:00
|
|
|
# Enable c99 mode by default.
|
|
|
|
# This has the side effect of complaining for missing prototypes
|
|
|
|
# implicit type declarations and missing return statements.
|
2012-03-15 06:00:52 +04:00
|
|
|
.if defined(HAVE_GCC) || defined(HAVE_LLVM)
|
2011-05-17 05:12:34 +04:00
|
|
|
CFLAGS+= -std=gnu99
|
|
|
|
.endif
|
|
|
|
|
1999-07-08 05:55:38 +04:00
|
|
|
.if defined(WARNS)
|
2011-05-26 16:56:24 +04:00
|
|
|
CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-sign-compare -Wno-pointer-sign :}
|
1999-07-08 05:55:38 +04:00
|
|
|
.if ${WARNS} > 0
|
2001-11-13 23:25:38 +03:00
|
|
|
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
|
|
|
#CFLAGS+= -Wmissing-declarations -Wredundant-decls -Wnested-externs
|
2002-11-25 06:03:13 +03:00
|
|
|
# Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3,
|
2003-08-22 22:07:21 +04:00
|
|
|
# but our sources aren't up for it yet. Also, add -Wno-traditional because
|
|
|
|
# gcc includes #elif in the warnings, which is 'this code will not compile
|
|
|
|
# in a traditional environment' warning, as opposed to 'this code behaves
|
|
|
|
# differently in traditional and ansi environments' which is the warning
|
|
|
|
# we wanted, and now we don't get anymore.
|
2011-05-23 00:24:46 +04:00
|
|
|
CFLAGS+= -Wno-sign-compare
|
|
|
|
CFLAGS+= ${${ACTIVE_CC} != "clang":? -Wno-traditional :}
|
2008-07-22 03:30:48 +04:00
|
|
|
.if !defined(NOGCCERROR)
|
|
|
|
# Set assembler warnings to be fatal
|
2012-09-23 23:20:44 +04:00
|
|
|
CFLAGS+= -Wa,--fatal-warnings
|
2008-07-22 03:30:48 +04:00
|
|
|
.endif
|
2008-03-03 09:33:17 +03:00
|
|
|
# Set linker warnings to be fatal
|
2008-04-22 16:47:59 +04:00
|
|
|
# XXX no proper way to avoid "FOO is a patented algorithm" warnings
|
|
|
|
# XXX on linking static libs
|
|
|
|
.if (!defined(MKPIC) || ${MKPIC} != "no") && \
|
|
|
|
(!defined(LDSTATIC) || ${LDSTATIC} != "-static")
|
2011-06-29 12:10:05 +04:00
|
|
|
# XXX there are some strange problems not yet resolved
|
2012-08-10 20:11:43 +04:00
|
|
|
. if !defined(HAVE_GCC) || defined(HAVE_LLVM)
|
2008-03-03 09:33:17 +03:00
|
|
|
LDFLAGS+= -Wl,--fatal-warnings
|
2011-06-29 12:10:05 +04:00
|
|
|
. endif
|
2005-06-04 16:17:45 +04:00
|
|
|
.endif
|
2008-04-22 16:47:59 +04:00
|
|
|
.endif
|
1999-07-08 05:55:38 +04:00
|
|
|
.if ${WARNS} > 1
|
2002-05-31 01:44:07 +04:00
|
|
|
CFLAGS+= -Wreturn-type -Wswitch -Wshadow
|
2001-11-01 10:17:17 +03:00
|
|
|
.endif
|
|
|
|
.if ${WARNS} > 2
|
2001-11-13 23:25:38 +03:00
|
|
|
CFLAGS+= -Wcast-qual -Wwrite-strings
|
2006-10-23 02:17:30 +04:00
|
|
|
CFLAGS+= -Wextra -Wno-unused-parameter
|
2011-05-26 16:56:24 +04:00
|
|
|
# Readd -Wno-sign-compare to override -Wextra with clang
|
|
|
|
CFLAGS+= -Wno-sign-compare
|
2005-08-10 02:16:19 +04:00
|
|
|
CXXFLAGS+= -Wabi
|
|
|
|
CXXFLAGS+= -Wold-style-cast
|
2005-08-09 19:24:26 +04:00
|
|
|
CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \
|
2011-05-25 19:02:25 +04:00
|
|
|
-Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth
|
|
|
|
CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :}
|
1999-07-08 05:55:38 +04:00
|
|
|
.endif
|
2012-03-15 06:00:52 +04:00
|
|
|
.if ${WARNS} > 3 && (defined(HAVE_GCC) || defined(HAVE_LLVM))
|
2012-03-21 01:48:20 +04:00
|
|
|
.if ${WARNS} > 4
|
|
|
|
CFLAGS+= -Wold-style-definition
|
|
|
|
.endif
|
2011-08-23 09:22:25 +04:00
|
|
|
CFLAGS+= -Wsign-compare -Wformat=2
|
2012-03-15 19:04:23 +04:00
|
|
|
CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-error=format-nonliteral :}
|
2012-03-15 06:00:52 +04:00
|
|
|
CFLAGS+= ${${ACTIVE_CC} == "gcc":? -Wno-format-zero-length :}
|
2011-09-20 13:11:06 +04:00
|
|
|
.endif
|
|
|
|
.if ${WARNS} > 3 && defined(HAVE_LLVM)
|
|
|
|
CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign -Wmissing-noreturn :}
|
2005-02-20 04:31:44 +03:00
|
|
|
.endif
|
2011-07-09 00:59:53 +04:00
|
|
|
.if (defined(HAVE_GCC) && ${HAVE_GCC} == 45 \
|
2011-10-31 18:20:11 +04:00
|
|
|
&& (${MACHINE_ARCH} == "sh3eb" || \
|
|
|
|
${MACHINE_ARCH} == "sh3el" || \
|
|
|
|
${MACHINE_ARCH} == "m68k" || \
|
|
|
|
${MACHINE_ARCH} == "m68000"))
|
|
|
|
# XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra noisy for
|
2011-07-09 00:59:53 +04:00
|
|
|
# cases it should be better with
|
2011-07-08 07:29:52 +04:00
|
|
|
CFLAGS+= -Wno-uninitialized
|
|
|
|
.endif
|
1999-07-08 05:55:38 +04:00
|
|
|
.endif
|
2000-10-04 23:27:45 +04:00
|
|
|
|
2011-05-25 19:01:08 +04:00
|
|
|
CWARNFLAGS+= ${CWARNFLAGS.${ACTIVE_CC}}
|
|
|
|
|
2001-11-15 00:49:53 +03:00
|
|
|
CPPFLAGS+= ${AUDIT:D-D__AUDIT__}
|
2011-05-30 17:47:01 +04:00
|
|
|
_NOWERROR= ${defined(NOGCCERROR) || (${ACTIVE_CC} == "clang" && defined(NOCLANGERROR)):?yes:no}
|
2011-05-30 17:56:34 +04:00
|
|
|
CFLAGS+= ${${_NOWERROR} == "no" :?-Werror:} ${CWARNFLAGS}
|
2001-10-19 20:28:54 +04:00
|
|
|
LINTFLAGS+= ${DESTDIR:D-d ${DESTDIR}/usr/include}
|
1998-07-27 17:16:52 +04:00
|
|
|
|
2013-01-27 06:31:44 +04:00
|
|
|
.if (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
|
2007-05-23 03:58:54 +04:00
|
|
|
.if !defined(KERNSRCDIR) && !defined(KERN) # not for kernels nor kern modules
|
2007-05-31 01:27:54 +04:00
|
|
|
CPPFLAGS+= -D_FORTIFY_SOURCE=2
|
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.
This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.
This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.
Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 16:06:17 +04:00
|
|
|
.endif
|
2011-05-23 00:49:16 +04:00
|
|
|
COPTS+= -fstack-protector -Wstack-protector
|
2012-09-23 21:22:22 +04:00
|
|
|
COPTS+= ${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
|
2011-05-23 00:49:16 +04:00
|
|
|
COPTS+= ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
|
2006-11-09 20:06:54 +03:00
|
|
|
.endif
|
2007-05-29 17:55:31 +04:00
|
|
|
|
2011-05-23 00:52:12 +04:00
|
|
|
.if ${MKSOFTFLOAT:Uno} != "no"
|
2001-06-18 21:04:44 +04:00
|
|
|
COPTS+= -msoft-float
|
|
|
|
FOPTS+= -msoft-float
|
|
|
|
.endif
|
|
|
|
|
2011-05-23 00:52:12 +04:00
|
|
|
.if ${MKIEEEFP:Uno} != "no"
|
2002-01-28 02:33:51 +03:00
|
|
|
.if ${MACHINE_ARCH} == "alpha"
|
|
|
|
CFLAGS+= -mieee
|
|
|
|
FFLAGS+= -mieee
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2002-07-20 15:43:34 +04:00
|
|
|
.if ${MACHINE} == "sparc64" && ${MACHINE_ARCH} == "sparc"
|
|
|
|
CFLAGS+= -Wa,-Av8plus
|
|
|
|
.endif
|
|
|
|
|
2009-12-15 07:03:55 +03:00
|
|
|
.if !defined(NOGCCERROR)
|
2009-12-14 04:00:46 +03:00
|
|
|
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
2012-09-23 23:20:44 +04:00
|
|
|
CPUFLAGS+= -Wa,--fatal-warnings
|
2009-12-14 04:00:46 +03:00
|
|
|
.endif
|
2009-12-15 07:03:55 +03:00
|
|
|
.endif
|
2009-12-14 04:00:46 +03:00
|
|
|
|
|
|
|
#.if ${MACHINE} == "sbmips"
|
|
|
|
#CFLAGS+= -mips64 -mtune=sb1
|
|
|
|
#.endif
|
|
|
|
|
|
|
|
#.if (${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \
|
|
|
|
# (defined(MKPIC) && ${MKPIC} == "no")
|
|
|
|
#CPUFLAGS+= -mno-abicalls -fno-PIC
|
|
|
|
#.endif
|
2003-05-30 22:43:23 +04:00
|
|
|
CFLAGS+= ${CPUFLAGS}
|
2004-10-19 05:05:40 +04:00
|
|
|
AFLAGS+= ${CPUFLAGS}
|
2003-05-30 22:43:23 +04:00
|
|
|
|
2010-04-21 20:09:11 +04:00
|
|
|
.if !defined(LDSTATIC) || ${LDSTATIC} != "-static"
|
2008-10-16 18:36:42 +04:00
|
|
|
# Position Independent Executable flags
|
2008-10-19 19:22:50 +04:00
|
|
|
PIE_CFLAGS?= -fPIC -DPIC
|
2008-10-16 18:36:42 +04:00
|
|
|
PIE_LDFLAGS?= -Wl,-pie -shared-libgcc
|
2008-10-19 19:22:50 +04:00
|
|
|
PIE_AFLAGS?= -fPIC -DPIC
|
2010-04-21 20:09:11 +04:00
|
|
|
.endif
|
2008-10-16 18:36:42 +04:00
|
|
|
|
1997-04-17 10:43:32 +04:00
|
|
|
# Helpers for cross-compiling
|
|
|
|
HOST_CC?= cc
|
|
|
|
HOST_CFLAGS?= -O
|
|
|
|
HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c
|
2005-09-02 07:57:10 +04:00
|
|
|
HOST_COMPILE.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} -c
|
|
|
|
.if defined(HOSTPROG_CXX)
|
|
|
|
HOST_LINK.c?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS}
|
|
|
|
.else
|
1997-04-17 10:43:32 +04:00
|
|
|
HOST_LINK.c?= ${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS}
|
2005-09-02 07:57:10 +04:00
|
|
|
.endif
|
1997-04-17 10:43:32 +04:00
|
|
|
|
2001-08-14 15:55:04 +04:00
|
|
|
HOST_CXX?= c++
|
|
|
|
HOST_CXXFLAGS?= -O
|
|
|
|
|
1997-04-17 10:43:32 +04:00
|
|
|
HOST_CPP?= cpp
|
|
|
|
HOST_CPPFLAGS?=
|
|
|
|
|
|
|
|
HOST_LD?= ld
|
|
|
|
HOST_LDFLAGS?=
|
|
|
|
|
2001-11-13 23:25:38 +03:00
|
|
|
HOST_AR?= ar
|
|
|
|
HOST_RANLIB?= ranlib
|
|
|
|
|
2003-11-13 08:54:44 +03:00
|
|
|
HOST_LN?= ln
|
|
|
|
|
2008-10-26 18:51:20 +03:00
|
|
|
# HOST_SH must be an absolute path
|
|
|
|
HOST_SH?= /bin/sh
|
2003-05-08 17:02:09 +04:00
|
|
|
|
2002-05-02 17:13:53 +04:00
|
|
|
ELF2ECOFF?= elf2ecoff
|
2001-11-18 01:48:48 +03:00
|
|
|
MKDEP?= mkdep
|
2002-04-03 09:32:58 +04:00
|
|
|
OBJCOPY?= objcopy
|
2005-05-24 01:58:21 +04:00
|
|
|
OBJDUMP?= objdump
|
2006-11-10 20:22:19 +03:00
|
|
|
PAXCTL?= paxctl
|
2002-04-03 09:32:58 +04:00
|
|
|
STRIP?= strip
|
2003-07-10 14:33:58 +04:00
|
|
|
|
2008-10-27 02:13:24 +03:00
|
|
|
# TOOL_* variables are defined in bsd.own.mk
|
1998-08-28 03:26:37 +04:00
|
|
|
|
2005-09-02 07:57:10 +04:00
|
|
|
.SUFFIXES: .o .ln .lo .c .cc .cpp .cxx .C .m ${YHEADER:D.h}
|
2003-07-22 10:53:21 +04:00
|
|
|
|
|
|
|
# C
|
|
|
|
.c.o:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2003-07-22 10:53:21 +04:00
|
|
|
${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
|
2010-03-02 23:49:18 +03:00
|
|
|
.if defined(CTFCONVERT)
|
|
|
|
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
|
|
|
.endif
|
2004-04-18 07:19:02 +04:00
|
|
|
|
2003-07-22 10:53:21 +04:00
|
|
|
.c.ln:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2012-03-17 22:02:41 +04:00
|
|
|
${LINT} ${LINTFLAGS} ${LINTFLAGS.${.IMPSRC:T}} \
|
2004-01-27 06:31:48 +03:00
|
|
|
${CPPFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
|
|
|
|
${CPPFLAGS.${.IMPSRC:T}:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
|
|
|
|
-i ${.IMPSRC}
|
1998-09-14 00:56:38 +04:00
|
|
|
|
2003-10-20 04:24:22 +04:00
|
|
|
# C++
|
|
|
|
.cc.o .cpp.o .cxx.o .C.o:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2003-10-20 04:24:22 +04:00
|
|
|
${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
|
|
|
|
|
1997-10-28 15:40:16 +03:00
|
|
|
# Objective C
|
|
|
|
# (Defined here rather than in <sys.mk> because `.m' is not just
|
|
|
|
# used for Objective C source)
|
|
|
|
.m.o:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2006-05-12 03:47:34 +04:00
|
|
|
${COMPILE.m} ${OBJCOPTS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC}
|
2010-03-02 23:49:18 +03:00
|
|
|
.if defined(CTFCONVERT)
|
|
|
|
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
|
|
|
.endif
|
1997-10-28 15:40:16 +03:00
|
|
|
|
1998-09-14 00:56:38 +04:00
|
|
|
# Host-compiled C objects
|
2002-04-23 04:15:45 +04:00
|
|
|
# The intermediate step is necessary for Sun CC, which objects to calling
|
|
|
|
# object files anything but *.o
|
1998-09-14 00:56:38 +04:00
|
|
|
.c.lo:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2003-11-16 19:10:50 +03:00
|
|
|
${HOST_COMPILE.c} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
|
2002-04-23 04:15:45 +04:00
|
|
|
mv ${.TARGET}.o ${.TARGET}
|
1998-09-14 00:56:38 +04:00
|
|
|
|
2005-09-02 07:57:10 +04:00
|
|
|
# C++
|
|
|
|
.cc.lo .cpp.lo .cxx.lo .C.lo:
|
|
|
|
${_MKTARGET_COMPILE}
|
|
|
|
${HOST_COMPILE.cc} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
|
|
|
|
mv ${.TARGET}.o ${.TARGET}
|
|
|
|
|
2003-10-19 06:11:29 +04:00
|
|
|
# Assembly
|
|
|
|
.s.o:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2003-10-19 06:11:29 +04:00
|
|
|
${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
|
2010-03-02 23:49:18 +03:00
|
|
|
.if defined(CTFCONVERT)
|
|
|
|
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
|
|
|
.endif
|
2003-11-08 09:06:50 +03:00
|
|
|
|
2003-10-19 06:11:29 +04:00
|
|
|
.S.o:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_COMPILE}
|
2003-10-19 06:11:29 +04:00
|
|
|
${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
|
2010-03-02 23:49:18 +03:00
|
|
|
.if defined(CTFCONVERT)
|
|
|
|
${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
|
|
|
.endif
|
2003-10-19 06:11:29 +04:00
|
|
|
|
1995-10-22 03:45:53 +03:00
|
|
|
# Lex
|
2008-09-20 02:54:55 +04:00
|
|
|
LFLAGS+= ${LPREFIX.${.IMPSRC:T}:D-P${LPREFIX.${.IMPSRC:T}}}
|
|
|
|
LFLAGS+= ${LPREFIX:D-P${LPREFIX}}
|
2001-10-19 20:15:40 +04:00
|
|
|
|
1995-10-22 03:45:53 +03:00
|
|
|
.l.c:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_LEX}
|
1995-10-22 03:45:53 +03:00
|
|
|
${LEX.l} -o${.TARGET} ${.IMPSRC}
|
|
|
|
|
|
|
|
# Yacc
|
2008-09-20 02:54:55 +04:00
|
|
|
YFLAGS+= ${YPREFIX.${.IMPSRC:T}:D-p${YPREFIX.${.IMPSRC:T}}} ${YHEADER.${.IMPSRC:T}:D-d}
|
2001-10-19 20:15:40 +04:00
|
|
|
YFLAGS+= ${YPREFIX:D-p${YPREFIX}} ${YHEADER:D-d}
|
|
|
|
|
1998-04-01 20:58:33 +04:00
|
|
|
.y.c:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_YACC}
|
1998-11-01 06:46:28 +03:00
|
|
|
${YACC.y} -o ${.TARGET} ${.IMPSRC}
|
2001-10-19 23:07:48 +04:00
|
|
|
|
|
|
|
.ifdef YHEADER
|
2009-12-13 21:40:50 +03:00
|
|
|
.if empty(.MAKEFLAGS:M-n)
|
2001-10-19 23:07:48 +04:00
|
|
|
.y.h: ${.TARGET:.h=.c}
|
|
|
|
.endif
|
2009-12-13 21:40:50 +03:00
|
|
|
.endif
|
2001-11-18 01:55:24 +03:00
|
|
|
|
2012-01-29 01:32:13 +04:00
|
|
|
# Objcopy
|
|
|
|
OBJCOPYLIBFLAGS?=${"${.TARGET:M*.po}" != "":?-X:-x}
|
|
|
|
|
2003-07-28 06:38:33 +04:00
|
|
|
.endif # !defined(_BSD_SYS_MK_)
|