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