Makefile.sun3 revision 1.106
1# $NetBSD: Makefile.sun3,v 1.106 2018/03/03 03:19:36 mrg 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/sun3/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/sun3/conf/Makefile.sun3
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
20MACHINE_ARCH=m68k
21USETOOLS?=	no
22NEED_OWN_INSTALL_TARGET?=no
23.include <bsd.own.mk>
24
25##
26## (1) port identification
27##
28SUN3=		$S/arch/sun3
29GENASSYM_CONF=	${SUN3}/${MACHTYPE}/genassym.cf
30
31##
32## (2) compile settings
33##
34CPPFLAGS+=	-Dsun3
35CFLAGS+=	${CMACHFLAGS} -fno-defer-pop
36CFLAGS+=	-msoft-float
37AFLAGS+=	-x assembler-with-cpp
38
39##
40## (3) libkern and compat
41##
42OPT_MODULAR=   %MODULAR%
43.if !empty(OPT_MODULAR)
44KERN_AS=       obj
45.else
46KERN_AS=       library
47.endif
48
49##
50## (4) local objects, compile rules, and dependencies
51##
52MD_OBJS=	locore.o
53MD_CFILES=
54MD_SFILES=	${SUN3}/${MACHTYPE}/locore.s
55
56locore.o: ${SUN3}/${MACHTYPE}/locore.s
57	${NORMAL_S}
58
59.include "$S/arch/m68k/conf/Makefile.kern.m68k.inc"
60
61##
62## (5) link settings
63##
64.if ${MACHTYPE} == "sun3x"
65TEXTADDR?=	F8004000
66.else
67TEXTADDR?=	0E004000
68.endif
69LINKFORMAT=	-N
70
71##
72## (6) port specific target dependencies
73##
74
75# For cross-compilation, the "gcc -M" mkdep script is convenient,
76# but that does not correctly make rules from *.s files.  The
77# easiest work-around is to just list those dependencies here.
78locore.o:   assym.h m68k/asm.h m68k/trap.h
79copy.o:     assym.h m68k/asm.h $S/sys/errno.h
80bcopy.o:    assym.h m68k/asm.h
81copypage.o: assym.h m68k/asm.h
82lock_stubs.o: assym.h
83
84# depend on CPU configuration
85db_machdep.o dvma.o machdep.o pmap.o sun3_startup.o vm_machdep.o: Makefile
86
87# depends on DDB, etc.
88stub.o: Makefile
89
90##
91## (7) misc settings
92##
93
94##
95## (8) config(8) generated machinery
96##
97%INCLUDES
98
99%OBJS
100
101%CFILES
102
103%SFILES
104
105%LOAD
106
107%RULES
108
109##
110## (9) port independent kernel machinery
111##
112.include "$S/conf/Makefile.kern.inc"
113
114##
115## (10) Appending make options.
116##
117%MAKEOPTIONSAPPEND
118