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
28 MACHINE_GNU_PLATFORM?
=${MACHINE_ARCH}-elf32-minix
34 # LSC To check if works
35 #DESTDIR?= /usr/destdir.${MACHINE_ARCH}
37 # LSC MINIX SMP Support?
39 SMP_FLAGS
+= -DCONFIG_SMP
40 .
ifdef CONFIG_MAX_CPUS
41 SMP_FLAGS
+= -DCONFIG_MAX_CPUS
=${CONFIG_MAX_CPUS}
45 CPPFLAGS
+= ${SMP_FLAGS}
48 .if
${__uname_s
:Uunknown
} == "Minix"
50 . if
${USETOOLS
:Uno
} != "yes" && ${HAVE_LLVM
:U
} == ""
51 HAVE_LLVM
!= clang
--version | grep version | cut
-d
' ' -f
3
53 . if
!defined
(HOSTPROG
) && !defined
(HOSTLIB
)
54 # LSC FIXME: Override MACHINE as the native minix host make command will set
56 . if
${MACHINE_ARCH} == "i386"
59 .
endif # !defined(HOSTPROG) && !defined(HOSTLIB)
60 .
endif # __uname_s == "Minix"
63 MAKECONF?
= /etc
/mk.conf
64 .
endif # defined(__MINIX)
65 .
-include "${MAKECONF}"
68 # CPU model, derived from MACHINE_ARCH
70 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
/}
73 # Subdirectory used below ${RELEASEDIR} when building a release
75 RELEASEMACHINEDIR?
= ${MACHINE}
78 # Subdirectory or path component used for the following paths:
79 # distrib/${RELEASEMACHINE}
80 # distrib/notes/${RELEASEMACHINE}
81 # etc/etc.${RELEASEMACHINE}
82 # Used when building a release.
84 RELEASEMACHINE?
= ${MACHINE}
87 # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
88 # ensure that things defined by <bsd.own.mk> (default targets,
89 # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
91 NEED_OWN_INSTALL_TARGET?
= yes
94 # This lists the platforms which do not have working in-tree toolchains. For
95 # the in-tree gcc toolchain, this list is empty.
97 # If some future port is not supported by the in-tree toolchain, this should
98 # be set to "yes" for that port only.
100 TOOLCHAIN_MISSING?
= no
103 # Platforms still using GCC 4.1
105 .if
${MKGCC
:Uyes
} != "no"
106 .if
${MACHINE_CPU} == "vax"
109 # Otherwise, default to GCC4.5
115 ${MACHINE_CPU} == "arm" || \
116 ${MACHINE_ARCH} == "i386" || \
117 ${MACHINE_ARCH} == "powerpc" || \
118 ${MACHINE_CPU} == "sh3" || \
119 ${MACHINE_ARCH} == "x86_64"
120 USE_COMPILERCRTSTUFF?
= no
122 USE_COMPILERCRTSTUFF?
= yes
126 # Platforms still using GDB 6
128 .if
${MACHINE_CPU} == "mips"
131 # Otherwise, default to GDB7
136 .if empty
(.MAKEFLAGS
:M-V
*)
137 .if defined
(MAKEOBJDIRPREFIX
) || defined
(MAKEOBJDIR
)
138 PRINTOBJDIR
= ${MAKE} -r
-V .OBJDIR
-f
/dev
/null xxx
140 PRINTOBJDIR
= ${MAKE} -V .OBJDIR
143 PRINTOBJDIR
= echo
# prevent infinite recursion
147 # Determine if running in the NetBSD source tree by checking for the
148 # existence of build.sh and tools/ in the current or a parent directory,
149 # and setting _SRC_TOP_ to the result.
151 .if
!defined
(_SRC_TOP_
) # {
152 _SRC_TOP_
!= cd
"${.CURDIR}"; while
:; do \
154 [ -f build.sh
] && [ -d tools
] && { echo
$$here; break
; }; \
155 case
$$here in
/) echo
""; break
;; esac
; \
158 .MAKEOVERRIDES
+= _SRC_TOP_
163 # If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
164 # defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
166 .if
(${_SRC_TOP_} != "") # {
168 NETBSDSRCDIR?
= ${_SRC_TOP_}
170 .if
!defined
(_SRC_TOP_OBJ_
)
171 _SRC_TOP_OBJ_
!= cd
"${_SRC_TOP_}" && ${PRINTOBJDIR}
172 .MAKEOVERRIDES
+= _SRC_TOP_OBJ_
175 .
endif # _SRC_TOP_ != "" # }
178 .if
(${_SRC_TOP_} != "") && \
179 (${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
))
185 .if
${MACHINE_ARCH} == "mips" ||
${MACHINE_ARCH} == "mips64" || \
186 ${MACHINE_ARCH} == "sh3"
188 @echo
"Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
190 .elif defined
(REQUIRETOOLS
) && \
191 (${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
)) && \
194 @echo
"USETOOLS=no, but this component requires a version-specific host toolchain"
199 # Host platform information; may be overridden
201 .if
!defined
(HOST_OSTYPE
)
202 _HOST_OSNAME
!= uname
-s
203 _HOST_OSREL
!= uname
-r
204 # For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
205 # something that does not look like an identifier, then use uname -m.
206 _HOST_ARCH
!= uname
-p
2>/dev
/null
207 _HOST_ARCH
:= ${HOST_ARCH
:tW
:C
/.
*[^
-_A-Za-z0-9
].
*//:S
/unknown
//}
208 .if empty
(_HOST_ARCH
)
209 _HOST_ARCH
!= uname
-m
211 HOST_OSTYPE
:= ${_HOST_OSNAME}-${_HOST_OSREL
:C
/\
([^\
)]*\
)//g
:[*]:C
/ /_
/g
}-${_HOST_ARCH
:C
/\
([^\
)]*\
)//g
:[*]:C
/ /_
/g
}
212 .MAKEOVERRIDES
+= HOST_OSTYPE
213 .
endif # !defined(HOST_OSTYPE)
215 .if
${USETOOLS} == "yes" # {
218 # Provide a default for TOOLDIR.
220 .if
!defined
(TOOLDIR
)
221 TOOLDIR
:= ${_SRC_TOP_OBJ_}/tooldir.
${HOST_OSTYPE}
222 .MAKEOVERRIDES
+= TOOLDIR
226 # This is the prefix used for the NetBSD-sourced tools.
231 # If an external toolchain base is specified, use it.
233 .if defined
(EXTERNAL_TOOLCHAIN
) # {
234 AR
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-ar
235 AS
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-as
236 LD
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-ld
237 NM
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-nm
238 OBJCOPY
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-objcopy
239 OBJDUMP
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-objdump
240 RANLIB
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-ranlib
241 SIZE
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-size
242 STRIP
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-strip
244 TOOL_CC.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-gcc
245 TOOL_CPP.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-cpp
246 TOOL_CXX.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-c
++
247 TOOL_FC.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-g77
248 TOOL_OBJC.gcc
= ${EXTERNAL_TOOLCHAIN}/bin
/${MACHINE_GNU_PLATFORM}-gcc
250 # Define default locations for common tools.
251 .if
${USETOOLS_BINUTILS
:Uyes
} == "yes" # {
252 AR
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-ar
253 AS
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-as
254 LD
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-ld
255 NM
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-nm
256 OBJCOPY
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-objcopy
257 OBJDUMP
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-objdump
258 RANLIB
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-ranlib
259 SIZE
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-size
260 STRIP
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-strip
262 # GCC supports C, C++, Fortran and Objective C
263 TOOL_CC.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-gcc
264 TOOL_CPP.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-cpp
265 TOOL_CXX.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-c
++
266 TOOL_FC.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-g77
267 TOOL_OBJC.gcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-gcc
270 # Clang supports C, C++ and Objective C
271 TOOL_CC.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang
272 TOOL_CPP.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang-cpp
273 TOOL_CXX.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang
++
274 TOOL_OBJC.clang
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-clang
276 # PCC supports C and Fortran
277 TOOL_CC.pcc
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-pcc
278 TOOL_CPP.pcc
= ${TOOLDIR}/libexec
/${MACHINE_GNU_PLATFORM}-cpp
281 # Make sure DESTDIR is set, so that builds with these tools always
282 # get appropriate -nostdinc, -nostdlib, etc. handling. The default is
283 # <empty string>, meaning start from /, the root directory.
287 .if
!defined
(HOSTPROG
) && !defined
(HOSTLIB
)
288 . if
${DESTDIR} != ""
289 CPPFLAGS
+= --sysroot
=${DESTDIR}
290 LDFLAGS
+= --sysroot
=${DESTDIR}
292 CPPFLAGS
+= --sysroot
=/
293 LDFLAGS
+= --sysroot
=/
296 .
endif # EXTERNAL_TOOLCHAIN # }
298 HOST_MKDEP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}host-mkdep
300 DBSYM
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-dbsym
301 ELF2AOUT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}m68k-elf2aout
302 ELF2ECOFF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mips-elf2ecoff
303 INSTALL
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-install
304 LEX
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}lex
305 LINT
= CC
=${CC
:Q
} ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-lint
306 LORDER
= NM
=${NM
:Q
} MKTEMP
=${TOOL_MKTEMP
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}lorder
307 MKDEP
= CC
=${CC
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkdep
308 PAXCTL
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}paxctl
309 TSORT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}tsort
-q
310 YACC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}yacc
312 TOOL_AMIGAAOUT2BB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}amiga-aout2bb
313 TOOL_AMIGAELF2BB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}amiga-elf2bb
314 TOOL_AMIGATXLT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}amiga-txlt
315 TOOL_ASN1_COMPILE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}asn1_compile
316 TOOL_AWK
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}awk
317 TOOL_CAP_MKDB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}cap_mkdb
318 TOOL_CAT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}cat
319 TOOL_CKSUM
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}cksum
320 TOOL_CLANG_TBLGEN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}clang-tblgen
321 TOOL_COMPILE_ET
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}compile_et
322 TOOL_CONFIG
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}config
323 TOOL_CRUNCHGEN
= MAKE
=${.MAKE
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}crunchgen
324 TOOL_CTAGS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}ctags
325 TOOL_CTFCONVERT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}ctfconvert
326 TOOL_CTFMERGE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}ctfmerge
327 TOOL_DB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}db
328 TOOL_DISKLABEL
= ${TOOLDIR}/bin
/nbdisklabel-
${MAKEWRAPPERMACHINE}
329 TOOL_EQN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}eqn
330 TOOL_FDISK
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-fdisk
331 TOOL_FGEN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}fgen
332 TOOL_GENASSYM
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}genassym
333 TOOL_GENCAT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}gencat
334 TOOL_GMAKE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}gmake
335 TOOL_GREP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}grep
336 TOOL_GROFF
= PATH
=${TOOLDIR}/lib
/groff
:$${PATH} ${TOOLDIR}/bin
/${_TOOL_PREFIX}groff
337 TOOL_HEXDUMP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}hexdump
338 TOOL_HP300MKBOOT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}hp300-mkboot
339 TOOL_HP700MKBOOT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}hp700-mkboot
340 TOOL_INDXBIB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}indxbib
341 TOOL_INSTALLBOOT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}installboot
342 TOOL_INSTALL_INFO
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}install-info
343 TOOL_JOIN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}join
344 TOOL_LLVM_TBLGEN
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}llvm-tblgen
345 TOOL_M4
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}m4
346 TOOL_MACPPCFIXCOFF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}macppc-fixcoff
347 TOOL_MAKEFS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}makefs
348 TOOL_MAKEINFO
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}makeinfo
349 TOOL_MAKEWHATIS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}makewhatis
350 TOOL_MANDOC_ASCII
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mandoc
-Tascii
351 TOOL_MANDOC_HTML
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mandoc
-Thtml
352 TOOL_MANDOC_LINT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mandoc
-Tlint
353 TOOL_MDSETIMAGE
= ${TOOLDIR}/bin
/${MACHINE_GNU_PLATFORM}-mdsetimage
354 TOOL_MENUC
= MENUDEF
=${TOOLDIR}/share
/misc
${TOOLDIR}/bin
/${_TOOL_PREFIX}menuc
355 TOOL_M68KELF2AOUT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}m68k-elf2aout
356 TOOL_MIPSELF2ECOFF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mips-elf2ecoff
357 TOOL_MKCSMAPPER
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkcsmapper
358 TOOL_MKESDB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkesdb
359 TOOL_MKFSMFS
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkfs.mfs
360 TOOL_MKLOCALE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mklocale
361 TOOL_MKMAGIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}file
362 TOOL_MKTEMP
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mktemp
363 TOOL_MKUBOOTIMAGE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mkubootimage
364 TOOL_MSGC
= MSGDEF
=${TOOLDIR}/share
/misc
${TOOLDIR}/bin
/${_TOOL_PREFIX}msgc
365 TOOL_MTREE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}mtree
366 TOOL_NBPERF
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}perf
367 TOOL_PAX
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pax
368 TOOL_PIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pic
369 TOOL_PIGZ
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pigz
370 TOOL_PKG_CREATE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pkg_create
371 TOOL_POWERPCMKBOOTIMAGE
=${TOOLDIR}/bin
/${_TOOL_PREFIX}powerpc-mkbootimage
372 TOOL_PWD_MKDB
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}pwd_mkdb
373 TOOL_REFER
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}refer
374 TOOL_ROFF_ASCII
= PATH
=${TOOLDIR}/lib
/groff
:$${PATH} ${TOOLDIR}/bin
/${_TOOL_PREFIX}nroff
375 TOOL_ROFF_DVI
= ${TOOL_GROFF} -Tdvi
376 TOOL_ROFF_HTML
= ${TOOL_GROFF} -Tlatin1
-mdoc2html
377 TOOL_ROFF_PS
= ${TOOL_GROFF} -Tps
378 TOOL_ROFF_RAW
= ${TOOL_GROFF} -Z
379 TOOL_RPCGEN
= RPCGEN_CPP
=${CPP
:Q
} ${TOOLDIR}/bin
/${_TOOL_PREFIX}rpcgen
380 TOOL_SED
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}sed
381 TOOL_SLC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}slc
382 TOOL_SOELIM
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}soelim
383 TOOL_SPARKCRC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}sparkcrc
384 TOOL_STAT
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}stat
385 TOOL_STRFILE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}strfile
386 TOOL_SUNLABEL
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}sunlabel
387 TOOL_TBL
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}tbl
388 TOOL_TIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}tic
389 TOOL_UUDECODE
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}uudecode
390 TOOL_VGRIND
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}vgrind
-f
391 TOOL_ZIC
= ${TOOLDIR}/bin
/${_TOOL_PREFIX}zic
393 .
else # USETOOLS != yes # } {
395 # Clang supports C, C++ and Objective C
397 TOOL_CPP.clang
= clang-cpp
398 TOOL_CXX.clang
= clang
++
399 TOOL_OBJC.clang
= clang
401 # GCC supports C, C++, Fortran and Objective C
408 # PCC supports C and Fortran
410 TOOL_CPP.pcc
= /usr
/libexec
/pcpp
412 TOOL_AMIGAAOUT2BB
= amiga-aout2bb
413 TOOL_AMIGAELF2BB
= amiga-elf2bb
414 TOOL_AMIGATXLT
= amiga-txlt
415 TOOL_ASN1_COMPILE
= asn1_compile
417 TOOL_CAP_MKDB
= cap_mkdb
420 TOOL_CLANG_TBLGEN
= clang-tblgen
421 TOOL_COMPILE_ET
= compile_et
423 TOOL_CRUNCHGEN
= crunchgen
425 TOOL_CTFCONVERT
= ctfconvert
426 TOOL_CTFMERGE
= ctfmerge
428 TOOL_DISKLABEL
= disklabel
432 TOOL_GENASSYM
= genassym
437 TOOL_HEXDUMP
= hexdump
438 TOOL_HP300MKBOOT
= hp300-mkboot
439 TOOL_HP700MKBOOT
= hp700-mkboot
440 TOOL_INDXBIB
= indxbib
441 TOOL_INSTALLBOOT
= installboot
442 TOOL_INSTALL_INFO
= install-info
444 TOOL_LLVM_TBLGEN
= llvm-tblgen
446 TOOL_MACPPCFIXCOFF
= macppc-fixcoff
448 TOOL_MAKEINFO
= makeinfo
449 TOOL_MAKEWHATIS
= /usr
/libexec
/makewhatis
450 TOOL_MANDOC_ASCII
= mandoc
-Tascii
451 TOOL_MANDOC_HTML
= mandoc
-Thtml
-Oman
=..
/html
%S
/%N.html
-Ostyle
=..
/style.css
452 TOOL_MANDOC_LINT
= mandoc
-Tlint
453 TOOL_MDSETIMAGE
= mdsetimage
455 TOOL_M68KELF2AOUT
= m68k-elf2aout
456 TOOL_MIPSELF2ECOFF
= mips-elf2ecoff
457 TOOL_MKCSMAPPER
= mkcsmapper
459 TOOL_MKFSMFS
= mkfs.mfs
460 TOOL_MKLOCALE
= mklocale
463 TOOL_MKUBOOTIMAGE
= mkubootimage
470 TOOL_PKG_CREATE
= pkg_create
471 TOOL_POWERPCMKBOOTIMAGE
= powerpc-mkbootimage
472 TOOL_PWD_MKDB
= pwd_mkdb
474 TOOL_ROFF_ASCII
= nroff
475 TOOL_ROFF_DVI
= ${TOOL_GROFF} -Tdvi
476 TOOL_ROFF_HTML
= ${TOOL_GROFF} -Tlatin1
-mdoc2html
477 TOOL_ROFF_PS
= ${TOOL_GROFF} -Tps
478 TOOL_ROFF_RAW
= ${TOOL_GROFF} -Z
482 TOOL_SPARKCRC
= sparkcrc
484 TOOL_STRFILE
= strfile
485 TOOL_SUNLABEL
= sunlabel
488 TOOL_UUDECODE
= uudecode
489 TOOL_VGRIND
= vgrind
-f
492 .
endif # USETOOLS != yes # }
494 # Fallback to ensure that all variables are defined to something
496 TOOL_CPP.false
= false
497 TOOL_CXX.false
= false
499 TOOL_OBJC.false
= false
501 AVAILABLE_COMPILER?
= ${HAVE_PCC
:Dpcc
} ${HAVE_LLVM
:Dclang
} ${HAVE_GCC
:Dgcc
} false
503 .for _t in CC CPP CXX FC OBJC
504 ACTIVE_
${_t}= ${AVAILABLE_COMPILER
:@.c.@
${ !defined
(UNSUPPORTED_COMPILER.
${.c.
}) && defined
(TOOL_
${_t}.
${.c.
}) :?
${.c.
} : }@
:[1]}
505 SUPPORTED_
${_t}=${AVAILABLE_COMPILER
:Nfalse
:@.c.@
${ !defined
(UNSUPPORTED_COMPILER.
${.c.
}) && defined
(TOOL_
${_t}.
${.c.
}) :?
${.c.
} : }@
}
507 # make bugs prevent moving this into the .for loop
508 CC
= ${TOOL_CC.
${ACTIVE_CC}}
509 CPP
= ${TOOL_CPP.
${ACTIVE_CPP}}
510 CXX
= ${TOOL_CXX.
${ACTIVE_CXX}}
511 FC
= ${TOOL_FC.
${ACTIVE_FC}}
512 OBJC
= ${TOOL_OBJC.
${ACTIVE_OBJC}}
514 # OBJCOPY flags to create a.out binaries for old firmware
515 # shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
516 .if
${MACHINE_CPU} == "arm"
517 OBJCOPY_ELF2AOUT_FLAGS?
= \
518 -O a.out-arm-netbsd \
533 -R .note.netbsd.ident
537 # Targets to check if DESTDIR or RELEASEDIR is provided
539 .if
!target
(check_DESTDIR
)
540 check_DESTDIR
: .PHONY .NOTMAIN
541 .if
!defined
(DESTDIR
)
542 @echo
"setenv DESTDIR before doing that!"
549 .if
!target
(check_RELEASEDIR
)
550 check_RELEASEDIR
: .PHONY .NOTMAIN
551 .if
!defined
(RELEASEDIR
)
552 @echo
"setenv RELEASEDIR before doing that!"
560 # Build a dynamically linked /bin and /sbin, with the necessary shared
561 # libraries moved from /usr/lib to /lib and the shared linker moved
562 # from /usr/libexec to /lib
564 # Note that if the BINDIR is not /bin or /sbin, then we always use the
565 # non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
566 # and /sbin). See <bsd.shlib.mk>.
571 # Where the system object and source trees are kept; can be configurable
572 # by the user in case they want them in ~/foosrc and ~/fooobj (for example).
576 NETBSDSRCDIR?
= ${BSDSRCDIR}
583 # These are here mainly because we don't want suid root in case
584 # a Makefile defines BINMODE.
590 MANDIR?
= /usr
/share
/man
593 MANMODE?
= ${NONBINMODE}
594 MANINSTALL?
= ${_MANINSTALL}
596 INFODIR?
= /usr
/share
/info
599 INFOMODE?
= ${NONBINMODE}
603 LINTLIBDIR?
= /usr
/libdata
/lint
606 LIBMODE?
= ${NONBINMODE}
608 DOCDIR?
= /usr
/share
/doc
609 HTMLDOCDIR?
= /usr
/share
/doc
/html
612 DOCMODE?
= ${NONBINMODE}
614 NLSDIR?
= /usr
/share
/nls
617 NLSMODE?
= ${NONBINMODE}
621 KMODULEMODE?
= ${NONBINMODE}
623 LOCALEDIR?
= /usr
/share
/locale
626 LOCALEMODE?
= ${NONBINMODE}
628 FIRMWAREDIR?
= /libdata
/firmware
631 FIRMWAREMODE?
= ${NONBINMODE}
633 DEBUGDIR?
= /usr
/libdata
/debug
636 DEBUGMODE?
= ${NONBINMODE}
639 # Data-driven table using make variables to control how
640 # toolchain-dependent targets and shared libraries are built
641 # for different platforms and object formats.
643 # OBJECT_FMT: currently either "ELF" or "a.out".
645 # All platforms are ELF.
650 # If this platform's toolchain is missing, we obviously cannot build it.
652 .if
${TOOLCHAIN_MISSING} != "no"
659 # If we are using an external toolchain, we can still build the target's
660 # binutils, but we cannot build GCC's support libraries, since those are
661 # tightly-coupled to the version of GCC being used.
663 .if defined
(EXTERNAL_TOOLCHAIN
)
668 # The m68000 port is incomplete.
670 .if
${MACHINE_ARCH} == "m68000"
673 # XXX GCC 4 outputs mcount() calling sequences that try to load values
674 # from over 64KB away and this fails to assemble.
675 .if defined
(HAVE_GCC
)
681 # The ia64 port is incomplete.
683 .if
${MACHINE_ARCH} == "ia64"
689 # On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
690 # not just shared libraries, so don't build the _pic version.
692 .if
${MACHINE_ARCH} == "mipsel" ||
${MACHINE_ARCH} == "mipseb" || \
693 ${MACHINE_ARCH} == "mips64el" ||
${MACHINE_ARCH} == "mips64eb"
698 # On VAX using ELF, all objects are PIC, not just shared libraries,
699 # so don't build the _pic version.
701 .if
${MACHINE_ARCH} == "vax"
706 # Location of the file that contains the major and minor numbers of the
707 # version of a shared library. If this file exists a shared library
708 # will be built by <bsd.lib.mk>.
710 SHLIB_VERSION_FILE?
= ${.CURDIR
}/shlib_version
713 # GNU sources and packages sometimes see architecture names differently.
715 GNU_ARCH.coldfire
=m68k
717 GNU_ARCH.earmeb
=armeb
719 GCC_CONFIG_ARCH.i386
=i486
720 GCC_CONFIG_TUNE.i386
=nocona
721 GCC_CONFIG_TUNE.x86_64
=nocona
722 GNU_ARCH.m68000
=m68010
725 GNU_ARCH.mips64eb
=mips64
726 MACHINE_GNU_ARCH
=${GNU_ARCH.
${MACHINE_ARCH}:U
${MACHINE_ARCH}}
729 # In order to identify NetBSD to GNU packages, we sometimes need
730 # an "elf" tag for historically a.out platforms.
732 .if
${MACHINE_ARCH} == "earm" ||
${MACHINE_ARCH} == "earmeb"
733 MACHINE_GNU_PLATFORM?
=${MACHINE_GNU_ARCH}--netbsdelf-eabi
734 .elif
(${MACHINE_GNU_ARCH} == "arm" || \
735 ${MACHINE_GNU_ARCH} == "armeb" || \
736 ${MACHINE_ARCH} == "i386" || \
737 ${MACHINE_CPU} == "m68k" || \
738 ${MACHINE_GNU_ARCH} == "sh" || \
739 ${MACHINE_GNU_ARCH} == "shle" || \
740 ${MACHINE_ARCH} == "sparc" || \
741 ${MACHINE_ARCH} == "vax")
742 MACHINE_GNU_PLATFORM?
=${MACHINE_GNU_ARCH}--netbsdelf
744 MACHINE_GNU_PLATFORM?
=${MACHINE_GNU_ARCH}--netbsd
748 # Determine if arch uses native kernel modules with rump
750 .if
${MACHINE_ARCH} == "i386" || \
751 ${MACHINE_ARCH} == "x86_64"
755 TARGETS
+= all clean cleandir depend dependall includes \
756 install lint obj regress
tags html analyze
757 PHONY_NOTMAIN
= all clean cleandir depend dependall
distclean includes \
758 install lint obj regress beforedepend afterdepend \
759 beforeinstall afterinstall realinstall realdepend realall \
760 html subdir-all subdir-install subdir-depend analyze
761 .PHONY
: ${PHONY_NOTMAIN}
762 .NOTMAIN
: ${PHONY_NOTMAIN}
764 .if
${NEED_OWN_INSTALL_TARGET} != "no"
766 install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
772 all: realall subdir-all
775 depend
: realdepend subdir-depend
781 dependall
: .NOTMAIN realdepend .MAKE
782 @cd
"${.CURDIR}"; ${MAKE} realall
786 # Define MKxxx variables (which are either yes or no) for users
787 # to set in /etc/mk.conf and override in the make environment.
788 # These should be tested with `== "no"' or `!= "no"'.
789 # The NOxxx variables should only be set by Makefiles.
791 # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
792 # with changes to the MK* variables here.
796 # Supported NO* options (if defined, MK* will be forced to "no",
797 # regardless of user's mk.conf setting).
799 # Source makefiles should set NO*, and not MK*, and must do so before
800 # including bsd.own.mk.
803 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
804 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
806 MK
${var
:S
/^NO
//}:= no
811 # Older-style variables that enabled behaviour when set.
813 .for var in MANZ UNPRIVED UPDATE
820 # MK* options which have variable defaults.
822 .if
${MACHINE_ARCH} == "x86_64" ||
${MACHINE_ARCH} == "sparc64" || \
823 ${MACHINE_ARCH} == "mips64eb" ||
${MACHINE_ARCH} == "mips64el"
826 # Don't let this build where it really isn't supported.
830 #.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" || \
832 .if
${MACHINE} == "evbppc"
833 MKCOMPATMODULES?
= yes
839 # Default mips64 to softfloat now.
840 # emips is always softfloat.
842 .if
${MACHINE_ARCH} == "mips64eb" ||
${MACHINE_ARCH} == "mips64el" || \
843 ${MACHINE} == "emips"
847 .if
${MACHINE} == "emips"
852 # MK* backward compatibility.
855 MKBINUTILS?
= ${MKBFD}
859 # We want to build zfs only for i386 and amd64 by default for now.
861 .if
${MACHINE} == "amd64" ||
${MACHINE} == "i386"
865 # Some tough Minix defaults
871 # LSC MINIX does not support these features ATM.
897 # MK* options which default to "yes".
902 MKCRYPTO MKCOMPLEX MKCVS MKCXX \
904 MKGCC MKGCCCMDS MKGDB MKGROFF \
906 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
909 MKLDAP MKLINKLIB MKLINT MKLVM \
917 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
919 MKSHARE MKSKEY MKSTATICLIB \
925 MKMCONTEXT MKSYSDEBUG MKLIVEUPDATE MKSTATECTL MKTRACE
926 .if
(${MACHINE_ARCH} == "i386")
928 MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
931 .for var in
${_MKVARS.yes
}
936 # Exceptions to the above:
938 #.if ${MACHINE} == "evbppc"
943 # MK* options which default to "no". Note that MKZFS has a different
944 # default for some platforms, see above.
948 MKCATPAGES MKCRYPTO_RC5 MKDEBUG \
949 MKDEBUGLIB MKDTRACE MKEXTSRC \
954 MKSOFTFLOAT MKSTRIPIDENT \
955 MKUNPRIVED MKUPDATE MKX11 MKZFS
960 .if
(${MACHINE_ARCH} == "arm")
962 MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
965 .for var in
${_MKVARS.no
}
970 # Do we default to XFree86 or Xorg for this platform?
973 ${MACHINE} == "acorn32" || \
974 ${MACHINE} == "alpha" || \
975 ${MACHINE} == "amiga" || \
976 ${MACHINE} == "ews4800mips" || \
977 ${MACHINE} == "mac68k" || \
978 ${MACHINE} == "newsmips" || \
979 ${MACHINE} == "pmax" || \
980 ${MACHINE} == "sun3" || \
988 # Force some options off if their dependencies are off.
996 .if
${MKCRYPTO} == "no"
1001 .if
${MKMAN} == "no"
1006 _MANINSTALL
= maninstall
1007 .if
${MKCATPAGES} != "no"
1008 _MANINSTALL
+= catinstall
1010 .if
${MKHTML} != "no"
1011 _MANINSTALL
+= htmlinstall
1014 .if
${MKLINKLIB} == "no"
1020 .if
${MKPIC} == "no"
1024 .if
${MKOBJ} == "no"
1028 .if
${MKSHARE} == "no"
1038 .if
${MKSMALL} == "yes"
1051 # install(1) parameters.
1054 .if
${HOST_OSTYPE
:C
/\
-.
*//} != "Minix"
1055 .if
${MKUPDATE} == "no"
1058 #LSC: Not supported by MINIX install
1061 #XXX: Not supported by MINIX install
1067 METALOG?
= ${DESTDIR}/METALOG
1068 METALOG.add?
= ${TOOL_CAT} -l
>> ${METALOG}
1069 .if
(${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
1070 .if
${MKUNPRIVED} != "no"
1071 INSTPRIV.unpriv
=-U
-M
${METALOG} -D
${DESTDIR} -h sha256
1075 INSTPRIV?
= ${INSTPRIV.unpriv
} -N
${NETBSDSRCDIR}/etc
1079 .if
${NEED_OWN_INSTALL_TARGET} != "no"
1080 INSTALL_DIR?
= ${INSTALL} ${INSTPRIV} -d
1081 INSTALL_FILE?
= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
1082 INSTALL_LINK?
= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
1083 INSTALL_SYMLINK?
= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
1084 HOST_INSTALL_FILE?
= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
1085 HOST_INSTALL_DIR?
= ${INSTALL} -d
1086 HOST_INSTALL_SYMLINK?
= ${INSTALL} ${SYMLINK} ${RENAME}
1090 # Set defaults for the USE_xxx variables.
1094 # USE_* options which default to "no" and will be forced to "no" if their
1095 # corresponding MK* variable is set to "no".
1097 .for var in USE_SKEY
1098 .if
(${${var
:S
/USE_
/MK
/}} == "no")
1106 # USE_* options which default to "yes" unless their corresponding MK*
1107 # variable is set to "no".
1109 .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1110 .if
(${${var
:S
/USE_
/MK
/}} == "no")
1117 #MINIX-specific vars
1119 USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT USE_DEBUGREG USE_SYSDEBUG \
1120 USE_LIVEUPDATE USE_STATECTL USE_TRACE USE_PCI
1121 .if
(${${var
:S
/USE_
/MK
/}} == "no")
1129 # USE_* options which default to "yes".
1131 .for var in USE_JEMALLOC
1136 # USE_* options which default to "no".
1138 # For now, disable pigz as compressor by default
1139 .for var in USE_PIGZGZIP USE_LIBTRE
1143 .if
${USE_PIGZGZIP} != "no"
1144 TOOL_GZIP
= ${TOOL_PIGZ}
1150 # Where X11 sources are and where it is installed to.
1152 .if
!defined
(X11SRCDIR
)
1153 .if exists
(${NETBSDSRCDIR}/..
/xsrc
)
1154 X11SRCDIR
!= cd
"${NETBSDSRCDIR}/../xsrc" && pwd
1156 X11SRCDIR
= /usr
/xsrc
1158 .
endif # !defined(X11SRCDIR)
1160 X11SRCDIR.xc?
= ${X11SRCDIR}/xfree
/xc
1161 X11SRCDIR.local?
= ${X11SRCDIR}/local
1162 .if
${X11FLAVOUR} == "Xorg"
1163 X11ROOTDIR?
= /usr
/X11R7
1165 X11ROOTDIR?
= /usr
/X11R6
1167 X11BINDIR?
= ${X11ROOTDIR}/bin
1168 X11ETCDIR?
= /etc
/X11
1169 X11FONTDIR?
= ${X11ROOTDIR}/lib
/X11
/fonts
1170 X11INCDIR?
= ${X11ROOTDIR}/include
1171 X11LIBDIR?
= ${X11ROOTDIR}/lib
/X11
1172 X11MANDIR?
= ${X11ROOTDIR}/man
1173 X11SHAREDIR?
= ${X11ROOTDIR}/share
1174 X11USRLIBDIR?
= ${X11ROOTDIR}/lib
1177 # New modular-xorg based builds
1179 X11SRCDIRMIT?
= ${X11SRCDIR}/external
/mit
1181 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
1182 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpm \
1183 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
1184 fontenc xkbfile xkbui Xaw lbxutil Xfontcache pciaccess xcb
1185 X11SRCDIR.
${_lib}?
= ${X11SRCDIRMIT}/lib
${_lib}/dist
1189 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
1190 xinerama dri2 render resource record video xf86dga xf86misc \
1191 xf86vidmode composite damage trap gl randr fontcache xf86dri \
1193 X11SRCDIR.
${_proto}proto?
= ${X11SRCDIRMIT}/${_proto}proto
/dist
1197 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
1198 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata xkeyboard-config \
1199 xbitmaps appres xeyes xev xedit sessreg pixman \
1200 beforelight bitmap editres makedepend fonttosfnt fslsfonts \
1201 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
1202 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
1203 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
1204 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
1205 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
1206 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
1207 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
1208 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
1209 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
1210 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
1211 xkeyboard-config xinput xcb-util \
1212 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
1213 font-adobe-utopia-75dpi font-adobe-utopia-type1 \
1215 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
1216 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
1217 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
1218 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
1219 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1220 font-sony-misc font-util ttf-bitstream-vera encodings
1221 X11SRCDIR.
${_dir}?
= ${X11SRCDIRMIT}/${_dir}/dist
1225 elographics keyboard mouse synaptics vmmouse void ws
1226 X11SRCDIR.xf86-input-
${_i}?
= ${X11SRCDIRMIT}/xf86-input-
${_i}/dist
1230 ag10e apm ark ast ati chips cirrus crime \
1231 geode glint i128 i740 igs imstt intel mach64 mga \
1232 neomagic newport nsc nv nvxbox openchrome pnozz \
1233 r128 radeonhd rendition \
1234 s3 s3virge savage siliconmotion sis suncg14 \
1235 suncg6 sunffb sunleo suntcx \
1236 tdfx tga trident tseng vesa vga via vmware wsfb xgi
1237 X11SRCDIR.xf86-video-
${_v}?
= ${X11SRCDIRMIT}/xf86-video-
${_v}/dist
1240 .if
${X11FLAVOUR} == "Xorg"
1249 # Where extsrc sources are and where it is installed to.
1251 .if
!defined
(EXTSRCSRCDIR
)
1252 .if exists
(${NETBSDSRCDIR}/..
/extsrc
)
1253 EXTSRCSRCDIR
!= cd
"${NETBSDSRCDIR}/../extsrc" && pwd
1255 EXTSRCSRCDIR
= /usr
/extsrc
1257 .
endif # !defined(EXTSRCSRCDIR)
1259 EXTSRCROOTDIR?
= /usr
/ext
1260 EXTSRCBINDIR?
= ${EXTSRCROOTDIR}/bin
1261 EXTSRCETCDIR?
= /etc
/ext
1262 EXTSRCINCDIR?
= ${EXTSRCROOTDIR}/include
1263 EXTSRCLIBDIR?
= ${EXTSRCROOTDIR}/lib
/ext
1264 EXTSRCMANDIR?
= ${EXTSRCROOTDIR}/man
1265 EXTSRCUSRLIBDIR?
= ${EXTSRCROOTDIR}/lib
1268 # MAKEDIRTARGET dir target [extra make(1) params]
1269 # run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message
1273 @_makedirtarget
() { \
1275 target
="$$1"; shift
; \
1277 /*) this
="$${dir}/"; \
1279 .
) this
="${_THISDIR_}"; \
1280 real
="${.CURDIR}" ;; \
1281 *) this
="${_THISDIR_}$${dir}/"; \
1282 real
="${.CURDIR}/$${dir}" ;; \
1285 echo
"$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
1287 && ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_
="$${this}" "$$@" $${target}; \
1292 # MAKEVERBOSE support. Levels are:
1293 # 0 Minimal output ("quiet")
1294 # 1 Describe what is occurring
1295 # 2 Describe what is occurring and echo the actual command
1296 # 3 Ignore the effect of the "@" prefix in make commands
1297 # 4 Trace shell commands using the shell's -x flag
1301 .if
${MAKEVERBOSE} == 0
1306 .elif
${MAKEVERBOSE} == 1
1311 .
else # MAKEVERBOSE >= 2
1312 _MKMSG?
= @echo
'\# '
1313 _MKSHMSG?
= echo
'\# '
1315 .SILENT
: __makeverbose_dummy_target__
1316 .
endif # MAKEVERBOSE >= 2
1317 .if
${MAKEVERBOSE} >= 3
1319 .
endif # ${MAKEVERBOSE} >= 3
1320 .if
${MAKEVERBOSE} >= 4
1322 .
endif # ${MAKEVERBOSE} >= 4
1324 _MKMSG_BUILD?
= ${_MKMSG} " build "
1325 _MKMSG_CREATE?
= ${_MKMSG} " create "
1326 _MKMSG_COMPILE?
= ${_MKMSG} "compile "
1327 _MKMSG_FORMAT?
= ${_MKMSG} " format "
1328 _MKMSG_INSTALL?
= ${_MKMSG} "install "
1329 _MKMSG_LINK?
= ${_MKMSG} " link "
1330 _MKMSG_LEX?
= ${_MKMSG} " lex "
1331 _MKMSG_REMOVE?
= ${_MKMSG} " remove "
1332 _MKMSG_YACC?
= ${_MKMSG} " yacc "
1334 _MKSHMSG_CREATE?
= ${_MKSHMSG} " create "
1335 _MKSHMSG_INSTALL?
= ${_MKSHMSG} "install "
1337 _MKTARGET_BUILD?
= ${_MKMSG_BUILD} ${.CURDIR
:T
}/${.TARGET
}
1338 _MKTARGET_CREATE?
= ${_MKMSG_CREATE} ${.CURDIR
:T
}/${.TARGET
}
1339 _MKTARGET_COMPILE?
= ${_MKMSG_COMPILE} ${.CURDIR
:T
}/${.TARGET
}
1340 _MKTARGET_FORMAT?
= ${_MKMSG_FORMAT} ${.CURDIR
:T
}/${.TARGET
}
1341 _MKTARGET_INSTALL?
= ${_MKMSG_INSTALL} ${.TARGET
}
1342 _MKTARGET_LINK?
= ${_MKMSG_LINK} ${.CURDIR
:T
}/${.TARGET
}
1343 _MKTARGET_LEX?
= ${_MKMSG_LEX} ${.CURDIR
:T
}/${.TARGET
}
1344 _MKTARGET_REMOVE?
= ${_MKMSG_REMOVE} ${.TARGET
}
1345 _MKTARGET_YACC?
= ${_MKMSG_YACC} ${.CURDIR
:T
}/${.TARGET
}
1347 .if
${MKMANDOC} == "yes"
1348 TARGETS
+= lintmanpages
1351 TESTSBASE
= /usr
/tests
1353 .
endif # !defined(_BSD_OWN_MK_)