05e60fd761
sys/conf/Makefile.kern.inc has it for gcc4.
117 lines
2.5 KiB
Makefile
117 lines
2.5 KiB
Makefile
# $NetBSD: Makefile.arm,v 1.32 2008/04/27 03:23:13 tsutsui Exp $
|
|
|
|
# Makefile for NetBSD
|
|
#
|
|
# This makefile is constructed from a machine description:
|
|
# config machineid
|
|
# Most changes should be made in the machine description
|
|
# /sys/arch/<arch>/conf/``machineid''
|
|
# after which you should do
|
|
# config machineid
|
|
# Machine generic makefile changes should be made in
|
|
# /sys/arch/arm/conf/Makefile.arm
|
|
# after which config should be rerun for all machines of that type.
|
|
#
|
|
# To specify debugging, add the config line: makeoptions DEBUG="-g"
|
|
# A better way is to specify -g only for a few files.
|
|
#
|
|
# makeoptions DEBUGLIST="uvm* trap if_*"
|
|
|
|
USETOOLS?= no
|
|
NEED_OWN_INSTALL_TARGET?=no
|
|
.include <bsd.own.mk>
|
|
|
|
##
|
|
## (1) port identification
|
|
##
|
|
THISARM= $S/arch/${MACHINE}
|
|
ARM= $S/arch/arm
|
|
GENASSYM_CONF= ${ARM}/arm32/genassym.cf
|
|
.-include "$S/arch/${MACHINE}/conf/Makefile.${MACHINE}.inc"
|
|
|
|
##
|
|
## (2) compile settings
|
|
##
|
|
# CPPFLAGS set by platform-specific Makefile fragment.
|
|
AFLAGS+= -x assembler-with-cpp
|
|
|
|
##
|
|
## (3) libkern and compat
|
|
##
|
|
KERN_AS= obj
|
|
|
|
##
|
|
## (4) local objects, compile rules, and dependencies
|
|
##
|
|
MD_OBJS+= ${SYSTEM_FIRST_OBJ} locore.o
|
|
MD_CFILES+=
|
|
MD_SFILES+= ${SYSTEM_FIRST_SFILE} ${ARM}/arm32/locore.S
|
|
|
|
.if defined(SYSTEM_FIRST_OBJ)
|
|
${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h
|
|
${NORMAL_S}
|
|
.endif
|
|
|
|
locore.o: ${ARM}/arm32/locore.S assym.h
|
|
${NORMAL_S}
|
|
|
|
##
|
|
## (5) link settings
|
|
##
|
|
LOADADDRESS?= 0xF0000000
|
|
LINKFLAGS_NORMAL= -X
|
|
# Strip ARM mapping symbols from the kernel image, as they interfere
|
|
# with ddb. Do it differently if 'makeoptions DEBUG="-g"' was specified.
|
|
.if !defined(DEBUG) || empty(DEBUG:M-g*)
|
|
SYSTEM_LD_TAIL?= @${OBJCOPY} --strip-symbol='$$a' \
|
|
--strip-symbol='$$t' \
|
|
--strip-symbol='$$d' $@ ;\
|
|
${SIZE} $@; chmod 755 $@
|
|
.else
|
|
STRIPFLAGS=-g --strip-symbol='$$a' --strip-symbol='$$t' --strip-symbol='$$d'
|
|
.endif
|
|
|
|
##
|
|
## (6) port specific target dependencies
|
|
##
|
|
|
|
# depend on CPU configuration
|
|
cpufunc.o cpufunc_asm.o: Makefile
|
|
|
|
# depend on DIAGNOSTIC etc.
|
|
cpuswitch.o fault.o machdep.o: Makefile
|
|
|
|
# various assembly files that depend on assym.h
|
|
atomic.o bcopy_page.o bcopyinout.o copystr.o cpuswitch.o cpu_in_cksum.o: assym.h
|
|
exception.o fiq_subr.o fusu.o irq_dispatch.o isa_irq.o sigcode.o: assym.h
|
|
spl.o vectors.o: assym.h
|
|
|
|
##
|
|
## (7) misc settings
|
|
##
|
|
|
|
##
|
|
## (8) config(8) generated machinery
|
|
##
|
|
%INCLUDES
|
|
|
|
%OBJS
|
|
|
|
%CFILES
|
|
|
|
%SFILES
|
|
|
|
%LOAD
|
|
|
|
%RULES
|
|
|
|
##
|
|
## (9) port independent kernel machinery
|
|
##
|
|
.include "$S/conf/Makefile.kern.inc"
|
|
|
|
##
|
|
## (10) Appending make options.
|
|
##
|
|
%MAKEOPTIONSAPPEND
|