xref: /freebsd/sys/Makefile (revision 1829d5da5355930d5cfa8ec8add8ff47dc0bebab)
1# $FreeBSD$
2
3.include <bsd.own.mk>
4
5# The boot loader
6.if ${MK_BOOT} != "no"
7SUBDIR=	boot
8.endif
9
10# Directories to include in cscope name file and TAGS.
11CSCOPEDIRS=	boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
12		geom gnu isa kern libkern modules net net80211 netatalk \
13		netgraph netinet netinet6 netipsec netipx netnatm netncp \
14		netsmb nfs nfs4client nfsclient nfsserver nlm opencrypto \
15		pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR}
16.if defined(ALL_ARCH)
17CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
18.else
19CSCOPE_ARCHDIR ?= ${MACHINE}
20.endif
21
22# Loadable kernel modules
23
24.if defined(MODULES_WITH_WORLD)
25SUBDIR+=modules
26.endif
27
28HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
29
30# You need the devel/cscope port for this.
31cscope: cscope.out
32cscope.out: ${.CURDIR}/cscope.files
33	cd ${.CURDIR}; cscope -k -buq -p4
34
35${.CURDIR}/cscope.files: .PHONY
36	cd ${.CURDIR}; \
37		find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET}
38
39cscope-clean:
40	rm -f cscope.files cscope.out cscope.in.out cscope.po.out
41
42# You need the devel/global and one of editor/emacs* ports for that.
43TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
44	rm -f ${.CURDIR}/TAGS
45	cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
46
47# You need the textproc/glimpse ports for this.
48glimpse:
49.if !exists(${.CURDIR}/.glimpse_exclude)
50	echo .svn > ${.CURDIR}/.glimpse_exclude
51	echo /compile/ >> ${.CURDIR}/.glimpse_exclude
52.endif
53	cd ${.CURDIR}; glimpseindex -H . -B -f -o .
54
55glimpse-clean:
56	cd ${.CURDIR}; rm -f .glimpse_*
57
58.include <bsd.subdir.mk>
59