xref: /freebsd/sys/amd64/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1# Makefile for amd64 links, tags file
2
3# SYS is normally set in Make.tags.inc
4SYS=/sys
5
6TAGDIR=	amd64
7
8.include "../kern/Make.tags.inc"
9
10all:
11	@echo "make links or tags only"
12
13# Directories in which to place amd64 tags links
14DAMD64=	acpica amd64 ia32 include linux linux32 pci sgx vmm
15
16links::
17	-for i in ${COMMDIR1}; do \
18	    (cd $$i && { rm -f tags; ln -s ../${TAGDIR}/tags tags; }) done
19	-for i in ${COMMDIR2}; do \
20	    (cd $$i && { rm -f tags; ln -s ../../${TAGDIR}/tags tags; }) done
21	-for i in ${DAMD64}; do \
22	    (cd ${SYS}/amd64/$$i && { rm -f tags; ln -s ../tags tags; }) done
23
24SAMD64=	${SYS}/amd64/acpica/*.[ch] \
25	${SYS}/amd64/amd64/*.[ch] ${SYS}/amd64/ia32/*.[ch] \
26	${SYS}/amd64/include/*.[ch] ${SYS}/amd64/linux/*.[ch] \
27	${SYS}/amd64/linux32/*.[ch] ${SYS}/amd64/pci/*.[ch] \
28	${SYS}/amd64/sgx/*.[ch] ${SYS}/amd64/vmm/*.[ch]
29AAMD64=	${SYS}/amd64/amd64/*.S
30
31tags::
32	-ctags -wdt ${COMM} ${SAMD64}
33	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AAMD64} | \
34	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
35		>> tags
36	sort -o tags tags
37	chmod 444 tags
38	rm -f ${SYS}/amd64/tags
39	mv tags ${SYS}/amd64/tags
40