003 File Manager
Current Path:
/usr/src/share/mk
usr
/
src
/
share
/
mk
/
📁
..
📄
Makefile
(1.69 KB)
📄
atf.test.mk
(3.21 KB)
📄
auto.obj.mk
(2.43 KB)
📄
bsd.README
(24.31 KB)
📄
bsd.arch.inc.mk
(387 B)
📄
bsd.clang-analyze.mk
(3 KB)
📄
bsd.compat.mk
(4.35 KB)
📄
bsd.compiler.mk
(9.02 KB)
📄
bsd.confs.mk
(3.82 KB)
📄
bsd.cpu.mk
(13.73 KB)
📄
bsd.crunchgen.mk
(5.72 KB)
📄
bsd.dep.mk
(10.71 KB)
📄
bsd.dirs.mk
(1.75 KB)
📄
bsd.doc.mk
(4.55 KB)
📄
bsd.dtb.mk
(94 B)
📄
bsd.endian.mk
(663 B)
📄
bsd.files.mk
(3.94 KB)
📄
bsd.incs.mk
(3.2 KB)
📄
bsd.info.mk
(5.32 KB)
📄
bsd.init.mk
(2.97 KB)
📄
bsd.kmod.mk
(72 B)
📄
bsd.lib.mk
(16.53 KB)
📄
bsd.libnames.mk
(9.23 KB)
📄
bsd.linker.mk
(4.29 KB)
📄
bsd.links.mk
(501 B)
📄
bsd.man.mk
(6.35 KB)
📄
bsd.mkopt.mk
(2.48 KB)
📄
bsd.nls.mk
(1.93 KB)
📄
bsd.obj.mk
(6.5 KB)
📄
bsd.opts.mk
(3.2 KB)
📄
bsd.own.mk
(6.56 KB)
📄
bsd.port.mk
(804 B)
📄
bsd.port.options.mk
(92 B)
📄
bsd.port.post.mk
(74 B)
📄
bsd.port.pre.mk
(76 B)
📄
bsd.port.subdir.mk
(594 B)
📄
bsd.prog.mk
(9.12 KB)
📄
bsd.progs.mk
(4.67 KB)
📄
bsd.snmpmod.mk
(1.23 KB)
📄
bsd.subdir.mk
(6.15 KB)
📄
bsd.suffixes-posix.mk
(1016 B)
📄
bsd.suffixes.mk
(2.37 KB)
📄
bsd.symver.mk
(1.09 KB)
📄
bsd.sys.mk
(13.4 KB)
📄
bsd.sysdir.mk
(528 B)
📄
bsd.test.mk
(3.11 KB)
📄
dirdeps-options.mk
(2.92 KB)
📄
dirdeps-targets.mk
(5.21 KB)
📄
dirdeps.mk
(28.55 KB)
📄
gendirdeps.mk
(12.04 KB)
📄
googletest.test.inc.mk
(807 B)
📄
googletest.test.mk
(1.32 KB)
📄
host-target.mk
(1.29 KB)
📄
install-new.mk
(1.7 KB)
📄
kmod.opts.mk
(77 B)
📄
local.autodep.mk
(624 B)
📄
local.dirdeps-options.mk
(670 B)
📄
local.dirdeps.mk
(6.02 KB)
📄
local.gendirdeps.mk
(1.77 KB)
📄
local.init.mk
(1.11 KB)
📄
local.meta.sys.mk
(7.49 KB)
📄
local.sys.env.mk
(1.53 KB)
📄
local.sys.mk
(2.5 KB)
📄
meta.autodep.mk
(9.42 KB)
📄
meta.stage.mk
(11.02 KB)
📄
meta.subdir.mk
(2.13 KB)
📄
meta.sys.mk
(4.04 KB)
📄
meta2deps.py
(23.87 KB)
📄
meta2deps.sh
(9.44 KB)
📄
netbsd-tests.test.mk
(888 B)
📄
plain.test.mk
(1.95 KB)
📄
src.init.mk
(213 B)
📄
src.libnames.mk
(17.02 KB)
📄
src.lua.mk
(1.35 KB)
📄
src.opts.mk
(11.26 KB)
📄
src.sys.env.mk
(2.63 KB)
📄
src.sys.mk
(1.65 KB)
📄
src.sys.obj.mk
(7.11 KB)
📄
src.tools.mk
(880 B)
📄
stage-install.sh
(2.1 KB)
📄
suite.test.mk
(3.97 KB)
📄
sys.dependfile.mk
(2.1 KB)
📄
sys.mk
(8.45 KB)
📄
tap.test.mk
(2.79 KB)
📄
version_gen.awk
(6.37 KB)
Editing: bsd.crunchgen.mk
################################################################# # # Generate crunched binaries using crunchgen(1). # # General notes: # # A number of Make variables are used to generate the crunchgen config file. # # CRUNCH_SRCDIRS: lists directories to search for included programs # CRUNCH_PROGS: lists programs to be included # CRUNCH_LIBS: libraries to statically link with # CRUNCH_SHLIBS: libraries to dynamically link with # CRUNCH_BUILDOPTS: generic build options to be added to every program # CRUNCH_BUILDTOOLS: lists programs that need build tools built in the # local architecture. # # Special options can be specified for individual programs # CRUNCH_SRCDIR_${P}: base source directory for program ${P} # CRUNCH_BUILDOPTS_${P}: additional build options for ${P} # CRUNCH_ALIAS_${P}: additional names to be used for ${P} # # By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} # will be used to generate a hard link to the resulting binary. # Specific links can be suppressed by setting # CRUNCH_SUPPRESS_LINK_${NAME} to 1. # # If CRUNCH_GENERATE_LINKS is set to no, no links will be generated. # # $FreeBSD$ ################################################################## # The following is pretty nearly a generic crunchgen-handling makefile # CONF= ${PROG}.conf OUTMK= ${PROG}.mk OUTC= ${PROG}.c OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} CRUNCH_GENERATE_LINKS?= yes # Don't let the prog.mk use MK_AUTO_OBJ, but do let the component builds use # it. CRUNCHARGS+= MK_AUTO_OBJ=no CRUNCH_BUILDOPTS+= MK_AUTO_OBJ=${MK_AUTO_OBJ} CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. MK_DEBUG_FILES= no # Set a default SRCDIR for each for simpler handling below. .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} CRUNCH_SRCDIR_${P}?= ${.CURDIR}/../../${D}/${P} .endfor .endfor # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} ${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} .endif .for A in ${CRUNCH_ALIAS_${P}} .ifndef CRUNCH_SUPPRESS_LINK_${A} LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endif .endfor .endif .endfor .endfor .if !defined(_SKIP_BUILD) all: ${PROG} .endif exe: ${PROG} ${CONF}: Makefile echo \# Auto-generated, do not edit >${.TARGET} .ifdef CRUNCH_BUILDOPTS echo buildopts ${CRUNCH_BUILDOPTS} >>${.TARGET} .endif .ifdef CRUNCH_LIBS echo libs ${CRUNCH_LIBS} >>${.TARGET} .endif .ifdef CRUNCH_SHLIBS echo libs_so ${CRUNCH_SHLIBS} >>${.TARGET} .endif .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} echo progs ${P} >>${.TARGET} echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} .ifdef CRUNCH_BUILDOPTS_${P} echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} .else echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ >>${.TARGET} .endif .ifdef CRUNCH_LIBS_${P} echo special ${P} lib ${CRUNCH_LIBS_${P}} >>${.TARGET} .endif .for A in ${CRUNCH_ALIAS_${P}} echo ln ${P} ${A} >>${.TARGET} .endfor .endfor .endfor CRUNCHGEN?= crunchgen CRUNCHENV+= MK_TESTS=no \ UPDATE_DEPENDFILE=no \ _RECURSING_CRUNCH=1 .ORDER: ${OUTPUTS} objs ${OUTPUTS:[1]}: .META ${OUTPUTS:[2..-1]}: .NOMETA ${OUTPUTS}: ${CONF} MAKE="${MAKE}" ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \ MK_AUTO_OBJ=${MK_AUTO_OBJ} \ ${CRUNCHGEN} -fq -m ${OUTMK} -c ${OUTC} ${CONF} # Avoid redundantly calling 'make objs' which we've done by our # own dependencies. sed -i '' \ -e "s/^\(${PROG}:.*\) \$$(SUBMAKE_TARGETS)/\1/" \ ${OUTMK} # These 2 targets cannot use .MAKE since they depend on the generated # ${OUTMK} above. ${PROG}: ${OUTPUTS} objs .NOMETA .PHONY ${CRUNCHENV} \ CC="${CC} ${CFLAGS} ${LDFLAGS}" \ CXX="${CXX} ${CXXFLAGS} ${LDFLAGS}" \ ${MAKE} ${CRUNCHARGS} .MAKE.MODE="${.MAKE.MODE} curdirOk=yes" \ .MAKE.META.IGNORE_PATHS="${.MAKE.META.IGNORE_PATHS}" \ -f ${OUTMK} exe objs: ${OUTMK} .META ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \ ${MAKE} -f ${OUTMK} ${CRUNCHARGS} BUILD_TOOLS_META=.NOMETA objs # <sigh> Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. .for _tool in ${CRUNCH_BUILDTOOLS} build-tools-${_tool}: ${_+_}cd ${.CURDIR}/../../${_tool}; \ if [ "${MK_AUTO_OBJ}" = "no" ]; then \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ fi; \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools build-tools: build-tools-${_tool} .endfor # Use a separate build tree to hold files compiled for this crunchgen binary # Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. .if ${MK_AUTO_OBJ} == "no" _obj= obj .endif .for __target in clean cleandepend cleandir ${_obj} objlink .for D in ${CRUNCH_SRCDIRS} .for P in ${CRUNCH_PROGS_${D}} ${__target}_crunchdir_${P}: .PHONY .MAKE ${_+_}cd ${CRUNCH_SRCDIR_${P}} && \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ ${CRUNCHARGS} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} \ ${CRUNCH_BUILDOPTS_${P}} ${__target} ${__target}: ${__target}_crunchdir_${P} .endfor .endfor .endfor clean: rm -f ${CLEANFILES} ${_+_}if [ -e ${.OBJDIR}/${OUTMK} ]; then \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} \ -f ${OUTMK} clean; \ fi META_XTRAS+= ${find ${CRUNCHOBJS}${SRCTOP} -name '*.meta' 2>/dev/null || true:L:sh} META_XTRAS+= ${echo ${CRUNCHOBJS}/*.lo.meta 2>/dev/null || true:L:sh} META_XTRAS+= ${PROG}.meta
Upload File
Create Folder