Home | History | Annotate | Line # | Download | only in kern
      1  1.18  christos #	$NetBSD: Makefile,v 1.18 2015/03/07 16:38:07 christos Exp $
      2   1.6     perry #
      3   1.6     perry #	from: @(#)Makefile	8.2 (Berkeley) 3/21/94
      4   1.1       cgd 
      5   1.1       cgd # Makefile for kernel tags files, init_sysent, etc.
      6   1.1       cgd 
      7  1.17  christos .include <bsd.own.mk>		# for HOST_SH
      8  1.11     lukem 
      9   1.1       cgd all:
     10   1.5       cgd 	@echo "make tags, links, init_sysent.c, or vnode_if.c only"
     11   1.5       cgd 	@false
     12   1.1       cgd 
     13   1.2       cgd SYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
     14  1.18  christos init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
     15  1.11     lukem 	${HOST_SH} makesyscalls.sh syscalls.conf syscalls.master
     16   1.5       cgd 
     17   1.5       cgd VNODEIFSRC = vnode_if.sh vnode_if.src
     18   1.5       cgd vnode_if.c ../sys/vnode_if.h: ${VNODEIFSRC}
     19  1.11     lukem 	${HOST_SH} vnode_if.sh vnode_if.src
     20   1.1       cgd 
     21  1.16    dyoung subr_vmem: subr_vmem.c
     22  1.16    dyoung 	$(CC) -DVMEM_SANITY -g -Wall -o subr_vmem subr_vmem.c
     23   1.7     perry 
     24   1.1       cgd # Kernel tags:
     25   1.1       cgd # Tags files are built in the top-level directory for each architecture,
     26   1.1       cgd # with a makefile listing the architecture-dependent files, etc.  The list
     27   1.1       cgd # of common files is in ./Make.tags.inc.  Links to the correct tags file
     28   1.1       cgd # are placed in each source directory.  We need to have links to tags files
     29   1.1       cgd # from the generic directories that are relative to the machine type, even
     30   1.1       cgd # via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
     31   1.8     perry # ${SYSDIR}/arch/${MACHINE}/tags.
     32   1.7     perry 
     33   1.8     perry # Note: only a couple of architectures are currently working right. Add more
     34   1.8     perry # to ARCH as you fix them. Use the i386 as a model.
     35   1.8     perry 
     36   1.8     perry ARCH=	i386 mac68k
     37   1.1       cgd 
     38   1.1       cgd SYSTAGS=/var/db/sys_tags
     39  1.10     jhawk SYSDIR=..
     40   1.1       cgd 
     41   1.8     perry .ifmake links
     42   1.8     perry # Directories in which to place tags links (other than machine-dependent):
     43   1.8     perry # The invocation below returns every directory that contains sources, the idea
     44  1.13     perry # being, in the face of a constantly varying source tree, that this will be
     45   1.8     perry # easier to maintain than a fixed list.
     46  1.10     jhawk DGEN!=	(cd ${SYSDIR};							\
     47  1.10     jhawk 	    find -H . -name arch -prune -o -name "*.[chs]" -print |	\
     48  1.15       apb 	    ${TOOL_SED} -e 's@^\./@@' -e 's@/[^/]*\..*@@' | sort -t / -u )
     49   1.8     perry .endif
     50   1.1       cgd 
     51   1.1       cgd tags::
     52   1.1       cgd 	-for i in ${ARCH}; do \
     53   1.9     jhawk 	    (cd ../arch/$$i && ${MAKE} ${MFLAGS} tags); done
     54   1.1       cgd 
     55   1.1       cgd links::
     56   1.1       cgd 	rm -f ${SYSTAGS}
     57   1.8     perry 	ln -s ${SYSDIR}/arch/${MACHINE}/tags ${SYSTAGS}
     58   1.1       cgd 	-for i in ${DGEN}; do \
     59   1.8     perry 	    (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }); done
     60   1.1       cgd 	-for i in ${ARCH}; do \
     61   1.9     jhawk 	    (cd ../arch/$$i && ${MAKE} ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
     62  1.17  christos 
     63  1.17  christos .include <bsd.files.mk>
     64