freebsd-skq/sbin/Makefile
Dimitry Andric 54ff5d7323 Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

                before    stddev       after    stddev
                =======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by:	jilles
MFC after:	2 weeks
2014-03-26 22:30:38 +00:00

132 lines
1.5 KiB
Makefile

# @(#)Makefile 8.5 (Berkeley) 3/31/94
# $FreeBSD$
.include <bsd.own.mk>
# XXX MISSING: icheck ncheck
SUBDIR=adjkerntz \
badsect \
camcontrol \
ccdconfig \
clri \
comcontrol \
conscontrol \
ddb \
devfs \
dhclient \
dmesg \
dump \
dumpfs \
dumpon \
etherswitchcfg \
ffsinfo \
fsck \
fsck_ffs \
fsck_msdosfs \
fsdb \
fsirand \
gbde \
geom \
ggate \
growfs \
gvinum \
hastctl \
hastd \
ifconfig \
init \
iscontrol \
kldconfig \
kldload \
kldstat \
kldunload \
ldconfig \
md5 \
mdconfig \
mdmfs \
mknod \
mksnap_ffs \
mount \
mount_cd9660 \
mount_fusefs \
mount_msdosfs \
mount_nfs \
mount_nullfs \
mount_udf \
mount_unionfs \
newfs \
newfs_msdos \
nfsiod \
nos-tun \
ping \
rcorder \
reboot \
recoverdisk \
resolvconf \
restore \
route \
savecore \
setkey \
shutdown \
spppcontrol \
swapon \
sysctl \
tunefs \
umount
.if ${MK_ATM} != "no"
SUBDIR+= atm
.endif
.if ${MK_CASPER} != "no"
SUBDIR+= casperd
.endif
.if ${MK_CXX} != "no"
SUBDIR+= devd
.endif
.if ${MK_IPFILTER} != "no"
SUBDIR+= ipf
.endif
.if ${MK_IPFW} != "no"
SUBDIR+= ipfw
SUBDIR+= natd
.endif
.if ${MK_NAND} != "no"
SUBDIR+= nandfs
SUBDIR+= newfs_nandfs
.endif
.if ${MK_PF} != "no"
SUBDIR+= pfctl
SUBDIR+= pflogd
.endif
.if ${MK_INET6} != "no"
SUBDIR+= ping6
SUBDIR+= rtsol
.endif
.if ${MK_QUOTAS} != "no"
SUBDIR+= quotacheck
.endif
.if ${MK_ROUTED} != "no"
SUBDIR+= routed
.endif
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.arch.inc.mk>
SUBDIR:= ${SUBDIR:O}
SUBDIR_PARALLEL=
.include <bsd.subdir.mk>