1#         $NetBSD: Makefile.acorn32,v 1.25 2021/11/08 23:35:43 rin Exp $
2
3# Makefile for NetBSD
4#
5# This makefile is constructed from a machine description:
6#         config machineid
7# Most changes should be made in the machine description
8#         /sys/arch/acorn32/conf/``machineid''
9# after which you should do
10#         config machineid
11# Machine generic makefile changes should be made in
12#         /sys/arch/acorn32/conf/Makefile.acorn32
13# after which config should be rerun for all machines of that type.
14#
15# To specify debugging, add the config line: makeoptions DEBUG="-g"
16# A better way is to specify -g only for a few files.
17#
18#         makeoptions DEBUGLIST="uvm* trap if_*"
19
20USETOOLS?=          no
21NEED_OWN_INSTALL_TARGET?=no
22.include <bsd.own.mk>
23
24##
25## (1) port identification
26##
27ACORN32=  $S/arch/acorn32
28ARM=                $S/arch/arm
29GENASSYM_CONF=      ${ARM}/arm32/genassym.cf
30GENASSYM_EXTRAS+=   ${ACORN32}/acorn32/genassym.cf
31
32##
33## (2) compile settings
34##
35CPPFLAGS+=          -Darm32
36CWARNFLAGS+=        -Wcomment
37AFLAGS+=  -x assembler-with-cpp
38
39OPT_DDB=  %DDB%
40.if !empty(OPT_DDB) && ${HAVE_GCC:U0} > 0
41CFLAGS+=  -mapcs-frame
42.endif
43
44##
45## (3) libkern and compat
46##
47OPT_MODULAR=        %MODULAR%
48
49##
50## (4) local objects, compile rules, and dependencies
51##
52MD_OBJS=  locore.o
53MD_CFILES=
54MD_SFILES=          ${ARM}/arm32/locore.S
55
56atomic.o bcopy_page.o bcopyinout.o copystr.o cpuswitch.o: assym.h
57cpu_in_cksum.o exception.o fiq_subr.o fusu.o iomd_irqhandler.o: assym.h
58iomd_irq.o sigcode.o spl.o vectors.o: assym.h
59
60locore.o: ${ARM}/arm32/locore.S assym.h
61          ${NORMAL_S}
62
63MD_OBJS+= modedefs.o
64MD_CFILES+=         modedefs.c
65
66.ifdef MONITOR
67modedefs.c: ${ARM}/iomd/makemodes.awk ${ACORN32}/conf/monitors/${MONITOR} Makefile
68          ${_MKTARGET_CREATE}
69          ${TOOL_AWK} -f ${ARM}/iomd/makemodes.awk \
70                    ${ACORN32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c
71.else
72modedefs.c: ${ARM}/iomd/makemodes.awk Makefile
73          ${_MKTARGET_CREATE}
74          ${TOOL_AWK} -f ${ARM}/iomd/makemodes.awk </dev/null >modedefs.c
75.endif
76
77modedefs.o: modedefs.c
78          ${NORMAL_C}
79
80
81##
82## (5) link settings
83##
84LOADADDRESS?=       0xF0000000
85LINKFORMAT=         -N
86LINKFLAGS_NORMAL=   -x
87
88##
89## (6) port specific target dependencies
90##
91
92# depend on CPU configuration
93cpufunc.o cpufunc_asm.o: Makefile
94
95# depend on DIAGNOSTIC etc.
96cpuswitch.o fault.o machdep.o: Makefile
97
98##
99## (7) misc settings
100##
101
102##
103## (8) config(8) generated machinery
104##
105%INCLUDES
106
107%OBJS
108
109%CFILES
110
111%SFILES
112
113%LOAD
114
115%RULES
116
117##
118## (9) port independent kernel machinery
119##
120.include "$S/conf/Makefile.kern.inc"
121
122##
123## (10) Appending make options.
124##
125%MAKEOPTIONSAPPEND
126