1 # $NetBSD: bsd.own.mk,v 1.706 2012/08/16 05:30:55 matt Exp $
3 # This needs to be before bsd.init.mk
4 .if defined
(BSD_MK_COMPAT_FILE
)
5 .
include <${BSD_MK_COMPAT_FILE}>
8 .if
!defined
(_BSD_OWN_MK_
)
13 # LSC FIXME: Useless difference, Should use the mk.conf
14 MAKECONF?
= /etc
/make.conf
16 # Some Minix deviations from NetBSD
32 # LSC To check if works
33 #DESTDIR?= /usr/destdir.${MACHINE_ARCH}
35 # LSC MINIX SMP Support?
37 SMP_FLAGS
+= -DCONFIG_SMP
38 .
ifdef CONFIG_MAX_CPUS
39 SMP_FLAGS
+= -DCONFIG_MAX_CPUS
=${CONFIG_MAX_CPUS}
43 CPPFLAGS
+= ${SMP_FLAGS}
46 .if
${__uname_s
:Uunknown
} == "Minix"
48 . if
${USETOOLS
:Uno
} != "yes" && ${HAVE_LLVM
:U
} == ""
49 HAVE_LLVM
!= clang
--version | grep version | cut
-d
' ' -f
3
51 . if
!defined
(HOSTPROG
) && !defined
(HOSTLIB
)
52 # LSC FIXME: Override MACHINE as the native minix host make command will set
54 . if
${MACHINE_ARCH} == "i386"
57 .
endif # !defined(HOSTPROG) && !defined(HOSTLIB)
58 .
endif # __uname_s == "Minix"
61 MAKECONF?
= /etc
/mk.conf
62 .
endif # defined(__MINIX)
63 .
-include "${MAKECONF}"
66 # CPU model, derived from MACHINE_ARCH
68 MACHINE_CPU
= ${MACHINE_ARCH
:C
/mipse
[bl
]/mips
/:C
/mips64e
[bl
]/mips
/:C
/sh3e
[bl
]/sh3
/:S
/m68000
/m68k
/:S
/armeb
/arm
/:S
/earm
/arm
/:S
/earmeb
/arm
/:S
/powerpc64
/powerpc
/}
71 # Subdirectory used below ${RELEASEDIR} when building a release
73 RELEASEMACHINEDIR?
= ${MACHINE}
76 # Subdirectory or path component used for the following paths:
77 # distrib/${RELEASEMACHINE}
78 # distrib/notes/${RELEASEMACHINE}
79 # etc/etc.${RELEASEMACHINE}
80 # Used when building a release.
82 RELEASEMACHINE?
= ${MACHINE}
85 # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
86 # ensure that things defined by <bsd.own.mk> (default targets,
87 # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
89 NEED_OWN_INSTALL_TARGET?
= yes
92 # This lists the platforms which do not have working in-tree toolchains. For
93 # the in-tree gcc toolchain, this list is empty.
95 # If some future port is not supported by the in-tree toolchain, this should
96 # be set to "yes" for that port only.
98 TOOLCHAIN_MISSING?
= no
101 # Platforms still using GCC 4.1
103 .if
${MKGCC
:Uyes
} != "no"
104 .if
${MACHINE_CPU} == "vax"
107 # Otherwise, default to GCC4.5
113 ${MACHINE_CPU} == "arm" || \
114 ${MACHINE_ARCH} == "i386" || \
115 ${MACHINE_ARCH} == "powerpc" || \
116 ${MACHINE_CPU} == "sh3" || \
117 ${MACHINE_ARCH} == "x86_64"
118 USE_COMPILERCRTSTUFF?
= no
120 USE_COMPILERCRTSTUFF?
= yes
124 # Platforms still using GDB 6
126 .if
${MACHINE_CPU} == "mips"
129 # Otherwise, default to GDB7
134 .if empty
(.MAKEFLAGS
:M-V
*)
135 .if defined
(MAKEOBJDIRPREFIX
) || defined
(MAKEOBJDIR
)
136 PRINTOBJDIR
= ${MAKE} -r
-V .OBJDIR
-f
/dev
/null xxx
138 PRINTOBJDIR
= ${MAKE} -V .OBJDIR
141 PRINTOBJDIR
= echo
# prevent infinite recursion
145 # Determine if running in the NetBSD source tree by checking for the
146 # existence of build.sh and tools/ in the current or a parent directory,
147 # and setting _SRC_TOP_ to the result.
149 .if
!defined
(_SRC_TOP_
) # {
150 _SRC_TOP_
!= cd
"${.CURDIR}"; while
:; do \
152 [ -f build.sh
] && [ -d tools
] && { echo
$$here; break
; }; \
153 case
$$here in
/) echo
""; break
;; esac
; \
156 .MAKEOVERRIDES
+= _SRC_TOP_
161 # If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
162 # defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
164 .if
(${_SRC_TOP_} != "") # {
166 NETBSDSRCDIR?
= ${_SRC_TOP_}
168 .if
!defined
(_SRC_TOP_OBJ_
)
169 _SRC_TOP_OBJ_
!= cd
"${_SRC_TOP_}" && ${PRINTOBJDIR}
170 .MAKEOVERRIDES
+= _SRC_TOP_OBJ_
173 .
endif # _SRC_TOP_ != "" # }
176 .if
(${_SRC_TOP_} != "") && \
177 (${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
))
183 .if
${MACHINE_ARCH} == "mips" ||
${MACHINE_ARCH} == "mips64" || \
184 ${MACHINE_ARCH} == "sh3"
186 @echo
"Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
188 .elif defined
(REQUIRETOOLS
) && \
189 (${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
)) && \
192 @echo
"USETOOLS=no, but this component requires a version-specific host toolchain"
197 # Host platform information; may be overridden
199 .if
!defined
(HOST_OSTYPE
)
200 _HOST_OSNAME
!= uname
-s
201 _HOST_OSREL
!= uname
-r
202 # For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
203 # something that does not look like an identifier, then use uname -m.
204 _HOST_ARCH
!= uname
-p
2>/dev
/null
205 _HOST_ARCH
:= ${HOST_ARCH
:tW
:C
/.
*[^
-_A-Za-z0-9
].
*//:S
/unknown
//}
206 .if empty
(_HOST_ARCH
)
207 _HOST_ARCH
!= uname
-m
209 HOST_OSTYPE
:= ${_HOST_OSNAME}-${_HOST_OSREL
:C
/\
([^\
)]*\
)//g
:[*]:C
/ /_
/g
}-${_HOST_ARCH
:C
/\
([^\
)]*\
)//g
:[*]:C
/ /_
/g
}
210 .MAKEOVERRIDES
+= HOST_OSTYPE
211 .
endif # !defined(HOST_OSTYPE)
213 .if
${USETOOLS} == "yes" # {
216 # Provide a default for TOOLDIR.
218 .if
!defined
(TOOLDIR
)
219 TOOLDIR
:= ${_SRC_TOP_OBJ_}/tooldir.
${HOST_OSTYPE}
220 .MAKEOVERRIDES
+= TOOLDIR
224 # This is the prefix used for the NetBSD-sourced tools.
229 # If an external toolchain base is specified, use it.
231 .if defined
(EXTERNAL_TOOLCHAIN
) # {
232 AR
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-ar
233 AS
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-as
234 LD
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-ld
235 NM
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-nm
236 OBJCOPY
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-objcopy
237 OBJDUMP
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-objdump
238 RANLIB
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-ranlib
239 SIZE
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-size
240 STRIP
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-strip
242 TOOL_CC.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-gcc
243 TOOL_CPP.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-cpp
244 TOOL_CXX.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-c
++
245 TOOL_FC.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-g77
246 TOOL_OBJC.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-gcc
248 # Define default locations for common tools.
249 .if
${USETOOLS_BINUTILS
:Uyes
} == "yes" # {
250 AR
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-ar
251 AS
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-as
252 LD
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-ld
253 NM
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-nm
254 OBJCOPY
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-objcopy
255 OBJDUMP
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-objdump
256 RANLIB
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-ranlib
257 SIZE
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-size
258 STRIP
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-strip
260 # GCC supports C, C++, Fortran and Objective C
261 TOOL_CC.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-gcc
262 TOOL_CPP.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-cpp
263 TOOL_CXX.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-c
++
264 TOOL_FC.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-g77
265 TOOL_OBJC.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-gcc
268 # Clang supports C, C++ and Objective C
269 TOOL_CC.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang
270 TOOL_CPP.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang-cpp
271 TOOL_CXX.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang
++
272 TOOL_OBJC.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang
274 # PCC supports C and Fortran
275 TOOL_CC.pcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-pcc
276 TOOL_CPP.pcc
= ${TOOLDIR}/libexec
/${MACHINE_GNU_PLATFORM}-cpp
279 # Make sure DESTDIR is set, so that builds with these tools always
280 # get appropriate -nostdinc, -nostdlib, etc. handling. The default is
281 # <empty string>, meaning start from /, the root directory.
285 .if
!defined
(HOSTPROG
) && !defined
(HOSTLIB
)
286 . if
${DESTDIR} != ""
287 CPPFLAGS
+= --sysroot
=${DESTDIR}
288 LDFLAGS
+= --sysroot
=${DESTDIR}
290 CPPFLAGS
+= --sysroot
=/
291 LDFLAGS
+= --sysroot
=/
294 .
endif # EXTERNAL_TOOLCHAIN # }
296 HOST_MKDEP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}host-mkdep
298 DBSYM
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-dbsym
299 ELF2AOUT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}m68k-elf2aout
300 ELF2ECOFF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mips-elf2ecoff
301 INSTALL
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-install
302 LEX
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}lex
303 LINT
= CC
=${CC
:Q
} ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-lint
304 LORDER
= NM
=${NM
:Q
} MKTEMP
=${TOOL_MKTEMP
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}lorder
305 MKDEP
= CC
=${CC
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkdep
306 PAXCTL
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}paxctl
307 TSORT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}tsort
-q
308 YACC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}yacc
310 TOOL_AMIGAAOUT2BB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}amiga-aout2bb
311 TOOL_AMIGAELF2BB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}amiga-elf2bb
312 TOOL_AMIGATXLT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}amiga-txlt
313 TOOL_ASN1_COMPILE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}asn1_compile
314 TOOL_AWK
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}awk
315 TOOL_CAP_MKDB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}cap_mkdb
316 TOOL_CAT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}cat
317 TOOL_CKSUM
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}cksum
318 TOOL_CLANG_TBLGEN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}clang-tblgen
319 TOOL_COMPILE_ET
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}compile_et
320 TOOL_CONFIG
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}config
321 TOOL_CRUNCHGEN
= MAKE
=${.MAKE
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}crunchgen
322 TOOL_CTAGS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}ctags
323 TOOL_CTFCONVERT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}ctfconvert
324 TOOL_CTFMERGE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}ctfmerge
325 TOOL_DB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}db
326 TOOL_DISKLABEL
= ${TOOLDIR}/bin
/nbdisklabel-
${MAKEWRAPPERMACHINE}
327 TOOL_EQN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}eqn
328 TOOL_FDISK
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-fdisk
329 TOOL_FGEN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}fgen
330 TOOL_GENASSYM
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}genassym
331 TOOL_GENCAT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}gencat
332 TOOL_GMAKE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}gmake
333 TOOL_GREP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}grep
334 TOOL_GROFF
= PATH
=${TOOLDIR}/lib
/groff
:$${PATH} ${TOOLDIR}/bin
/${_TOOL_PREFIX}groff
335 TOOL_HEXDUMP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}hexdump
336 TOOL_HP300MKBOOT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}hp300-mkboot
337 TOOL_HP700MKBOOT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}hp700-mkboot
338 TOOL_INDXBIB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}indxbib
339 TOOL_INSTALLBOOT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}installboot
340 TOOL_INSTALL_INFO
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}install-info
341 TOOL_JOIN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}join
342 TOOL_LLVM_TBLGEN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}llvm-tblgen
343 TOOL_M4
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}m4
344 TOOL_MACPPCFIXCOFF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}macppc-fixcoff
345 TOOL_MAKEFS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}makefs
346 TOOL_MAKEINFO
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}makeinfo
347 TOOL_MAKEWHATIS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}makewhatis
348 TOOL_MANDOC_ASCII
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mandoc
-Tascii
349 TOOL_MANDOC_HTML
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mandoc
-Thtml
350 TOOL_MANDOC_LINT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mandoc
-Tlint
351 TOOL_MDSETIMAGE
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-mdsetimage
352 TOOL_MENUC
= MENUDEF
=${TOOLDIR}/share
/misc
${TOOLDIR}/bin
/${_TOOL_PREFIX}menuc
353 TOOL_M68KELF2AOUT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}m68k-elf2aout
354 TOOL_MIPSELF2ECOFF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mips-elf2ecoff
355 TOOL_MKCSMAPPER
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkcsmapper
356 TOOL_MKESDB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkesdb
357 TOOL_MKFSMFS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkfs.mfs
358 TOOL_MKLOCALE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mklocale
359 TOOL_MKMAGIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}file
360 TOOL_MKTEMP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mktemp
361 TOOL_MKUBOOTIMAGE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkubootimage
362 TOOL_MSGC
= MSGDEF
=${TOOLDIR}/share
/misc
${TOOLDIR}/bin
/${_TOOL_PREFIX}msgc
363 TOOL_MTREE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mtree
364 TOOL_NBPERF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}perf
365 TOOL_PAX
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pax
366 TOOL_PIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pic
367 TOOL_PIGZ
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pigz
368 TOOL_PKG_CREATE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pkg_create
369 TOOL_POWERPCMKBOOTIMAGE
=${TOOLDIR}/bin
/${_TOOL_PREFIX}powerpc-mkbootimage
370 TOOL_PWD_MKDB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pwd_mkdb
371 TOOL_REFER
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}refer
372 TOOL_ROFF_ASCII
= PATH
=${TOOLDIR}/lib
/groff
:$${PATH} ${TOOLDIR}/bin
/${_TOOL_PREFIX}nroff
373 TOOL_ROFF_DVI
= ${TOOL_GROFF} -Tdvi
374 TOOL_ROFF_HTML
= ${TOOL_GROFF} -Tlatin1
-mdoc2html
375 TOOL_ROFF_PS
= ${TOOL_GROFF} -Tps
376 TOOL_ROFF_RAW
= ${TOOL_GROFF} -Z
377 TOOL_RPCGEN
= RPCGEN_CPP
=${CPP
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}rpcgen
378 TOOL_SED
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}sed
379 TOOL_SLC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}slc
380 TOOL_SOELIM
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}soelim
381 TOOL_SPARKCRC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}sparkcrc
382 TOOL_STAT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}stat
383 TOOL_STRFILE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}strfile
384 TOOL_SUNLABEL
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}sunlabel
385 TOOL_TBL
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}tbl
386 TOOL_TIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}tic
387 TOOL_UUDECODE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}uudecode
388 TOOL_VGRIND
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}vgrind
-f
389 TOOL_ZIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}zic
391 .
else # USETOOLS != yes # } {
393 # Clang supports C, C++ and Objective C
395 TOOL_CPP.clang
= clang-cpp
396 TOOL_CXX.clang
= clang
++
397 TOOL_OBJC.clang
= clang
399 # GCC supports C, C++, Fortran and Objective C
406 # PCC supports C and Fortran
408 TOOL_CPP.pcc
= /usr
/libexec
/pcpp
410 TOOL_AMIGAAOUT2BB
= amiga-aout2bb
411 TOOL_AMIGAELF2BB
= amiga-elf2bb
412 TOOL_AMIGATXLT
= amiga-txlt
413 TOOL_ASN1_COMPILE
= asn1_compile
415 TOOL_CAP_MKDB
= cap_mkdb
418 TOOL_CLANG_TBLGEN
= clang-tblgen
419 TOOL_COMPILE_ET
= compile_et
421 TOOL_CRUNCHGEN
= crunchgen
423 TOOL_CTFCONVERT
= ctfconvert
424 TOOL_CTFMERGE
= ctfmerge
426 TOOL_DISKLABEL
= disklabel
430 TOOL_GENASSYM
= genassym
435 TOOL_HEXDUMP
= hexdump
436 TOOL_HP300MKBOOT
= hp300-mkboot
437 TOOL_HP700MKBOOT
= hp700-mkboot
438 TOOL_INDXBIB
= indxbib
439 TOOL_INSTALLBOOT
= installboot
440 TOOL_INSTALL_INFO
= install-info
442 TOOL_LLVM_TBLGEN
= llvm-tblgen
444 TOOL_MACPPCFIXCOFF
= macppc-fixcoff
446 TOOL_MAKEINFO
= makeinfo
447 TOOL_MAKEWHATIS
= /usr
/libexec
/makewhatis
448 TOOL_MANDOC_ASCII
= mandoc
-Tascii
449 TOOL_MANDOC_HTML
= mandoc
-Thtml
-Oman
=..
/html
%S
/%N.html
-Ostyle
=..
/style.css
450 TOOL_MANDOC_LINT
= mandoc
-Tlint
451 TOOL_MDSETIMAGE
= mdsetimage
453 TOOL_M68KELF2AOUT
= m68k-elf2aout
454 TOOL_MIPSELF2ECOFF
= mips-elf2ecoff
455 TOOL_MKCSMAPPER
= mkcsmapper
457 TOOL_MKFSMFS
= mkfs.mfs
458 TOOL_MKLOCALE
= mklocale
461 TOOL_MKUBOOTIMAGE
= mkubootimage
468 TOOL_PKG_CREATE
= pkg_create
469 TOOL_POWERPCMKBOOTIMAGE
= powerpc-mkbootimage
470 TOOL_PWD_MKDB
= pwd_mkdb
472 TOOL_ROFF_ASCII
= nroff
473 TOOL_ROFF_DVI
= ${TOOL_GROFF} -Tdvi
474 TOOL_ROFF_HTML
= ${TOOL_GROFF} -Tlatin1
-mdoc2html
475 TOOL_ROFF_PS
= ${TOOL_GROFF} -Tps
476 TOOL_ROFF_RAW
= ${TOOL_GROFF} -Z
480 TOOL_SPARKCRC
= sparkcrc
482 TOOL_STRFILE
= strfile
483 TOOL_SUNLABEL
= sunlabel
486 TOOL_UUDECODE
= uudecode
487 TOOL_VGRIND
= vgrind
-f
490 .
endif # USETOOLS != yes # }
492 # Fallback to ensure that all variables are defined to something
494 TOOL_CPP.false
= false
495 TOOL_CXX.false
= false
497 TOOL_OBJC.false
= false
499 AVAILABLE_COMPILER?
= ${HAVE_PCC
:Dpcc
} ${HAVE_LLVM
:Dclang
} ${HAVE_GCC
:Dgcc
} false
501 .for _t in CC CPP CXX FC OBJC
502 ACTIVE_
${_t}= ${AVAILABLE_COMPILER
:@.c.@
${ !defined
(UNSUPPORTED_COMPILER.
${.c.
}) && defined
(TOOL_
${_t}.
${.c.
}) :?
${.c.
} : }@
:[1]}
503 SUPPORTED_
${_t}=${AVAILABLE_COMPILER
:Nfalse
:@.c.@
${ !defined
(UNSUPPORTED_COMPILER.
${.c.
}) && defined
(TOOL_
${_t}.
${.c.
}) :?
${.c.
} : }@
}
505 # make bugs prevent moving this into the .for loop
506 CC
= ${TOOL_CC.
${ACTIVE_CC}}
507 CPP
= ${TOOL_CPP.
${ACTIVE_CPP}}
508 CXX
= ${TOOL_CXX.
${ACTIVE_CXX}}
509 FC
= ${TOOL_FC.
${ACTIVE_FC}}
510 OBJC
= ${TOOL_OBJC.
${ACTIVE_OBJC}}
512 # OBJCOPY flags to create a.out binaries for old firmware
513 # shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
514 .if
${MACHINE_CPU} == "arm"
515 OBJCOPY_ELF2AOUT_FLAGS?
= \
516 -O a.out-arm-netbsd \
531 -R .note.netbsd.ident
535 # Targets to check if DESTDIR or RELEASEDIR is provided
537 .if
!target
(check_DESTDIR
)
538 check_DESTDIR
: .PHONY .NOTMAIN
539 .if
!defined
(DESTDIR
)
540 @echo
"setenv DESTDIR before doing that!"
547 .if
!target
(check_RELEASEDIR
)
548 check_RELEASEDIR
: .PHONY .NOTMAIN
549 .if
!defined
(RELEASEDIR
)
550 @echo
"setenv RELEASEDIR before doing that!"
558 # Build a dynamically linked /bin and /sbin, with the necessary shared
559 # libraries moved from /usr/lib to /lib and the shared linker moved
560 # from /usr/libexec to /lib
562 # Note that if the BINDIR is not /bin or /sbin, then we always use the
563 # non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
564 # and /sbin). See <bsd.shlib.mk>.
569 # Where the system object and source trees are kept; can be configurable
570 # by the user in case they want them in ~/foosrc and ~/fooobj (for example).
574 NETBSDSRCDIR?
= ${BSDSRCDIR}
581 # These are here mainly because we don't want suid root in case
582 # a Makefile defines BINMODE.
588 MANDIR?
= /usr
/share
/man
591 MANMODE?
= ${NONBINMODE}
592 MANINSTALL?
= ${_MANINSTALL}
594 INFODIR?
= /usr
/share
/info
597 INFOMODE?
= ${NONBINMODE}
601 LINTLIBDIR?
= /usr
/libdata
/lint
604 LIBMODE?
= ${NONBINMODE}
606 DOCDIR?
= /usr
/share
/doc
607 HTMLDOCDIR?
= /usr
/share
/doc
/html
610 DOCMODE?
= ${NONBINMODE}
612 NLSDIR?
= /usr
/share
/nls
615 NLSMODE?
= ${NONBINMODE}
619 KMODULEMODE?
= ${NONBINMODE}
621 LOCALEDIR?
= /usr
/share
/locale
624 LOCALEMODE?
= ${NONBINMODE}
626 FIRMWAREDIR?
= /libdata
/firmware
629 FIRMWAREMODE?
= ${NONBINMODE}
631 DEBUGDIR?
= /usr
/libdata
/debug
634 DEBUGMODE?
= ${NONBINMODE}
637 # Data-driven table using make variables to control how
638 # toolchain-dependent targets and shared libraries are built
639 # for different platforms and object formats.
641 # OBJECT_FMT: currently either "ELF" or "a.out".
643 # All platforms are ELF.
648 # If this platform's toolchain is missing, we obviously cannot build it.
650 .if
${TOOLCHAIN_MISSING} != "no"
657 # If we are using an external toolchain, we can still build the target's
658 # binutils, but we cannot build GCC's support libraries, since those are
659 # tightly-coupled to the version of GCC being used.
661 .if defined
(EXTERNAL_TOOLCHAIN
)
666 # The m68000 port is incomplete.
668 .if
${MACHINE_ARCH} == "m68000"
671 # XXX GCC 4 outputs mcount() calling sequences that try to load values
672 # from over 64KB away and this fails to assemble.
673 .if defined
(HAVE_GCC
)
679 # The ia64 port is incomplete.
681 .if
${MACHINE_ARCH} == "ia64"
687 # On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
688 # not just shared libraries, so don't build the _pic version.
690 .if
${MACHINE_ARCH} == "mipsel" ||
${MACHINE_ARCH} == "mipseb" || \
691 ${MACHINE_ARCH} == "mips64el" ||
${MACHINE_ARCH} == "mips64eb"
696 # On VAX using ELF, all objects are PIC, not just shared libraries,
697 # so don't build the _pic version.
699 .if
${MACHINE_ARCH} == "vax"
704 # Location of the file that contains the major and minor numbers of the
705 # version of a shared library. If this file exists a shared library
706 # will be built by <bsd.lib.mk>.
708 SHLIB_VERSION_FILE?
= ${.CURDIR
}/shlib_version
711 # GNU sources and packages sometimes see architecture names differently.
713 GNU_ARCH.coldfire
=m68k
716 GCC_CONFIG_ARCH.earm
=armv7-a
717 GNU_ARCH.earmeb
=armeb
718 # MINIX/intel default
720 GCC_CONFIG_ARCH.i386
=i586
721 GCC_CONFIG_TUNE.i386
=nocona
722 GCC_CONFIG_TUNE.x86_64
=nocona
723 GNU_ARCH.m68000
=m68010
726 GNU_ARCH.mips64eb
=mips64
727 MACHINE_GNU_ARCH
=${GNU_ARCH.
${MACHINE_ARCH}:U
${MACHINE_ARCH}}
730 # In order to identify NetBSD to GNU packages, we sometimes need
731 # an "elf" tag for historically a.out platforms.
733 .if
${MACHINE_ARCH} == "earm" ||
${MACHINE_ARCH} == "earmeb"
734 MACHINE_GNU_PLATFORM?
=${MACHINE_GNU_ARCH}--netbsdelf-eabi
735 .elif
(${MACHINE_GNU_ARCH} == "arm" || \
736 ${MACHINE_GNU_ARCH} == "armeb" || \
737 ${MACHINE_ARCH} == "i386" || \
738 ${MACHINE_CPU} == "m68k" || \
739 ${MACHINE_GNU_ARCH} == "sh" || \
740 ${MACHINE_GNU_ARCH} == "shle" || \
741 ${MACHINE_ARCH} == "sparc" || \
742 ${MACHINE_ARCH} == "vax")
743 MACHINE_GNU_PLATFORM?
=${MACHINE_GNU_ARCH}--netbsdelf
745 MACHINE_GNU_PLATFORM?
=${MACHINE_GNU_ARCH}--netbsd
749 # We have a simpler toolchain naming scheme
750 MACHINE_GNU_PLATFORM
:=${MACHINE_GNU_ARCH}-elf32-minix
751 .
endif # defined(__MINIX)
754 # Determine if arch uses native kernel modules with rump
756 .if
${MACHINE_ARCH} == "i386" || \
757 ${MACHINE_ARCH} == "x86_64"
761 TARGETS
+= all clean cleandir depend dependall includes \
762 install lint obj regress
tags html analyze
763 PHONY_NOTMAIN
= all clean cleandir depend dependall
distclean includes \
764 install lint obj regress beforedepend afterdepend \
765 beforeinstall afterinstall realinstall realdepend realall \
766 html subdir-all subdir-install subdir-depend analyze
767 .PHONY
: ${PHONY_NOTMAIN}
768 .NOTMAIN
: ${PHONY_NOTMAIN}
770 .if
${NEED_OWN_INSTALL_TARGET} != "no"
772 install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
778 all: realall subdir-all
781 depend
: realdepend subdir-depend
787 dependall
: .NOTMAIN realdepend .MAKE
788 @cd
"${.CURDIR}"; ${MAKE} realall
792 # Define MKxxx variables (which are either yes or no) for users
793 # to set in /etc/mk.conf and override in the make environment.
794 # These should be tested with `== "no"' or `!= "no"'.
795 # The NOxxx variables should only be set by Makefiles.
797 # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
798 # with changes to the MK* variables here.
802 # Supported NO* options (if defined, MK* will be forced to "no",
803 # regardless of user's mk.conf setting).
805 # Source makefiles should set NO*, and not MK*, and must do so before
806 # including bsd.own.mk.
809 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
810 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
812 MK
${var
:S
/^NO
//}:= no
817 # Older-style variables that enabled behaviour when set.
819 .for var in MANZ UNPRIVED UPDATE
826 # MK* options which have variable defaults.
828 .if
${MACHINE_ARCH} == "x86_64" ||
${MACHINE_ARCH} == "sparc64" || \
829 ${MACHINE_ARCH} == "mips64eb" ||
${MACHINE_ARCH} == "mips64el"
832 # Don't let this build where it really isn't supported.
836 #.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" || \
838 .if
${MACHINE} == "evbppc"
839 MKCOMPATMODULES?
= yes
845 # Default mips64 to softfloat now.
846 # emips is always softfloat.
848 .if
${MACHINE_ARCH} == "mips64eb" ||
${MACHINE_ARCH} == "mips64el" || \
849 ${MACHINE} == "emips"
853 .if
${MACHINE} == "emips"
858 # MK* backward compatibility.
861 MKBINUTILS?
= ${MKBFD}
865 # We want to build zfs only for i386 and amd64 by default for now.
867 .if
${MACHINE} == "amd64" ||
${MACHINE} == "i386"
871 # Some tough Minix defaults
877 # LSC MINIX does not support these features ATM.
903 # MK* options which default to "yes".
908 MKCRYPTO MKCOMPLEX MKCVS MKCXX \
910 MKGCC MKGCCCMDS MKGDB MKGROFF \
912 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
915 MKLDAP MKLINKLIB MKLINT MKLVM \
923 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
925 MKSHARE MKSKEY MKSTATICLIB \
931 MKMCONTEXT MKSYSDEBUG MKLIVEUPDATE MKSTATECTL MKTRACE
932 .if
(${MACHINE_ARCH} == "i386")
934 MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
937 .for var in
${_MKVARS.yes
}
942 # Exceptions to the above:
944 #.if ${MACHINE} == "evbppc"
949 # MK* options which default to "no". Note that MKZFS has a different
950 # default for some platforms, see above.
954 MKCATPAGES MKCRYPTO_RC5 MKDEBUG \
955 MKDEBUGLIB MKDTRACE MKEXTSRC \
960 MKSOFTFLOAT MKSTRIPIDENT \
961 MKUNPRIVED MKUPDATE MKX11 MKZFS
966 .if
(${MACHINE_ARCH} == "earm")
968 MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
971 .for var in
${_MKVARS.no
}
976 # Do we default to XFree86 or Xorg for this platform?
979 ${MACHINE} == "acorn32" || \
980 ${MACHINE} == "alpha" || \
981 ${MACHINE} == "amiga" || \
982 ${MACHINE} == "ews4800mips" || \
983 ${MACHINE} == "mac68k" || \
984 ${MACHINE} == "newsmips" || \
985 ${MACHINE} == "pmax" || \
986 ${MACHINE} == "sun3" || \
994 # Force some options off if their dependencies are off.
1002 .if
${MKCRYPTO} == "no"
1007 .if
${MKMAN} == "no"
1012 _MANINSTALL
= maninstall
1013 .if
${MKCATPAGES} != "no"
1014 _MANINSTALL
+= catinstall
1016 .if
${MKHTML} != "no"
1017 _MANINSTALL
+= htmlinstall
1020 .if
${MKLINKLIB} == "no"
1026 .if
${MKPIC} == "no"
1030 .if
${MKOBJ} == "no"
1034 .if
${MKSHARE} == "no"
1044 .if
${MKSMALL} == "yes"
1057 # install(1) parameters.
1060 .if
${HOST_OSTYPE
:C
/\
-.
*//} != "Minix"
1061 .if
${MKUPDATE} == "no"
1064 #LSC: Not supported by MINIX install
1067 #XXX: Not supported by MINIX install
1073 METALOG?
= ${DESTDIR}/METALOG
1074 METALOG.add?
= ${TOOL_CAT} -l
>> ${METALOG}
1075 .if
(${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
1076 .if
${MKUNPRIVED} != "no"
1077 INSTPRIV.unpriv
=-U
-M
${METALOG} -D
${DESTDIR} -h sha256
1081 INSTPRIV?
= ${INSTPRIV.unpriv
} -N
${NETBSDSRCDIR}/etc
1085 .if
${NEED_OWN_INSTALL_TARGET} != "no"
1086 INSTALL_DIR?
= ${INSTALL} ${INSTPRIV} -d
1087 INSTALL_FILE?
= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
1088 INSTALL_LINK?
= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
1089 INSTALL_SYMLINK?
= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
1090 HOST_INSTALL_FILE?
= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
1091 HOST_INSTALL_DIR?
= ${INSTALL} -d
1092 HOST_INSTALL_SYMLINK?
= ${INSTALL} ${SYMLINK} ${RENAME}
1096 # Set defaults for the USE_xxx variables.
1100 # USE_* options which default to "no" and will be forced to "no" if their
1101 # corresponding MK* variable is set to "no".
1103 .for var in USE_SKEY
1104 .if
(${${var
:S
/USE_
/MK
/}} == "no")
1112 # USE_* options which default to "yes" unless their corresponding MK*
1113 # variable is set to "no".
1115 .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1116 .if
(${${var
:S
/USE_
/MK
/}} == "no")
1123 #MINIX-specific vars
1125 USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT USE_DEBUGREG USE_SYSDEBUG \
1126 USE_LIVEUPDATE USE_STATECTL USE_TRACE USE_PCI
1127 .if
(${${var
:S
/USE_
/MK
/}} == "no")
1135 # USE_* options which default to "yes".
1137 .for var in USE_JEMALLOC
1142 # USE_* options which default to "no".
1144 # For now, disable pigz as compressor by default
1145 .for var in USE_PIGZGZIP USE_LIBTRE
1149 .if
${USE_PIGZGZIP} != "no"
1150 TOOL_GZIP
= ${TOOL_PIGZ}
1156 # Where X11 sources are and where it is installed to.
1158 .if
!defined
(X11SRCDIR
)
1159 .if exists
(${NETBSDSRCDIR}/..
/xsrc
)
1160 X11SRCDIR
!= cd
"${NETBSDSRCDIR}/../xsrc" && pwd
1162 X11SRCDIR
= /usr
/xsrc
1164 .
endif # !defined(X11SRCDIR)
1166 X11SRCDIR.xc?
= ${X11SRCDIR}/xfree
/xc
1167 X11SRCDIR.local?
= ${X11SRCDIR}/local
1168 .if
${X11FLAVOUR} == "Xorg"
1169 X11ROOTDIR?
= /usr
/X11R7
1171 X11ROOTDIR?
= /usr
/X11R6
1173 X11BINDIR?
= ${X11ROOTDIR}/bin
1174 X11ETCDIR?
= /etc
/X11
1175 X11FONTDIR?
= ${X11ROOTDIR}/lib
/X11
/fonts
1176 X11INCDIR?
= ${X11ROOTDIR}/include
1177 X11LIBDIR?
= ${X11ROOTDIR}/lib
/X11
1178 X11MANDIR?
= ${X11ROOTDIR}/man
1179 X11SHAREDIR?
= ${X11ROOTDIR}/share
1180 X11USRLIBDIR?
= ${X11ROOTDIR}/lib
1183 # New modular-xorg based builds
1185 X11SRCDIRMIT?
= ${X11SRCDIR}/external
/mit
1187 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
1188 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpm \
1189 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
1190 fontenc xkbfile xkbui Xaw lbxutil Xfontcache pciaccess xcb
1191 X11SRCDIR.
${_lib}?
= ${X11SRCDIRMIT}/lib
${_lib}/dist
1195 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
1196 xinerama dri2 render resource record video xf86dga xf86misc \
1197 xf86vidmode composite damage trap gl randr fontcache xf86dri \
1199 X11SRCDIR.
${_proto}proto?
= ${X11SRCDIRMIT}/${_proto}proto
/dist
1203 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
1204 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata xkeyboard-config \
1205 xbitmaps appres xeyes xev xedit sessreg pixman \
1206 beforelight bitmap editres makedepend fonttosfnt fslsfonts \
1207 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
1208 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
1209 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
1210 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
1211 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
1212 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
1213 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
1214 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
1215 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
1216 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
1217 xkeyboard-config xinput xcb-util \
1218 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
1219 font-adobe-utopia-75dpi font-adobe-utopia-type1 \
1221 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
1222 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
1223 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
1224 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
1225 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1226 font-sony-misc font-util ttf-bitstream-vera encodings
1227 X11SRCDIR.
${_dir}?
= ${X11SRCDIRMIT}/${_dir}/dist
1231 elographics keyboard mouse synaptics vmmouse void ws
1232 X11SRCDIR.xf86-input-
${_i}?
= ${X11SRCDIRMIT}/xf86-input-
${_i}/dist
1236 ag10e apm ark ast ati chips cirrus crime \
1237 geode glint i128 i740 igs imstt intel mach64 mga \
1238 neomagic newport nsc nv nvxbox openchrome pnozz \
1239 r128 radeonhd rendition \
1240 s3 s3virge savage siliconmotion sis suncg14 \
1241 suncg6 sunffb sunleo suntcx \
1242 tdfx tga trident tseng vesa vga via vmware wsfb xgi
1243 X11SRCDIR.xf86-video-
${_v}?
= ${X11SRCDIRMIT}/xf86-video-
${_v}/dist
1246 .if
${X11FLAVOUR} == "Xorg"
1255 # Where extsrc sources are and where it is installed to.
1257 .if
!defined
(EXTSRCSRCDIR
)
1258 .if exists
(${NETBSDSRCDIR}/..
/extsrc
)
1259 EXTSRCSRCDIR
!= cd
"${NETBSDSRCDIR}/../extsrc" && pwd
1261 EXTSRCSRCDIR
= /usr
/extsrc
1263 .
endif # !defined(EXTSRCSRCDIR)
1265 EXTSRCROOTDIR?
= /usr
/ext
1266 EXTSRCBINDIR?
= ${EXTSRCROOTDIR}/bin
1267 EXTSRCETCDIR?
= /etc
/ext
1268 EXTSRCINCDIR?
= ${EXTSRCROOTDIR}/include
1269 EXTSRCLIBDIR?
= ${EXTSRCROOTDIR}/lib
/ext
1270 EXTSRCMANDIR?
= ${EXTSRCROOTDIR}/man
1271 EXTSRCUSRLIBDIR?
= ${EXTSRCROOTDIR}/lib
1274 # MAKEDIRTARGET dir target [extra make(1) params]
1275 # run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message
1279 @_makedirtarget
() { \
1281 target
="$$1"; shift
; \
1283 /*) this
="$${dir}/"; \
1285 .
) this
="${_THISDIR_}"; \
1286 real
="${.CURDIR}" ;; \
1287 *) this
="${_THISDIR_}$${dir}/"; \
1288 real
="${.CURDIR}/$${dir}" ;; \
1291 echo
"$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
1293 && ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_
="$${this}" "$$@" $${target}; \
1298 # MAKEVERBOSE support. Levels are:
1299 # 0 Minimal output ("quiet")
1300 # 1 Describe what is occurring
1301 # 2 Describe what is occurring and echo the actual command
1302 # 3 Ignore the effect of the "@" prefix in make commands
1303 # 4 Trace shell commands using the shell's -x flag
1307 .if
${MAKEVERBOSE} == 0
1312 .elif
${MAKEVERBOSE} == 1
1317 .
else # MAKEVERBOSE >= 2
1318 _MKMSG?
= @echo
'\# '
1319 _MKSHMSG?
= echo
'\# '
1321 .SILENT
: __makeverbose_dummy_target__
1322 .
endif # MAKEVERBOSE >= 2
1323 .if
${MAKEVERBOSE} >= 3
1325 .
endif # ${MAKEVERBOSE} >= 3
1326 .if
${MAKEVERBOSE} >= 4
1328 .
endif # ${MAKEVERBOSE} >= 4
1330 _MKMSG_BUILD?
= ${_MKMSG} " build "
1331 _MKMSG_CREATE?
= ${_MKMSG} " create "
1332 _MKMSG_COMPILE?
= ${_MKMSG} "compile "
1333 _MKMSG_FORMAT?
= ${_MKMSG} " format "
1334 _MKMSG_INSTALL?
= ${_MKMSG} "install "
1335 _MKMSG_LINK?
= ${_MKMSG} " link "
1336 _MKMSG_LEX?
= ${_MKMSG} " lex "
1337 _MKMSG_REMOVE?
= ${_MKMSG} " remove "
1338 _MKMSG_YACC?
= ${_MKMSG} " yacc "
1340 _MKSHMSG_CREATE?
= ${_MKSHMSG} " create "
1341 _MKSHMSG_INSTALL?
= ${_MKSHMSG} "install "
1343 _MKTARGET_BUILD?
= ${_MKMSG_BUILD} ${.CURDIR
:T
}/${.TARGET
}
1344 _MKTARGET_CREATE?
= ${_MKMSG_CREATE} ${.CURDIR
:T
}/${.TARGET
}
1345 _MKTARGET_COMPILE?
= ${_MKMSG_COMPILE} ${.CURDIR
:T
}/${.TARGET
}
1346 _MKTARGET_FORMAT?
= ${_MKMSG_FORMAT} ${.CURDIR
:T
}/${.TARGET
}
1347 _MKTARGET_INSTALL?
= ${_MKMSG_INSTALL} ${.TARGET
}
1348 _MKTARGET_LINK?
= ${_MKMSG_LINK} ${.CURDIR
:T
}/${.TARGET
}
1349 _MKTARGET_LEX?
= ${_MKMSG_LEX} ${.CURDIR
:T
}/${.TARGET
}
1350 _MKTARGET_REMOVE?
= ${_MKMSG_REMOVE} ${.TARGET
}
1351 _MKTARGET_YACC?
= ${_MKMSG_YACC} ${.CURDIR
:T
}/${.TARGET
}
1353 .if
${MKMANDOC} == "yes"
1354 TARGETS
+= lintmanpages
1357 TESTSBASE
= /usr
/tests
1359 .
endif # !defined(_BSD_OWN_MK_)