11.18Schristos# $NetBSD: Makefile,v 1.18 2015/03/07 16:38:07 christos Exp $ 21.6Sperry# 31.6Sperry# from: @(#)Makefile 8.2 (Berkeley) 3/21/94 41.1Scgd 51.1Scgd# Makefile for kernel tags files, init_sysent, etc. 61.1Scgd 71.17Schristos.include <bsd.own.mk> # for HOST_SH 81.11Slukem 91.1Scgdall: 101.5Scgd @echo "make tags, links, init_sysent.c, or vnode_if.c only" 111.5Scgd @false 121.1Scgd 131.2ScgdSYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master 141.18Schristosinit_sysent.c syscalls.c systrace_args.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC} 151.11Slukem ${HOST_SH} makesyscalls.sh syscalls.conf syscalls.master 161.5Scgd 171.5ScgdVNODEIFSRC = vnode_if.sh vnode_if.src 181.5Scgdvnode_if.c ../sys/vnode_if.h: ${VNODEIFSRC} 191.11Slukem ${HOST_SH} vnode_if.sh vnode_if.src 201.1Scgd 211.16Sdyoungsubr_vmem: subr_vmem.c 221.16Sdyoung $(CC) -DVMEM_SANITY -g -Wall -o subr_vmem subr_vmem.c 231.7Sperry 241.1Scgd# Kernel tags: 251.1Scgd# Tags files are built in the top-level directory for each architecture, 261.1Scgd# with a makefile listing the architecture-dependent files, etc. The list 271.1Scgd# of common files is in ./Make.tags.inc. Links to the correct tags file 281.1Scgd# are placed in each source directory. We need to have links to tags files 291.1Scgd# from the generic directories that are relative to the machine type, even 301.1Scgd# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at 311.8Sperry# ${SYSDIR}/arch/${MACHINE}/tags. 321.7Sperry 331.8Sperry# Note: only a couple of architectures are currently working right. Add more 341.8Sperry# to ARCH as you fix them. Use the i386 as a model. 351.8Sperry 361.8SperryARCH= i386 mac68k 371.1Scgd 381.1ScgdSYSTAGS=/var/db/sys_tags 391.10SjhawkSYSDIR=.. 401.1Scgd 411.8Sperry.ifmake links 421.8Sperry# Directories in which to place tags links (other than machine-dependent): 431.8Sperry# The invocation below returns every directory that contains sources, the idea 441.13Sperry# being, in the face of a constantly varying source tree, that this will be 451.8Sperry# easier to maintain than a fixed list. 461.10SjhawkDGEN!= (cd ${SYSDIR}; \ 471.10Sjhawk find -H . -name arch -prune -o -name "*.[chs]" -print | \ 481.15Sapb ${TOOL_SED} -e 's@^\./@@' -e 's@/[^/]*\..*@@' | sort -t / -u ) 491.8Sperry.endif 501.1Scgd 511.1Scgdtags:: 521.1Scgd -for i in ${ARCH}; do \ 531.9Sjhawk (cd ../arch/$$i && ${MAKE} ${MFLAGS} tags); done 541.1Scgd 551.1Scgdlinks:: 561.1Scgd rm -f ${SYSTAGS} 571.8Sperry ln -s ${SYSDIR}/arch/${MACHINE}/tags ${SYSTAGS} 581.1Scgd -for i in ${DGEN}; do \ 591.8Sperry (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }); done 601.1Scgd -for i in ${ARCH}; do \ 611.9Sjhawk (cd ../arch/$$i && ${MAKE} ${MFLAGS} SYSTAGS=${SYSTAGS} links); done 621.17Schristos 631.17Schristos.include <bsd.files.mk> 64