Home | History | Annotate | Line # | Download | only in conf
Makefile.kern.inc revision 1.3.2.10
      1  1.3.2.10  nathanw #	$NetBSD: Makefile.kern.inc,v 1.3.2.10 2002/11/11 22:08:23 nathanw Exp $
      2   1.3.2.2  nathanw #
      3   1.3.2.2  nathanw # This file contains common `MI' targets and definitions and it is included
      4   1.3.2.2  nathanw # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. There are
      5   1.3.2.2  nathanw # many `MI' definitions that should end up in here, but they are not yet.
      6   1.3.2.2  nathanw #
      7   1.3.2.2  nathanw # Each target in this file should be protected with `if !target(target)'
      8   1.3.2.2  nathanw # or `if !commands(target)' and each variable should only be conditionally
      9   1.3.2.2  nathanw # assigned `VAR ?= VALUE', so that everything can be overriden.
     10   1.3.2.2  nathanw #
     11   1.3.2.2  nathanw # DEBUG is set to -g if debugging.
     12   1.3.2.2  nathanw # PROF is set to -pg if profiling.
     13   1.3.2.2  nathanw #
     14   1.3.2.2  nathanw # To specify debugging, add the config line: makeoptions DEBUG="-g"
     15   1.3.2.2  nathanw # A better way is to specify -g only for a few files.
     16   1.3.2.2  nathanw #
     17   1.3.2.2  nathanw #	makeoptions DEBUGLIST="uvm* trap if_*"
     18   1.3.2.2  nathanw #
     19   1.3.2.2  nathanw # all ports are expected to include bsd.own.mk for toolchain settings
     20   1.3.2.2  nathanw 
     21   1.3.2.2  nathanw ##
     22   1.3.2.2  nathanw ## (0) toolchain settings for things that aren't part of the standard
     23   1.3.2.2  nathanw ## toolchain
     24   1.3.2.2  nathanw ##
     25   1.3.2.5  nathanw DBSYM?=		dbsym
     26   1.3.2.2  nathanw MKDEP?=		mkdep
     27   1.3.2.2  nathanw STRIP?=		strip
     28   1.3.2.2  nathanw OBJCOPY?=	objcopy
     29   1.3.2.2  nathanw OBJDUMP?=	objdump
     30   1.3.2.5  nathanw CSCOPE?=	cscope
     31   1.3.2.5  nathanw MKID?=		mkid
     32   1.3.2.4  nathanw .MAKEOVERRIDES+=USETOOLS	# make sure proper value is propagated
     33   1.3.2.2  nathanw 
     34   1.3.2.2  nathanw ##
     35   1.3.2.2  nathanw ## (1) port independent source tree identification
     36   1.3.2.2  nathanw ##
     37   1.3.2.2  nathanw # source tree is located via $S relative to the compilation directory
     38   1.3.2.2  nathanw .ifndef S
     39   1.3.2.2  nathanw S!=	cd ../../../..; pwd
     40   1.3.2.2  nathanw .endif
     41   1.3.2.2  nathanw 
     42   1.3.2.2  nathanw ##
     43   1.3.2.2  nathanw ## (2) compile settings
     44   1.3.2.2  nathanw ##
     45   1.3.2.2  nathanw ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile
     46   1.3.2.2  nathanw ##
     47   1.3.2.2  nathanw INCLUDES?=	-I. ${EXTRA_INCLUDES} -I$S/arch -I$S -nostdinc
     48   1.3.2.2  nathanw CPPFLAGS+=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
     49   1.3.2.2  nathanw DEFCOPTS?=	-O2
     50   1.3.2.2  nathanw COPTS?=		${DEFCOPTS}
     51   1.3.2.2  nathanw DBG=		# might contain unwanted -Ofoo
     52   1.3.2.2  nathanw DEFWARNINGS?=	yes
     53   1.3.2.2  nathanw .if (${DEFWARNINGS} == "yes")
     54   1.3.2.9  nathanw CWARNFLAGS+=	-Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
     55   1.3.2.2  nathanw CWARNFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes
     56   1.3.2.2  nathanw # XXX Delete -Wuninitialized for now, since the compiler doesn't
     57   1.3.2.2  nathanw # XXX always get it right.  --thorpej
     58   1.3.2.2  nathanw CWARNFLAGS+=	-Wno-uninitialized
     59   1.3.2.2  nathanw .endif
     60   1.3.2.2  nathanw CFLAGS+=	-ffreestanding ${DEBUG} ${COPTS} ${CWARNFLAGS}
     61   1.3.2.2  nathanw AFLAGS+=	-D_LOCORE
     62   1.3.2.2  nathanw 
     63   1.3.2.2  nathanw # Define a set of xxx_G variables that will add -g to just those
     64   1.3.2.2  nathanw # files that match the shell patterns given in ${DEBUGLIST}
     65   1.3.2.2  nathanw #
     66   1.3.2.2  nathanw .for i in ${DEBUGLIST}
     67   1.3.2.2  nathanw .for j in ${CFILES:T:M$i.c}
     68   1.3.2.2  nathanw ${j:R}_G?= -g
     69   1.3.2.2  nathanw .endfor
     70   1.3.2.2  nathanw .endfor
     71   1.3.2.2  nathanw 
     72   1.3.2.2  nathanw # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
     73   1.3.2.2  nathanw # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
     74   1.3.2.2  nathanw NORMAL_C?=	${CC} ${CFLAGS} ${CPPFLAGS} ${${<:T:R}_G} ${PROF} -c $<
     75   1.3.2.2  nathanw NOPROF_C?=	${CC} ${CFLAGS} ${CPPFLAGS} ${${<:T:R}_G} -c $<
     76   1.3.2.2  nathanw NORMAL_S?=	${CC} ${AFLAGS} ${CPPFLAGS} -c $<
     77   1.3.2.2  nathanw 
     78   1.3.2.2  nathanw ##
     79   1.3.2.2  nathanw ## (3) libkern and compat
     80   1.3.2.2  nathanw ##
     81   1.3.2.2  nathanw ## Set KERN_AS in the port Makefile to "obj" or "library".  The
     82   1.3.2.2  nathanw ## default is "library", as documented in $S/lib/libkern/Makefile.inc.
     83   1.3.2.2  nathanw ##
     84   1.3.2.2  nathanw 
     85   1.3.2.2  nathanw ### find out what to use for libkern
     86   1.3.2.2  nathanw .include "$S/lib/libkern/Makefile.inc"
     87   1.3.2.2  nathanw .ifndef PROF
     88   1.3.2.2  nathanw LIBKERN?=	${KERNLIB}
     89   1.3.2.2  nathanw .else
     90   1.3.2.2  nathanw LIBKERN?=	${KERNLIB_PROF}
     91   1.3.2.2  nathanw .endif
     92   1.3.2.2  nathanw 
     93  1.3.2.10  nathanw LIBKERNLN?=	${KERNLIBLN}
     94  1.3.2.10  nathanw 
     95   1.3.2.2  nathanw ### find out what to use for libcompat
     96   1.3.2.2  nathanw .include "$S/compat/common/Makefile.inc"
     97   1.3.2.2  nathanw .ifndef PROF
     98   1.3.2.2  nathanw LIBCOMPAT?=	${COMPATLIB}
     99   1.3.2.2  nathanw .else
    100   1.3.2.2  nathanw LIBCOMPAT?=	${COMPATLIB_PROF}
    101   1.3.2.2  nathanw .endif
    102   1.3.2.2  nathanw 
    103  1.3.2.10  nathanw LIBCOMPATLN?=	${COMPATLIBLN}
    104  1.3.2.10  nathanw 
    105   1.3.2.2  nathanw ##
    106   1.3.2.2  nathanw ## (4) local objects, compile rules, and dependencies
    107   1.3.2.2  nathanw ##
    108   1.3.2.2  nathanw ## Each port should have a corresponding section with settings for
    109   1.3.2.2  nathanw ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same.
    110   1.3.2.2  nathanw ##
    111   1.3.2.8  nathanw MI_CFILES=devsw.c ioconf.c param.c
    112   1.3.2.2  nathanw # the need for a MI_SFILES variable is dubitable at best
    113   1.3.2.2  nathanw MI_OBJS=${MI_CFILES:S/.c/.o/}
    114   1.3.2.2  nathanw 
    115   1.3.2.2  nathanw param.c: $S/conf/param.c
    116   1.3.2.2  nathanw 	rm -f param.c
    117   1.3.2.2  nathanw 	cp $S/conf/param.c .
    118   1.3.2.2  nathanw 
    119   1.3.2.2  nathanw param.o: Makefile
    120   1.3.2.2  nathanw 
    121   1.3.2.2  nathanw .for _cfile in ${MI_CFILES}
    122   1.3.2.2  nathanw ${_cfile:T:R}.o: ${_cfile}
    123   1.3.2.2  nathanw 	${NORMAL_C}
    124   1.3.2.2  nathanw .endfor
    125   1.3.2.2  nathanw 
    126   1.3.2.2  nathanw ##
    127   1.3.2.2  nathanw ## (5) link settings
    128   1.3.2.2  nathanw ##
    129   1.3.2.2  nathanw ## TEXTADDR (or LOADADDRESS), LINKFORMAT, and any EXTRA_LINKFLAGS must
    130   1.3.2.2  nathanw ## be set in the port's Makefile.  The port specific definitions for
    131   1.3.2.2  nathanw ## LINKFLAGS_NORMAL and LINKFLAGS_DEBUG will added to the LINKFLAGS
    132   1.3.2.2  nathanw ## depending on the value of DEBUG.
    133   1.3.2.2  nathanw ##
    134   1.3.2.2  nathanw # load lines for config "xxx" will be emitted as:
    135   1.3.2.2  nathanw # xxx: ${SYSTEM_DEP} swapxxx.o
    136   1.3.2.2  nathanw #	${SYSTEM_LD_HEAD}
    137   1.3.2.2  nathanw #	${SYSTEM_LD} swapxxx.o
    138   1.3.2.2  nathanw #	${SYSTEM_LD_TAIL}
    139   1.3.2.2  nathanw SYSTEM_OBJ?=	${MD_OBJS} ${MI_OBJS} ${OBJS} ${LIBCOMPAT} ${LIBKERN}
    140   1.3.2.8  nathanw SYSTEM_DEP?=	Makefile ${SYSTEM_OBJ} .gdbinit
    141   1.3.2.2  nathanw SYSTEM_LD_HEAD?=	@rm -f $@
    142   1.3.2.2  nathanw SYSTEM_LD?=	@echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
    143   1.3.2.2  nathanw 		${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
    144   1.3.2.2  nathanw SYSTEM_LD_TAIL?=	@${SIZE} $@; chmod 755 $@
    145   1.3.2.2  nathanw 
    146   1.3.2.2  nathanw TEXTADDR?=	${LOADADDRESS}			# backwards compatibility
    147   1.3.2.2  nathanw LINKTEXT?=	${TEXTADDR:C/.+/-Ttext &/}
    148   1.3.2.2  nathanw LINKDATA?=	${DATAADDR:C/.+/-Tdata &/}
    149   1.3.2.2  nathanw ENTRYPOINT?=	start
    150   1.3.2.2  nathanw LINKENTRY?=	${ENTRYPOINT:C/.+/-e &/}
    151   1.3.2.2  nathanw LINKFLAGS?=	${LINKFORMAT} ${LINKTEXT} ${LINKDATA} ${LINKENTRY} \
    152   1.3.2.2  nathanw 		${EXTRA_LINKFLAGS}
    153   1.3.2.2  nathanw 
    154   1.3.2.2  nathanw LINKFLAGS_DEBUG?=	-X
    155   1.3.2.2  nathanw SYSTEM_LD_TAIL_DEBUG?=; \
    156   1.3.2.2  nathanw 		echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
    157   1.3.2.2  nathanw 		echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
    158   1.3.2.2  nathanw 		${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
    159   1.3.2.2  nathanw LINKFLAGS_NORMAL?=	-S
    160   1.3.2.2  nathanw STRIPFLAGS?=	-g
    161   1.3.2.2  nathanw 
    162   1.3.2.2  nathanw DEBUG?=
    163   1.3.2.2  nathanw .if ${DEBUG} == "-g"
    164   1.3.2.2  nathanw SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
    165   1.3.2.2  nathanw LINKFLAGS+=	${LINKFLAGS_DEBUG}
    166   1.3.2.2  nathanw EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
    167   1.3.2.2  nathanw .elifndef PROF
    168   1.3.2.2  nathanw LINKFLAGS+=	${LINKFLAGS_NORMAL}
    169   1.3.2.2  nathanw .endif
    170   1.3.2.2  nathanw 
    171   1.3.2.2  nathanw SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_EXTRA}
    172   1.3.2.2  nathanw 
    173   1.3.2.2  nathanw ##
    174   1.3.2.2  nathanw ## (6) port independent targets and dependencies: assym.h, vers.o
    175   1.3.2.2  nathanw ##
    176   1.3.2.2  nathanw .if !target(assym.h)
    177   1.3.2.2  nathanw assym.h: $S/kern/genassym.sh ${GENASSYM} ${GENASSYM_EXTRAS}
    178   1.3.2.2  nathanw 	cat ${GENASSYM} ${GENASSYM_EXTRAS} | \
    179   1.3.2.2  nathanw 	    sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
    180   1.3.2.2  nathanw 	    > assym.h.tmp && \
    181   1.3.2.2  nathanw 	mv -f assym.h.tmp assym.h
    182   1.3.2.3  nathanw ${MD_SFILES:C/\.[Ss]/.o/} ${SFILES:C/\.[Ss]/.o/}: assym.h
    183   1.3.2.2  nathanw .endif
    184   1.3.2.2  nathanw 
    185   1.3.2.2  nathanw .if !target(vers.o)
    186   1.3.2.2  nathanw newvers: vers.o
    187   1.3.2.7  nathanw vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} $S/conf/newvers.sh $S/conf/osrelease.sh
    188   1.3.2.2  nathanw 	sh $S/conf/newvers.sh
    189   1.3.2.2  nathanw 	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
    190   1.3.2.2  nathanw .endif
    191   1.3.2.2  nathanw 
    192   1.3.2.2  nathanw # depend on root or device configuration
    193   1.3.2.2  nathanw autoconf.o conf.o: Makefile
    194   1.3.2.2  nathanw 
    195   1.3.2.2  nathanw # depend on network or filesystem configuration
    196   1.3.2.2  nathanw uipc_proto.o vfs_conf.o: Makefile
    197   1.3.2.2  nathanw 
    198   1.3.2.2  nathanw # depend on maxusers and CPU configuration
    199   1.3.2.2  nathanw assym.h machdep.o: Makefile
    200   1.3.2.2  nathanw 
    201   1.3.2.2  nathanw ##
    202   1.3.2.5  nathanw ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags,
    203   1.3.2.5  nathanw ##                   cscope, mkid
    204   1.3.2.2  nathanw ##
    205   1.3.2.2  nathanw ## Any ports that have other stuff to be cleaned up should fill in
    206   1.3.2.2  nathanw ## EXTRA_CLEAN.  Some ports may want different settings for
    207   1.3.2.2  nathanw ## KERNLINTFLAGS, MKDEP_CFLAGS, or MKDEP_AFLAGS.
    208   1.3.2.2  nathanw ##
    209   1.3.2.2  nathanw .if !target(__CLEANKERNEL)
    210   1.3.2.2  nathanw __CLEANKERNEL: .USE
    211   1.3.2.2  nathanw 	@echo "${.TARGET}ing the kernel objects"
    212  1.3.2.10  nathanw 	rm -f ${KERNELS} eddep tags *.[io] *.ln [a-z]*.s vers.c \
    213   1.3.2.2  nathanw 	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h \
    214   1.3.2.2  nathanw 	    ${EXTRA_KERNELS} ${EXTRA_CLEAN}
    215   1.3.2.2  nathanw .endif
    216   1.3.2.2  nathanw 
    217   1.3.2.2  nathanw .if !target(kernelnames)
    218   1.3.2.2  nathanw kernelnames:
    219   1.3.2.2  nathanw 	@echo "${KERNELS} ${EXTRA_KERNELS}"
    220   1.3.2.2  nathanw .endif
    221   1.3.2.2  nathanw 
    222   1.3.2.2  nathanw .if !target(__CLEANDEPEND)
    223   1.3.2.2  nathanw __CLEANDEPEND: .USE
    224   1.3.2.2  nathanw 	rm -f .depend
    225   1.3.2.2  nathanw .endif
    226   1.3.2.2  nathanw 
    227   1.3.2.2  nathanw # do not !target these, the kern and compat Makefiles augment them
    228   1.3.2.2  nathanw cleandir distclean: __CLEANKERNEL __CLEANDEPEND
    229   1.3.2.2  nathanw clean: __CLEANKERNEL
    230   1.3.2.2  nathanw depend: .depend
    231   1.3.2.2  nathanw 
    232   1.3.2.2  nathanw .if !target(.depend)
    233   1.3.2.2  nathanw SRCS?=		${MD_SFILES} ${MD_CFILES} ${MI_CFILES} ${CFILES} ${SFILES}
    234   1.3.2.2  nathanw MKDEP_AFLAGS?=	${AFLAGS}
    235   1.3.2.2  nathanw MKDEP_CFLAGS?=	${CFLAGS}
    236   1.3.2.2  nathanw .depend: ${SRCS} assym.h
    237   1.3.2.2  nathanw 	${MKDEP} ${MKDEP_AFLAGS} ${CPPFLAGS} ${MD_SFILES} ${SFILES}
    238   1.3.2.2  nathanw 	${MKDEP} -a ${MKDEP_CFLAGS} ${CPPFLAGS} ${MD_CFILES} ${MI_CFILES} \
    239   1.3.2.2  nathanw 	    ${CFILES}
    240   1.3.2.2  nathanw 	cat ${GENASSYM} ${GENASSYM_EXTRAS} | \
    241   1.3.2.2  nathanw 	    sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} ${CPPFLAGS}
    242   1.3.2.2  nathanw 	@sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
    243   1.3.2.2  nathanw 	@rm -f assym.dep
    244   1.3.2.2  nathanw .endif
    245   1.3.2.2  nathanw 
    246   1.3.2.2  nathanw .if !target(dependall)
    247   1.3.2.2  nathanw dependall: depend all
    248   1.3.2.2  nathanw .endif
    249   1.3.2.2  nathanw 
    250   1.3.2.2  nathanw .if !target(lint)
    251   1.3.2.2  nathanw ALLSFILES?=	${MD_SFILES} ${SFILES}
    252   1.3.2.2  nathanw LINTSTUBS?=	${ALLSFILES:T:R:C/^.*$/LintStub_&.c/g}
    253  1.3.2.10  nathanw KERNLINTFLAGS?=	-bcehnxzFS
    254  1.3.2.10  nathanw NORMAL_LN?=	${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i $<
    255  1.3.2.10  nathanw 
    256  1.3.2.10  nathanw _lsrc=${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
    257  1.3.2.10  nathanw LOBJS?= ${_lsrc:T:S/.c$/.ln/g} ${LIBKERNLN} ${LIBCOMPATLN}
    258  1.3.2.10  nathanw 
    259   1.3.2.2  nathanw .for _sfile in ${ALLSFILES}
    260   1.3.2.2  nathanw LintStub_${_sfile:T:R}.c: ${_sfile} assym.h
    261   1.3.2.2  nathanw 	${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${_sfile} | \
    262   1.3.2.2  nathanw 	      awk -f $S/kern/genlintstub.awk >${.TARGET}
    263   1.3.2.2  nathanw .endfor
    264  1.3.2.10  nathanw 
    265  1.3.2.10  nathanw .for _cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
    266  1.3.2.10  nathanw ${_cfile:T:R}.ln: ${_cfile}
    267  1.3.2.10  nathanw 	${NORMAL_LN}
    268  1.3.2.10  nathanw .endfor
    269  1.3.2.10  nathanw 
    270  1.3.2.10  nathanw lint: ${LOBJS}
    271  1.3.2.10  nathanw 	${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${LOBJS}
    272   1.3.2.2  nathanw .endif
    273   1.3.2.2  nathanw 
    274   1.3.2.2  nathanw .if !target(install)
    275   1.3.2.2  nathanw # The install target can be redefined by putting a
    276   1.3.2.2  nathanw # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
    277   1.3.2.2  nathanw MACHINE_NAME!=  uname -n
    278   1.3.2.2  nathanw install: install-kernel-${MACHINE_NAME}
    279  1.3.2.10  nathanw .if !target(install-kernel-${MACHINE_NAME})
    280   1.3.2.2  nathanw install-kernel-${MACHINE_NAME}:
    281   1.3.2.2  nathanw 	rm -f ${DESTDIR}/onetbsd
    282   1.3.2.2  nathanw 	ln ${DESTDIR}/netbsd ${DESTDIR}/onetbsd
    283   1.3.2.2  nathanw 	cp netbsd ${DESTDIR}/nnetbsd
    284   1.3.2.2  nathanw 	mv ${DESTDIR}/nnetbsd ${DESTDIR}/netbsd
    285   1.3.2.2  nathanw .endif
    286   1.3.2.2  nathanw .endif
    287   1.3.2.2  nathanw 
    288   1.3.2.2  nathanw .if !target(tags)
    289   1.3.2.2  nathanw tags:
    290   1.3.2.2  nathanw 	@echo "see $S/kern/Makefile for tags"
    291   1.3.2.2  nathanw .endif
    292   1.3.2.2  nathanw 
    293   1.3.2.5  nathanw EXTRA_CLEAN+= cscope.out
    294   1.3.2.5  nathanw .if !target(cscope.out)
    295   1.3.2.6  nathanw cscope.out: Makefile depend
    296   1.3.2.5  nathanw 	@echo Building cscope.out source database
    297   1.3.2.6  nathanw 	@echo ${SRCS} `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' \
    298   1.3.2.6  nathanw 	lib/kern/.depend lib/compat/.depend | tr ' ' '\n' | \
    299   1.3.2.6  nathanw 	sed "s|^../../||" | sort -u` \
    300   1.3.2.6  nathanw 	| ${CSCOPE} -k -i - -b `echo ${INCLUDES} | sed s/-nostdinc//`
    301   1.3.2.5  nathanw #	cscope doesn't write cscope.out if it's uptodate, so ensure
    302   1.3.2.5  nathanw #	make doesn't keep calling cscope when not needed.
    303   1.3.2.5  nathanw 	@touch cscope.out
    304   1.3.2.5  nathanw .endif
    305   1.3.2.5  nathanw 
    306   1.3.2.5  nathanw .if !target(cscope)
    307   1.3.2.5  nathanw cscope: cscope.out
    308   1.3.2.5  nathanw 	@${CSCOPE} -d
    309   1.3.2.5  nathanw .endif
    310   1.3.2.5  nathanw 
    311   1.3.2.5  nathanw EXTRA_CLEAN+= ID
    312   1.3.2.5  nathanw .if !target(mkid)
    313   1.3.2.5  nathanw .PHONY: mkid
    314   1.3.2.5  nathanw mkid: ID
    315   1.3.2.5  nathanw 
    316   1.3.2.6  nathanw ID: Makefile depend
    317   1.3.2.5  nathanw 	@echo Building mkid database
    318   1.3.2.6  nathanw 	@${MKID} `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' lib/kern/.depend \
    319   1.3.2.6  nathanw 	lib/compat/.depend | tr ' ' '\n' | sed "s|^../../||" | sort -u` \
    320   1.3.2.6  nathanw 	`sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' .depend | tr ' ' '\n' \
    321   1.3.2.6  nathanw 	| sort -u`
    322   1.3.2.6  nathanw 
    323   1.3.2.5  nathanw .endif
    324   1.3.2.5  nathanw 
    325   1.3.2.8  nathanw .include "${S}/gdbscripts/Makefile.inc"
    326   1.3.2.8  nathanw 
    327   1.3.2.8  nathanw EXTRA_CLEAN+= .gdbinit
    328   1.3.2.8  nathanw .gdbinit: Makefile ${S}/gdbscripts/Makefile.inc
    329   1.3.2.8  nathanw 	@echo building GDB initialization file
    330   1.3.2.8  nathanw 	rm -f .gdbinit
    331   1.3.2.8  nathanw .for __gdbinit in ${SYS_GDBINIT}
    332   1.3.2.8  nathanw 	echo "source ${S}/gdbscripts/${__gdbinit}" >> .gdbinit
    333   1.3.2.8  nathanw .endfor
    334   1.3.2.8  nathanw .if defined(GDBINIT) && !empty(GDBINIT)
    335   1.3.2.8  nathanw .for __gdbinit in ${GDBINIT}
    336   1.3.2.8  nathanw 	echo "source ${__gdbinit}" >> .gdbinit
    337   1.3.2.8  nathanw .endfor
    338   1.3.2.8  nathanw .endif
    339   1.3.2.8  nathanw 
    340   1.3.2.2  nathanw ##
    341   1.3.2.2  nathanw ## the end
    342   1.3.2.2  nathanw ##
    343