Home | History | Annotate | Line # | Download | only in conf
Makefile.kern.inc revision 1.264
      1 #	$NetBSD: Makefile.kern.inc,v 1.264 2018/02/17 22:47:14 joerg Exp $
      2 #
      3 # This file contains common `MI' targets and definitions and it is included
      4 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
      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 #
     13 # To specify debugging, add the config line: makeoptions DEBUG="-g"
     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 # Default DEBUG to -g if kernel debug info is requested by MKKDEBUG=yes
     21 .if defined(MKKDEBUG) && ${MKKDEBUG} == "yes"
     22 DEBUG?=-g
     23 .endif
     24 
     25 ##
     26 ## (0) toolchain settings for things that aren't part of the standard
     27 ## toolchain
     28 ##
     29 HOST_SH?=	sh
     30 DBSYM?=		dbsym
     31 MKDEP?=		mkdep
     32 STRIP?=		strip
     33 OBJCOPY?=	objcopy
     34 OBJDUMP?=	objdump
     35 CSCOPE?=	cscope
     36 MKID?=		mkid
     37 UUDECODE?=	${TOOL_UUDECODE:Uuudecode}
     38 HEXDUMP?=	${TOOL_HEXDUMP:Uhexdump}
     39 GENASSYM?=	${TOOL_GENASSYM:Ugenassym}
     40 .MAKEOVERRIDES+=USETOOLS	# make sure proper value is propagated
     41 
     42 _MKMSG?=		@\#
     43 _MKSHMSG?=		echo
     44 _MKSHECHO?=		echo
     45 _MKSHNOECHO=		:
     46 _MKMSG_CREATE?=		:
     47 _MKTARGET_COMPILE?=	:
     48 _MKTARGET_CREATE?=	:
     49 
     50 ##
     51 ## (1) port independent source tree identification
     52 ##
     53 # source tree is located via $S relative to the compilation directory
     54 .ifndef S
     55 S!=	cd ../../../.. && pwd
     56 .endif
     57 
     58 ##
     59 ## (2) compile settings
     60 ##
     61 ## CPPFLAGS, CFLAGS, and AFLAGS must be set in the port's Makefile
     62 ##
     63 INCLUDES?=	-I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \
     64 		-I$S -nostdinc
     65 CPPFLAGS+=	${INCLUDES} ${IDENT} -D_KERNEL -D_KERNEL_OPT
     66 .if !defined(COVERITY_TOP_CONFIG)
     67 CPPFLAGS+=	-std=gnu99
     68 .endif
     69 DEFCOPTS?=	-O2
     70 COPTS?=		${DEFCOPTS}
     71 DBG=		# might contain unwanted -Ofoo
     72 CWARNFLAGS+=	-Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
     73 CWARNFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes
     74 CWARNFLAGS+=	-Wold-style-definition
     75 CWARNFLAGS+=	-Wswitch -Wshadow
     76 CWARNFLAGS+=	-Wcast-qual -Wwrite-strings
     77 CWARNFLAGS+=	-Wno-unreachable-code
     78 #CWARNFLAGS+=	-Wc++-compat -Wno-error=c++-compat
     79 CWARNFLAGS+=	-Wno-pointer-sign -Wno-attributes
     80 .  if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
     81 	${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
     82 CWARNFLAGS+=	-Wextra -Wno-unused-parameter
     83 .  endif
     84 .  if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64"
     85 CWARNFLAGS+=	-Wold-style-definition
     86 .  endif
     87 # Add -Wno-sign-compare.  -Wsign-compare is included in -Wall as of GCC 3.3,
     88 # but our sources aren't up for it yet.
     89 CWARNFLAGS+=	-Wno-sign-compare
     90 
     91 CWARNFLAGS.clang+=	-Wno-unknown-pragmas -Wno-conversion \
     92 			-Wno-self-assign -Wno-error=address-of-packed-member \
     93 			-Wno-error=constant-conversion
     94 
     95 CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":? \
     96     -Wno-shift-count-negative -Wno-shift-count-overflow:}
     97 
     98 CWARNFLAGS.ioconf.c= ${${ACTIVE_CC} == "clang":? -Wno-unused-const-variable :}
     99 
    100 CFLAGS+=	-ffreestanding -fno-zero-initialized-in-bss
    101 CFLAGS+=	${${ACTIVE_CC} == "gcc":? -fno-delete-null-pointer-checks :}
    102 CFLAGS+=	${DEBUG} ${COPTS}
    103 AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
    104 
    105 # XXX
    106 .if defined(HAVE_GCC) || defined(HAVE_LLVM)
    107 CFLAGS+=	-fno-strict-aliasing
    108 CFLAGS+=	-fno-common
    109 .endif
    110 
    111 # Use the per-source COPTS variables to add -g to just those
    112 # files that match the shell patterns given in ${DEBUGLIST}
    113 #
    114 .for i in ${DEBUGLIST}
    115 . for j in ${ALLFILES:M*.c:T:M$i.c}
    116 COPTS.${j}+=-g
    117 . endfor
    118 .endfor
    119 
    120 # Always compile debugsyms.c with debug information.
    121 # This allows gdb to use type informations.
    122 #
    123 COPTS.debugsyms.c+=	-g
    124 
    125 # Add CTF sections for DTrace
    126 .if defined(CTFCONVERT)
    127 COMPILE_CTFCONVERT=	${_MKSHECHO}\
    128 			${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
    129 			${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
    130 .else
    131 COMPILE_CTFCONVERT=	${_MKSHNOECHO}
    132 .endif
    133 
    134 KCOMPILE.c=	${CC} ${COPTS.${<:T}} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
    135 KCOMPILE.s=	${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} -c $< -o $@
    136 KLINK.o=	${LD} -r ${LINKFORMAT} -Map=${.TARGET}.map -o ${.TARGET} ${.ALLSRC}
    137 
    138 # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
    139 # NOPROF and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
    140 NORMAL_C?=	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}" && \
    141 		${_MKSHECHO} ${KCOMPILE.c} ${PROF} && \
    142 		${KCOMPILE.c} ${PROF} && \
    143 		${COMPILE_CTFCONVERT}
    144 NOPROF_C?=	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}" && \
    145 		${_MKSHECHO} ${KCOMPILE.c} && \
    146 		${KCOMPILE.c} && \
    147 		${COMPILE_CTFCONVERT}
    148 NORMAL_S?=	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}" && \
    149 		${_MKSHECHO} ${KCOMPILE.s} && \
    150 		${KCOMPILE.s}
    151 
    152 # link rules:
    153 LINK_O?=	@${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}" && \
    154 		${_MKSHECHO} ${KLINK.o} && \
    155 		${KLINK.o}
    156 
    157 ##
    158 ## (3) libkern and compat
    159 ##
    160 ## Set KERN_AS in the port Makefile to "obj" or "library".  The
    161 ## default is "library", as documented in $S/lib/libkern/Makefile.inc.
    162 ##
    163 
    164 ### find out what to use for libkern
    165 .include "$S/lib/libkern/Makefile.inc"
    166 .ifndef PROF
    167 LIBKERN?=	${KERNLIB}
    168 .else
    169 LIBKERN?=	${KERNLIB_PROF}
    170 .endif
    171 
    172 LIBKERNLN?=	${KERNLIBLN}
    173 
    174 ### find out what to use for libcompat
    175 .include "$S/compat/common/Makefile.inc"
    176 .ifndef PROF
    177 SYSLIBCOMPAT?=	${COMPATLIB}
    178 .else
    179 SYSLIBCOMPAT?=	${COMPATLIB_PROF}
    180 .endif
    181 
    182 SYSLIBCOMPATLN?=	${COMPATLIBLN}
    183 
    184 ##
    185 ## (4) local objects, compile rules, and dependencies
    186 ##
    187 ## Each port should have a corresponding section with settings for
    188 ## MD_CFILES, MD_SFILES, and MD_OBJS, along with build rules for same.
    189 ##
    190 
    191 .if !defined(___USE_SUFFIX_RULES___)
    192 _MD_OBJS=	${MD_OBJS:T}
    193 .else
    194 _MD_OBJS=	${MD_OBJS}
    195 .endif
    196 
    197 ##
    198 ## (5) link settings
    199 ##
    200 ## TEXTADDR (or LOADADDRESS), LINKFORMAT, LINKSCRIPT, and any EXTRA_LINKFLAGS
    201 ## must be set in the port's Makefile.  The port specific definitions for
    202 ## LINKFLAGS_NORMAL and LINKFLAGS_DEBUG will added to the LINKFLAGS
    203 ## depending on the value of DEBUG.
    204 ##
    205 # load lines for config "xxx" will be emitted as:
    206 # xxx: ${SYSTEM_DEP} swapxxxx.o vers.o build_kernel
    207 
    208 SYSTEM_LIB=	${MD_LIBS} ${SYSLIBCOMPAT} ${LIBKERN}
    209 SYSTEM_OBJ?=	${_MD_OBJS} ${OBJS} ${SYSTEM_LIB}
    210 SYSTEM_DEP+=	Makefile ${SYSTEM_OBJ:O}
    211 .if defined(CTFMERGE)
    212 SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
    213 .else
    214 SYSTEM_CTFMERGE= ${_MKSHECHO}
    215 .endif
    216 
    217 REMOVE_SWAP=   [@]
    218 .for k in ${KERNELS}
    219 REMOVE_SWAP:=  ${REMOVE_SWAP}:Nswap${k}.o
    220 .endfor
    221 
    222 SYSTEM_LD_HEAD?=@rm -f $@
    223 SYSTEM_LD?=	${_MKSHMSG} "   link  ${.CURDIR:T}/${.TARGET}"; \
    224 		${_MKSHECHO}\
    225 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
    226 		'$${SYSTEM_OBJ:${REMOVE_SWAP}}' '$${EXTRA_OBJ}' vers.o \
    227 		${OBJS:M*swap${.TARGET}.o}; \
    228 		${LD} -Map ${.TARGET}.map --cref ${LINKFLAGS} -o ${.TARGET} \
    229 		${SYSTEM_OBJ:${REMOVE_SWAP}} ${EXTRA_OBJ} vers.o \
    230 		${OBJS:M*swap${.TARGET}.o}
    231 
    232 TEXTADDR?=	${LOADADDRESS}			# backwards compatibility
    233 LINKTEXT?=	${TEXTADDR:C/.+/-Ttext &/}
    234 LINKDATA?=	${DATAADDR:C/.+/-Tdata &/}
    235 ENTRYPOINT?=	start
    236 LINKENTRY?=	${ENTRYPOINT:C/.+/-e &/}
    237 LINKFLAGS?=	${LINKFORMAT} ${LINKSCRIPT} ${LINKTEXT} ${LINKDATA} ${LINKENTRY} \
    238 		${EXTRA_LINKFLAGS}
    239 
    240 LINKFLAGS_DEBUG?=	-X
    241 
    242 SYSTEM_LD_TAIL?=@${TOOL_SED} '/const char sccs/!d;s/.*@(.)//;s/" "//;s/\\.*//' vers.c && \
    243 		${SIZE} $@ && chmod 755 $@ && \
    244 		${SYSTEM_CTFMERGE}
    245 SYSTEM_LD_TAIL_DEBUG?=&& \
    246 		echo mv -f $@ $@.gdb && mv -f $@ $@.gdb && \
    247 		echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb && \
    248 		${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
    249 LINKFLAGS_NORMAL?=	-S
    250 STRIPFLAGS?=	-g
    251 
    252 DEBUG?=
    253 .if !empty(DEBUG:M-g*)
    254 SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
    255 LINKFLAGS+=	${LINKFLAGS_DEBUG}
    256 EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
    257 CTFFLAGS+=	-g
    258 TARGETSFX=	.gdb
    259 .elifndef PROF
    260 LINKFLAGS+=	${LINKFLAGS_NORMAL}
    261 .endif
    262 
    263 SYSTEM_LD_HEAD+=	${SYSTEM_LD_HEAD_EXTRA}
    264 SYSTEM_LD_TAIL_STAGE1=	${SYSTEM_LD_TAIL}
    265 SYSTEM_LD_TAIL_STAGE2=	${SYSTEM_LD_TAIL}
    266 .if defined(COPY_SYMTAB)
    267 SYSTEM_LD_TAIL_STAGE2+=	&& echo ${DBSYM} $@ && ${DBSYM} $@
    268 .if !empty(DEBUG:M-g)
    269 SYSTEM_LD_TAIL_STAGE2+=	&& echo ${DBSYM} $@.gdb && ${DBSYM} $@.gdb
    270 .endif
    271 .endif
    272 SYSTEM_LD_TAIL_STAGE2+=	${SYSTEM_LD_TAIL_EXTRA}
    273 
    274 ##
    275 ## (6) port independent targets and dependencies: assym.h, vers.o
    276 ##
    277 
    278 .if !defined(___USE_SUFFIX_RULES___)
    279 
    280 # Generate list of *.o files to pass to ${LD}, preserving order.
    281 #	x/y/z/a.[csS] -> a.[csS]
    282 #	a.[csS] -> a.o
    283 OBJS=	${ALLFILES:C|^.*/([^/]*\.[csS])$$|\1|:C|^(.*)\.[csS]$$|\1.o|}
    284 
    285 CFILES=	${ALLFILES:M*.c}
    286 SFILES=	${ALLFILES:M*.[sS]}
    287 OFILES=	${ALLFILES:M*.o}
    288 # absolute, generated (build directory), relative (under $S)
    289 _CFILES=${CFILES:M/*} ${CFILES:N/*:N*/*} ${CFILES:N/*:M*/*:C|^|$S/|}
    290 _SFILES=${SFILES:M/*} ${SFILES:N/*:N*/*} ${SFILES:N/*:M*/*:C|^|$S/|}
    291 _MD_CFILES=${MD_CFILES}
    292 _MD_SFILES=${MD_SFILES}
    293 CSRCS=	${_MD_CFILES} ${_CFILES}
    294 SSRCS=	${_MD_SFILES} ${_SFILES}
    295 SRCS=	${CSRCS} ${SSRCS}
    296 
    297 .else # ___USE_SUFFIX_RULES___
    298 OBJS=	${ALLFILES:C|\.[csS]$$|.o|}
    299 SRCS=	${ALLFILES:M*.[csS]}
    300 .endif # ___USE_SUFFIX_RULES___
    301 
    302 .if !defined(___USE_SUFFIX_RULES___)
    303 .for _s in ${_CFILES}
    304 .if !commands(${_s:T:R}.o)
    305 ${_s:T:R}.o: ${_s}
    306 	${NORMAL_C}
    307 .endif
    308 .endfor
    309 
    310 .for _s in ${_SFILES}
    311 .if !commands(${_s:T:R}.o)
    312 ${_s:T:R}.o: ${_s}
    313 	${NORMAL_S}
    314 .endif
    315 .endfor
    316 .endif # !___USE_SUFFIX_RULES___
    317 
    318 .include "${S}/conf/ldscript.mk"
    319 .include "${S}/conf/assym.mk"
    320 .include "${S}/conf/newvers.mk"
    321 .include "${S}/dev/splash/splash.mk"
    322 .include "${S}/conf/mdroot.mk"
    323 .include "${S}/conf/lint.mk"
    324 .include "${S}/conf/cscope.mk"
    325 .include "${S}/conf/gdbinit.mk"
    326 .include "${S}/conf/ssp.mk"
    327 .if "${_SKIP_DTS}" != "yes"
    328 .include "${S}/conf/dts.mk"
    329 .endif
    330 
    331 ##
    332 ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags,
    333 ##                   cscope, mkid
    334 ##
    335 ## Any ports that have other stuff to be cleaned up should fill in
    336 ## EXTRA_CLEAN.  Some ports may want different settings for
    337 ## KERNLINTFLAGS, MKDEP_CFLAGS, or MKDEP_AFLAGS.
    338 ##
    339 
    340 ##
    341 ## clean
    342 ##
    343 
    344 .if !target(__CLEANKERNEL)
    345 __CLEANKERNEL: .USE
    346 	${_MKMSG} "${.TARGET}ing the kernel objects"
    347 	rm -f ${KERNELS} *.map eddep tags *.[io] *.ko *.ln [a-z]*.s vers.c \
    348 	    [Ee]rrs linterrs makelinks assym.h.tmp assym.h \
    349 	    ${EXTRA_KERNELS} ${EXTRA_CLEAN}
    350 .endif
    351 
    352 .if !target(kernelnames)
    353 kernelnames:
    354 	@echo "${KERNELS} ${EXTRA_KERNELS}"
    355 .endif
    356 
    357 .if !target(__CLEANDEPEND)
    358 __CLEANDEPEND: .USE
    359 	echo .depend ${DEPS} | xargs rm -f --
    360 .endif
    361 
    362 # do not !target these, the kern and compat Makefiles augment them
    363 cleandir distclean: __CLEANKERNEL __CLEANDEPEND
    364 clean: __CLEANKERNEL
    365 depend: .depend
    366 dependall: depend .WAIT all
    367 
    368 ##
    369 ## depend
    370 ##
    371 
    372 .if !target(.depend)
    373 MKDEP_AFLAGS?=	${AFLAGS}
    374 MKDEP_CFLAGS?=	${CFLAGS}
    375 .if !defined(___USE_SUFFIX_RULES___)
    376 DEPS+=	${SRCS:T:R:S/$/.d/g}
    377 .else
    378 DEPS+=	${SRCS:R:S/$/.d/g}
    379 .endif
    380 
    381 .if !defined(___USE_SUFFIX_RULES___)
    382 .for _s in ${SSRCS}
    383 .if !commands(${_s:T:R}.d)
    384 ${_s:T:R}.d: ${_s}
    385 	${_MKTARGET_CREATE}
    386 	${MKDEP} -f ${.TARGET}.tmp -- ${MKDEP_AFLAGS} \
    387 	    ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s}
    388 	mv -f ${.TARGET}.tmp ${.TARGET}
    389 .endif
    390 .endfor
    391 
    392 .for _s in ${CSRCS}
    393 .if !commands(${_s:T:R}.d)
    394 ${_s:T:R}.d: ${_s}
    395 	${_MKTARGET_CREATE}
    396 	${MKDEP} -f ${.TARGET}.tmp -- ${MKDEP_CFLAGS} \
    397 	    ${CPPFLAGS} ${CPPFLAGS.${_s:T}} ${_s}
    398 	mv -f ${.TARGET}.tmp ${.TARGET}
    399 .endif
    400 .endfor
    401 .endif # !___USE_SUFFIX_RULES___
    402 
    403 .depend: ${DEPS:O}
    404 	${_MKTARGET_CREATE}
    405 	echo "${.ALLSRC}" | ${MKDEP} -D
    406 .endif
    407 
    408 ##
    409 ## install
    410 ##
    411 
    412 # List of kernel images that will be installed into the root file system.
    413 # Some platforms may need to install more than one (e.g. a netbsd.aout file
    414 # to be loaded directly by the firmware), so this can be overriden by them.
    415 KERNIMAGES?=	netbsd
    416 
    417 .if !target(install)
    418 # The install target can be redefined by putting a
    419 # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
    420 MACHINE_NAME!=  uname -n
    421 install: install-kernel-${MACHINE_NAME}
    422 .if !target(install-kernel-${MACHINE_NAME})
    423 install-kernel-${MACHINE_NAME}:
    424 .for _K in ${KERNIMAGES}
    425 	rm -f ${DESTDIR}/o${_K}
    426 	ln ${DESTDIR}/${_K} ${DESTDIR}/o${_K}
    427 	cp ${_K} ${DESTDIR}/n${_K}
    428 	mv ${DESTDIR}/n${_K} ${DESTDIR}/${_K}
    429 .endfor
    430 .endif
    431 .endif
    432 
    433 ##
    434 ## the kernel
    435 ##
    436 
    437 AFLAGS+=	${AOPTS.${.IMPSRC:T}}
    438 CFLAGS+=	${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}}
    439 CPPFLAGS+=	${CPPFLAGS.${.IMPSRC:T}}
    440 CWARNFLAGS+=	${CWARNFLAGS.${.IMPSRC:T}}
    441 
    442 .MAIN: all
    443 all: .gdbinit
    444 .for k in ${KERNELS}
    445 all: .WAIT ${k}
    446 ${k}: ${SYSTEM_DEP:O} swap${k}.o vers.o build_kernel
    447 .endfor
    448 
    449 .if !defined(COPY_SYMTAB)
    450 build_kernel: .USE
    451 	${SYSTEM_LD_HEAD}
    452 	${SYSTEM_LD}
    453 	${SYSTEM_LD_TAIL_STAGE2}
    454 .else
    455 .for k in ${KERNELS}
    456 ${k}: $S/kern/kern_ksyms_buf.c
    457 .endfor
    458 build_kernel: .USE
    459 	${CC} ${CFLAGS} ${CPPFLAGS} \
    460 	    -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf.o
    461 	${SYSTEM_LD_HEAD}
    462 	${SYSTEM_LD} kern_ksyms_buf.o
    463 	${SYSTEM_LD_TAIL_STAGE1}
    464 	${CC} ${CFLAGS} ${CPPFLAGS} \
    465 	    -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \
    466 	    -c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o
    467 	${SYSTEM_LD_HEAD}
    468 	${SYSTEM_LD} kern_ksyms_buf_real.o
    469 	${SYSTEM_LD_TAIL_STAGE2}
    470 .endif
    471 
    472 .include <bsd.files.mk>
    473 .include <bsd.clang-analyze.mk>
    474 
    475 ##
    476 ## suffix rules
    477 ##
    478 
    479 .if defined(___USE_SUFFIX_RULES___)
    480 .SUFFIXES: .s .d
    481 .s.d:
    482 	${_MKTARGET_CREATE}
    483 	${MKDEP} -f $@.tmp -- ${MKDEP_AFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $<
    484 	mv -f $@.tmp $@
    485 
    486 .SUFFIXES: .S .d
    487 .S.d:
    488 	${_MKTARGET_CREATE}
    489 	${MKDEP} -f $@.tmp -- ${MKDEP_AFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $<
    490 	mv -f $@.tmp $@
    491 
    492 .SUFFIXES: .c .d
    493 .c.d:
    494 	${_MKTARGET_CREATE}
    495 	${MKDEP} -f $@.tmp -- ${MKDEP_CFLAGS} ${CPPFLAGS} ${CPPFLAGS.${<:T}} $<
    496 	mv -f $@.tmp $@
    497 
    498 .SUFFIXES: .c .o .go .po
    499 .c.o:
    500 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    501 	@${_MKSHECHO} ${KCOMPILE.c}
    502 	@${KCOMPILE.c}
    503 	@${COMPILE_CTFCONVERT}
    504 .c.go:
    505 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    506 	@${_MKSHECHO} ${KCOMPILE.c} -g
    507 	@${KCOMPILE.c} -g
    508 	@${COMPILE_CTFCONVERT}
    509 .c.po:
    510 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    511 	@${_MKSHECHO} ${KCOMPILE.c} -pg
    512 	@${KCOMPILE.c} -pg
    513 	@${COMPILE_CTFCONVERT}
    514 
    515 .SUFFIXES: .s .o .go .po
    516 .s.o:
    517 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    518 	@${_MKSHECHO} ${KCOMPILE.s}
    519 	@${KCOMPILE.s}
    520 .s.go:
    521 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    522 	@${_MKSHECHO} ${KCOMPILE.s} -g
    523 	@${KCOMPILE.s} -g
    524 .s.po:
    525 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    526 	@${_MKSHECHO} ${KCOMPILE.s} -pg
    527 	@${KCOMPILE.s} -pg
    528 
    529 .S.o:
    530 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    531 	@${_MKSHECHO} ${KCOMPILE.s}
    532 	@${KCOMPILE.s}
    533 .S.go:
    534 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    535 	@${_MKSHECHO} ${KCOMPILE.s} -g
    536 	@${KCOMPILE.s} -g
    537 .S.po:
    538 	@${_MKSHMSG} "compile  ${.CURDIR:T}/${.TARGET}"
    539 	@${_MKSHECHO} ${KCOMPILE.s} -pg
    540 	@${KCOMPILE.s} -pg
    541 .endif # ___USE_SUFFIX_RULES___
    542 
    543 ##
    544 ## the end
    545 ##
    546