1 # $NetBSD: Makefile.sh3,v 1.25 2008/03/01 14:01:44 joerg Exp $
5 # This makefile is constructed from a machine description:
7 # Most changes should be made in the machine description
8 # /sys/arch/<machine>/conf/``machineid''
9 # after which you should do
11 # CPU generic makefile changes should be made in
12 # /sys/arch/sh3/conf/Makefile.sh3
13 # after which config should be rerun for all machines of that type.
15 # To specify debugging, add the config line: makeoptions DEBUG="-g"
16 # A better way is to specify -g only for a few files.
18 # makeoptions DEBUGLIST="uvm* trap if_*"
21 NEED_OWN_INSTALL_TARGET?=no
25 ## (1) port identification
27 THISSH3= $S/arch/${MACHINE}
29 GENASSYM_CONF= ${SH3}/sh3/genassym.cf
30 .-include "${THISSH3}/conf/Makefile.${MACHINE}.inc"
33 ## (2) compile settings
35 CPPFLAGS+= -D${MACHINE}
36 AFLAGS+= -x assembler-with-cpp -traditional-cpp
37 # -O2 is too -falign-* zealous for low-memory sh3 machines
38 COPTS?= -Os -freorder-blocks
41 ## (3) libkern and compat
45 ## (4) local objects, compile rules, and dependencies
49 MD_SFILES= ${THISSH3}/${MACHINE}/locore.S
51 locore.o: ${THISSH3}/${MACHINE}/locore.S assym.h
54 cpu_in_cksum.o exception_vector.o locore_subr.o: assym.h
59 TEXTADDR?= ${DEFTEXTADDR}
63 ## (6) port specific target dependencies
66 # depend on CPU configuration
67 locore.o machdep.o: Makefile
74 ## (8) config(8) generated machinery
89 ## (9) port independent kernel machinery
91 .include "$S/conf/Makefile.kern.inc"
94 ## (10) Appending make options.