Annotation of src/sys/conf/Makefile.kern.inc, Revision 1.99.2.1
1.99.2.1! yamt 1: # $NetBSD: Makefile.kern.inc,v 1.99 2007/01/27 01:37:57 christos Exp $
1.1 atatat 2: #
3: # This file contains common `MI' targets and definitions and it is included
1.31 atatat 4: # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
1.1 atatat 5: #
6: # Each target in this file should be protected with `if !target(target)'
7: # or `if !commands(target)' and each variable should only be conditionally
8: # assigned `VAR ?= VALUE', so that everything can be overriden.
9: #
10: # DEBUG is set to -g if debugging.
11: # PROF is set to -pg if profiling.
12: #
1.59 perry 13: # To specify debugging, add the config line: makeoptions DEBUG="-g"
1.1 atatat 14: # A better way is to specify -g only for a few files.
15: #
16: # makeoptions DEBUGLIST="uvm* trap if_*"
17: #
18: # all ports are expected to include bsd.own.mk for toolchain settings
19:
20: ##
1.3 atatat 21: ## (0) toolchain settings for things that aren't part of the standard
22: ## toolchain
23: ##
1.45 lukem 24: HOST_SH?= sh
1.15 tv 25: DBSYM?= dbsym
1.3 atatat 26: MKDEP?= mkdep
27: STRIP?= strip
28: OBJCOPY?= objcopy
29: OBJDUMP?= objdump
1.16 wrstuden 30: CSCOPE?= cscope
31: MKID?= mkid
1.55 atatat 32: UUDECODE?= ${TOOL_UUDECODE:Uuudecode}
1.63 christos 33: HEXDUMP?= ${TOOL_HEXDUMP:Uhexdump}
34: GENASSYM?= ${TOOL_GENASSYM:Ugenassym}
1.12 tv 35: .MAKEOVERRIDES+=USETOOLS # make sure proper value is propagated
1.46 lukem 36:
37: _MKMSG?= @\#
1.49 pk 38: _MKSHMSG?= echo
39: _MKSHECHO?= echo
1.46 lukem 40: _MKMSG_CREATE?= :
41: _MKTARGET_COMPILE?= :
42: _MKTARGET_CREATE?= :
1.3 atatat 43:
44: ##
1.1 atatat 45: ## (1) port independent source tree identification
46: ##
47: # source tree is located via $S relative to the compilation directory
48: .ifndef S
49: S!= cd ../../../..; pwd
50: .endif
51:
52: ##
53: ## (2) compile settings
54: ##
55: ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile
56: ##
1.77 thorpej 57: INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \
58: -I$S -nostdinc
1.4 atatat 59: CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
60: DEFCOPTS?= -O2
1.25 fvdl 61: COPTS?= ${DEFCOPTS}
1.7 atatat 62: DBG= # might contain unwanted -Ofoo
63: DEFWARNINGS?= yes
64: .if (${DEFWARNINGS} == "yes")
1.87 christos 65: . if !defined(NOGCCERROR)
1.37 matt 66: CWARNFLAGS+= -Werror
1.87 christos 67: . endif
1.37 matt 68: CWARNFLAGS+= -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
1.7 atatat 69: CWARNFLAGS+= -Wmissing-prototypes -Wstrict-prototypes
1.68 martin 70: CWARNFLAGS+= -Wswitch -Wshadow
1.62 christos 71: CWARNFLAGS+= -Wcast-qual -Wwrite-strings
1.30 thorpej 72: # Add -Wno-sign-compare. -Wsign-compare is included in -Wall as of GCC 3.3,
73: # but our sources aren't up for it yet.
74: CWARNFLAGS+= -Wno-sign-compare
1.78 mrg 75: . if ${HAVE_GCC} > 3
1.81 christos 76: CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes
1.91 garbled 77: . if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
1.89 martin 78: CWARNFLAGS+= -Wextra -Wno-unused-parameter
1.87 christos 79: . endif
1.78 mrg 80: . endif
1.7 atatat 81: .endif
1.42 jdolecek 82:
1.82 mrg 83: CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss
1.53 matt 84: CFLAGS+= ${CPUFLAGS} ${DEBUG} ${COPTS} ${CWARNFLAGS}
1.84 simonb 85: AFLAGS+= ${CPUFLAGS} -D_LOCORE -Wa,-fatal-warnings
1.53 matt 86:
1.78 mrg 87: # XXX
88: .if ${HAVE_GCC} > 3
89: CFLAGS+= -fno-strict-aliasing
90: .endif
91:
1.92 christos 92: .if ${USE_SSP:Uno} == "yes"
1.98 tls 93: CFLAGS+=-fstack-protector -Wstack-protector --param ssp-buffer-size=1
94: LDFLAGS+=-fstack-protector -Wstack-protector --param ssp-buffer-size=1
1.92 christos 95: .endif
96:
1.85 mrg 97: # If we want the bpendtsleep: label in kern_synch.c, we need to use
98: # -fno-reorder-blocks. Don't make this a config(1) defflag without
99: # making sure this fragment remains valid.
100: .if ${HAVE_GCC} > 3 && !empty(${CFLAGS:M-DKERN_SYNCH_BPENDTSLEEP_LABEL})
101: CFLAGS.kern_synch.c+= -fno-reorder-blocks
102: .endif
103:
1.45 lukem 104: # Use the per-source COPTS variables to add -g to just those
1.1 atatat 105: # files that match the shell patterns given in ${DEBUGLIST}
106: #
107: .for i in ${DEBUGLIST}
1.87 christos 108: . for j in ${CFILES:T:M$i.c}
1.45 lukem 109: COPTS.${j}+=-g
1.87 christos 110: . endfor
1.1 atatat 111: .endfor
112:
113: # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
114: # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
1.51 lukem 115: NORMAL_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}"; \
1.45 lukem 116: ${_MKSHECHO}\
117: ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<; \
118: ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
1.51 lukem 119: NOPROF_C?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}"; \
1.45 lukem 120: ${_MKSHECHO}\
121: ${CC} ${CFLAGS} ${CPPFLAGS} -c $<; \
122: ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
1.51 lukem 123: NORMAL_S?= @${_MKSHMSG} "compile ${.CURDIR:T}/${.TARGET}"; \
1.45 lukem 124: ${_MKSHECHO}\
125: ${CC} ${AFLAGS} ${CPPFLAGS} -c $<; \
126: ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
1.1 atatat 127:
128: ##
1.59 perry 129: ## (3) libkern and compat
1.1 atatat 130: ##
131: ## Set KERN_AS in the port Makefile to "obj" or "library". The
132: ## default is "library", as documented in $S/lib/libkern/Makefile.inc.
133: ##
134:
135: ### find out what to use for libkern
136: .include "$S/lib/libkern/Makefile.inc"
137: .ifndef PROF
138: LIBKERN?= ${KERNLIB}
139: .else
140: LIBKERN?= ${KERNLIB_PROF}
141: .endif
142:
1.27 perry 143: LIBKERNLN?= ${KERNLIBLN}
144:
1.1 atatat 145: ### find out what to use for libcompat
146: .include "$S/compat/common/Makefile.inc"
147: .ifndef PROF
1.56 lukem 148: SYSLIBCOMPAT?= ${COMPATLIB}
1.1 atatat 149: .else
1.56 lukem 150: SYSLIBCOMPAT?= ${COMPATLIB_PROF}
1.1 atatat 151: .endif
152:
1.56 lukem 153: SYSLIBCOMPATLN?= ${COMPATLIBLN}
1.27 perry 154:
1.1 atatat 155: ##
156: ## (4) local objects, compile rules, and dependencies
157: ##
158: ## Each port should have a corresponding section with settings for
159: ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same.
160: ##
1.22 gehenna 161: MI_CFILES=devsw.c ioconf.c param.c
1.1 atatat 162: # the need for a MI_SFILES variable is dubitable at best
163: MI_OBJS=${MI_CFILES:S/.c/.o/}
164:
165: param.c: $S/conf/param.c
1.45 lukem 166: ${_MKTARGET_CREATE}
1.1 atatat 167: rm -f param.c
168: cp $S/conf/param.c .
169:
170: param.o: Makefile
171:
172: .for _cfile in ${MI_CFILES}
173: ${_cfile:T:R}.o: ${_cfile}
174: ${NORMAL_C}
175: .endfor
176:
177: ##
178: ## (5) link settings
179: ##
180: ## TEXTADDR (or LOADADDRESS), LINKFORMAT, and any EXTRA_LINKFLAGS must
181: ## be set in the port's Makefile. The port specific definitions for
182: ## LINKFLAGS_NORMAL and LINKFLAGS_DEBUG will added to the LINKFLAGS
183: ## depending on the value of DEBUG.
184: ##
185: # load lines for config "xxx" will be emitted as:
186: # xxx: ${SYSTEM_DEP} swapxxx.o
187: # ${SYSTEM_LD_HEAD}
188: # ${SYSTEM_LD} swapxxx.o
189: # ${SYSTEM_LD_TAIL}
1.56 lukem 190: SYSTEM_OBJ?= ${MD_OBJS} ${MI_OBJS} ${OBJS} ${SYSLIBCOMPAT} ${LIBKERN}
1.75 lukem 191: SYSTEM_DEP?= Makefile ${SYSTEM_OBJ:O} .gdbinit
1.45 lukem 192: SYSTEM_LD_HEAD?=@rm -f $@
1.50 lukem 193: SYSTEM_LD?= @${_MKSHMSG} " link ${.CURDIR:T}/${.TARGET}"; \
1.45 lukem 194: ${_MKSHECHO}\
1.83 dsl 195: ${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \
196: ${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
1.45 lukem 197: SYSTEM_LD_TAIL?=@${SIZE} $@; chmod 755 $@
1.1 atatat 198:
199: TEXTADDR?= ${LOADADDRESS} # backwards compatibility
1.5 atatat 200: LINKTEXT?= ${TEXTADDR:C/.+/-Ttext &/}
201: LINKDATA?= ${DATAADDR:C/.+/-Tdata &/}
1.1 atatat 202: ENTRYPOINT?= start
1.6 atatat 203: LINKENTRY?= ${ENTRYPOINT:C/.+/-e &/}
1.1 atatat 204: LINKFLAGS?= ${LINKFORMAT} ${LINKTEXT} ${LINKDATA} ${LINKENTRY} \
205: ${EXTRA_LINKFLAGS}
206:
1.4 atatat 207: LINKFLAGS_DEBUG?= -X
1.1 atatat 208: SYSTEM_LD_TAIL_DEBUG?=; \
209: echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
210: echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
211: ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
1.4 atatat 212: LINKFLAGS_NORMAL?= -S
1.1 atatat 213: STRIPFLAGS?= -g
214:
215: DEBUG?=
1.60 dbj 216: .if !empty(DEBUG:M-g*)
1.1 atatat 217: SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
218: LINKFLAGS+= ${LINKFLAGS_DEBUG}
1.7 atatat 219: EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
1.9 chs 220: .elifndef PROF
1.1 atatat 221: LINKFLAGS+= ${LINKFLAGS_NORMAL}
222: .endif
223:
1.70 dbj 224: SYSTEM_LD_TAIL+=; \
225: if grep -q '^\#define.*SYMTAB_SPACE' opt_ddbparam.h; then \
226: echo "${DBSYM} $@"; \
227: ${DBSYM} $@; \
228: fi
229:
1.57 chs 230: SYSTEM_LD_HEAD+=${SYSTEM_LD_HEAD_EXTRA}
1.5 atatat 231: SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_EXTRA}
232:
1.1 atatat 233: ##
1.8 atatat 234: ## (6) port independent targets and dependencies: assym.h, vers.o
1.1 atatat 235: ##
236: .if !target(assym.h)
1.63 christos 237: assym.h: ${GENASSYM_CONF} ${GENASSYM_EXTRAS}
1.45 lukem 238: ${_MKTARGET_CREATE}
1.63 christos 239: cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \
240: ${GENASSYM} -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
1.5 atatat 241: > assym.h.tmp && \
1.1 atatat 242: mv -f assym.h.tmp assym.h
1.11 mrg 243: ${MD_SFILES:C/\.[Ss]/.o/} ${SFILES:C/\.[Ss]/.o/}: assym.h
1.1 atatat 244: .endif
245:
1.8 atatat 246: .if !target(vers.o)
247: newvers: vers.o
1.20 lukem 248: vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} $S/conf/newvers.sh $S/conf/osrelease.sh
1.45 lukem 249: ${_MKMSG_CREATE} vers.c
250: ${HOST_SH} $S/conf/newvers.sh
251: ${_MKTARGET_COMPILE}
1.1 atatat 252: ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
1.29 atatat 253: .endif
254:
255: .if !target(config_time.h)
256: EXTRA_CLEAN+= config_time.h
257: config_time.h: Makefile
1.45 lukem 258: ${_MKTARGET_CREATE}
1.29 atatat 259: cp config_time.src config_time.h
1.1 atatat 260: .endif
1.33 thorpej 261:
262: .if defined(MEMORY_DISK_IMAGE)
263: md_root_image.h: ${MEMORY_DISK_IMAGE}
1.45 lukem 264: ${_MKTARGET_CREATE}
1.35 lukem 265: ${TOOL_HEXDUMP} -v -e '"\t" 8/1 "0x%02x, " "\n"' ${.ALLSRC} > ${.TARGET}
1.33 thorpej 266:
267: # XXX This is only needed when building md_root.o
268: CPPFLAGS+= -DMEMORY_DISK_IMAGE
269: md_root.o: md_root_image.h
270: .endif
271:
272: # depend on MEMORY_DISK_IMAGE configuration
273: md_root.o: Makefile
1.1 atatat 274:
275: # depend on root or device configuration
276: autoconf.o conf.o: Makefile
277:
278: # depend on network or filesystem configuration
279: uipc_proto.o vfs_conf.o: Makefile
280:
281: # depend on maxusers and CPU configuration
282: assym.h machdep.o: Makefile
283:
284: ##
1.16 wrstuden 285: ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags,
286: ## cscope, mkid
1.1 atatat 287: ##
288: ## Any ports that have other stuff to be cleaned up should fill in
289: ## EXTRA_CLEAN. Some ports may want different settings for
290: ## KERNLINTFLAGS, MKDEP_CFLAGS, or MKDEP_AFLAGS.
291: ##
292: .if !target(__CLEANKERNEL)
293: __CLEANKERNEL: .USE
1.45 lukem 294: ${_MKMSG} "${.TARGET}ing the kernel objects"
1.27 perry 295: rm -f ${KERNELS} eddep tags *.[io] *.ln [a-z]*.s vers.c \
1.1 atatat 296: [Ee]rrs linterrs makelinks assym.h.tmp assym.h \
1.7 atatat 297: ${EXTRA_KERNELS} ${EXTRA_CLEAN}
298: .endif
299:
300: .if !target(kernelnames)
301: kernelnames:
302: @echo "${KERNELS} ${EXTRA_KERNELS}"
1.1 atatat 303: .endif
304:
305: .if !target(__CLEANDEPEND)
306: __CLEANDEPEND: .USE
1.73 dsl 307: echo .depend ${DEPS} | xargs rm -f --
1.1 atatat 308: .endif
309:
310: # do not !target these, the kern and compat Makefiles augment them
311: cleandir distclean: __CLEANKERNEL __CLEANDEPEND
312: clean: __CLEANKERNEL
313: depend: .depend
1.90 thorpej 314: dependall: depend .WAIT all
1.1 atatat 315:
316: .if !target(.depend)
317: MKDEP_AFLAGS?= ${AFLAGS}
318: MKDEP_CFLAGS?= ${CFLAGS}
1.71 yamt 319: SSRCS=${MD_SFILES} ${SFILES}
320: CSRCS=${MD_CFILES} ${MI_CFILES} ${CFILES}
321: SRCS=${SSRCS} ${CSRCS}
1.76 lukem 322: DEPS= ${SRCS:T:O:u:R:S/$/.d/g}
1.71 yamt 323:
324: .for _s in ${SSRCS}
325: ${_s:T:R}.d: ${_s} assym.h config_time.h
1.73 dsl 326: ${_MKTARGET_CREATE}
327: ${MKDEP} -f ${.TARGET} -- ${MKDEP_AFLAGS} \
328: ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s}
1.71 yamt 329: .endfor
330: .for _s in ${CSRCS}
331: ${_s:T:R}.d: ${_s} config_time.h
1.73 dsl 332: ${_MKTARGET_CREATE}
333: ${MKDEP} -f ${.TARGET} -- ${MKDEP_CFLAGS} \
334: ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s}
1.71 yamt 335: .endfor
336:
1.73 dsl 337: assym.d: assym.h config_time.h
1.45 lukem 338: ${_MKTARGET_CREATE}
1.63 christos 339: cat ${GENASSYM_CONF} ${GENASSYM_EXTRAS} | \
340: ${GENASSYM} -- ${MKDEP} -f assym.dep -- \
1.43 enami 341: ${CFLAGS} ${CPPFLAGS}
1.73 dsl 342: sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >${.TARGET}
343: rm -f assym.dep
344:
345: .depend: ${DEPS} assym.d
346: ${_MKTARGET_CREATE}
347: echo "${.ALLSRC}" | ${MKDEP} -D
1.1 atatat 348: .endif
349:
350: .if !target(lint)
351: ALLSFILES?= ${MD_SFILES} ${SFILES}
352: LINTSTUBS?= ${ALLSFILES:T:R:C/^.*$/LintStub_&.c/g}
1.27 perry 353: KERNLINTFLAGS?= -bcehnxzFS
354: NORMAL_LN?= ${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i $<
355:
356: _lsrc=${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
1.56 lukem 357: LOBJS?= ${_lsrc:T:S/.c$/.ln/g} ${LIBKERNLN} ${SYSLIBCOMPATLN}
1.27 perry 358:
1.1 atatat 359: .for _sfile in ${ALLSFILES}
360: LintStub_${_sfile:T:R}.c: ${_sfile} assym.h
1.45 lukem 361: ${_MKTARGET_COMPILE}
1.1 atatat 362: ${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${_sfile} | \
363: awk -f $S/kern/genlintstub.awk >${.TARGET}
364: .endfor
1.27 perry 365:
366: .for _cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
367: ${_cfile:T:R}.ln: ${_cfile}
1.45 lukem 368: ${_MKTARGET_COMPILE}
1.27 perry 369: ${NORMAL_LN}
370: .endfor
371:
372: lint: ${LOBJS}
373: ${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} ${LOBJS}
1.1 atatat 374: .endif
375:
1.99.2.1! yamt 376: # List of kernel images that will be installed into the root file system.
! 377: # Some platforms may need to install more than one (e.g. a netbsd.aout file
! 378: # to be loaded directly by the firmware), so this can be overriden by them.
! 379: KERNIMAGES?= netbsd
! 380:
1.1 atatat 381: .if !target(install)
382: # The install target can be redefined by putting a
383: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
384: MACHINE_NAME!= uname -n
385: install: install-kernel-${MACHINE_NAME}
1.28 chris 386: .if !target(install-kernel-${MACHINE_NAME})
1.1 atatat 387: install-kernel-${MACHINE_NAME}:
1.99.2.1! yamt 388: .for _K in ${KERNIMAGES}
! 389: rm -f ${DESTDIR}/o${_K}
! 390: ln ${DESTDIR}/${_K} ${DESTDIR}/o${_K}
! 391: cp ${_K} ${DESTDIR}/n${_K}
! 392: mv ${DESTDIR}/n${_K} ${DESTDIR}/${_K}
! 393: .endfor
1.1 atatat 394: .endif
395: .endif
396:
397: .if !target(tags)
398: tags:
399: @echo "see $S/kern/Makefile for tags"
1.16 wrstuden 400: .endif
401:
1.58 heas 402: EXTRA_CLEAN+= cscope.out cscope.tmp
1.16 wrstuden 403: .if !target(cscope.out)
1.19 wrstuden 404: cscope.out: Makefile depend
1.45 lukem 405: ${_MKTARGET_CREATE}
1.58 heas 406: @sed 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/kern/.depend | \
407: tr -s ' ' '\n' | sed 's|^\([^.\\]\)|lib/kern/\1|;s|^../../||;' > \
408: cscope.tmp
409: @sed 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/compat/.depend | \
410: tr -s ' ' '\n' | sed 's|^\([^.\\]\)|lib/compat/\1|;s|^../../||;' >> \
411: cscope.tmp
412: @echo ${SRCS} | cat - cscope.tmp | tr -s ' ' '\n' | sort -u | \
413: ${CSCOPE} -k -i - -b `echo ${INCLUDES} | sed s/-nostdinc//`
1.16 wrstuden 414: # cscope doesn't write cscope.out if it's uptodate, so ensure
415: # make doesn't keep calling cscope when not needed.
1.58 heas 416: @rm -f cscope.tmp; touch cscope.out
1.16 wrstuden 417: .endif
418:
419: .if !target(cscope)
420: cscope: cscope.out
421: @${CSCOPE} -d
422: .endif
423:
424: EXTRA_CLEAN+= ID
425: .if !target(mkid)
426: .PHONY: mkid
427: mkid: ID
428:
1.17 wrstuden 429: ID: Makefile depend
1.45 lukem 430: ${_MKTARGET_CREATE}
1.18 wrstuden 431: @${MKID} `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' lib/kern/.depend \
432: lib/compat/.depend | tr ' ' '\n' | sed "s|^../../||" | sort -u` \
433: `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' .depend | tr ' ' '\n' \
434: | sort -u`
435:
1.21 thorpej 436: .endif
437:
438: .include "${S}/gdbscripts/Makefile.inc"
439:
440: EXTRA_CLEAN+= .gdbinit
441: .gdbinit: Makefile ${S}/gdbscripts/Makefile.inc
1.45 lukem 442: ${_MKTARGET_CREATE}
1.21 thorpej 443: rm -f .gdbinit
444: .for __gdbinit in ${SYS_GDBINIT}
445: echo "source ${S}/gdbscripts/${__gdbinit}" >> .gdbinit
446: .endfor
447: .if defined(GDBINIT) && !empty(GDBINIT)
448: .for __gdbinit in ${GDBINIT}
449: echo "source ${__gdbinit}" >> .gdbinit
450: .endfor
1.1 atatat 451: .endif
452:
1.99 christos 453: # The following files use alloca(3) or variable array allocations.
1.92 christos 454: # Their full name is noted as documentation.
455: VARSTACK=dev/cgd.c kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \
456: nfs/nfs_bio.c ufs/ufs/ufs_inode.c ufs/ufs/ufs_lookup.c uvm/uvm_bio.c \
1.99 christos 457: uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c
1.92 christos 458:
1.96 christos 459: . if ${HAVE_GCC} > 3
1.92 christos 460: .for __varstack in ${VARSTACK}
461: COPTS.${__varstack:T} += -Wno-stack-protector
462: .endfor
1.96 christos 463: .endif
1.92 christos 464:
1.86 matt 465: AFLAGS+= ${AOPTS.${.IMPSRC:T}}
1.64 yamt 466: CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}}
467: CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}}
1.65 uwe 468: CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
1.64 yamt 469:
1.1 atatat 470: ##
471: ## the end
472: ##
CVSweb <webmaster@jp.NetBSD.org>