Makefile.sun2 revision 1.23
1# $NetBSD: Makefile.sun2,v 1.23 2018/09/22 12:05:52 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/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
44.else
45KERN_AS=	library
46.endif
47# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that
48# XXX our MACHINE_ARCH is m68000, and not m68k.  --fredette
49KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}
50
51##
52## (4) local objects, compile rules, and dependencies
53##
54MD_OBJS=	locore.o
55MD_CFILES=
56MD_SFILES=	${SUN2}/sun2/locore.s
57
58locore.o: ${SUN2}/sun2/locore.s
59	${NORMAL_S}
60
61##
62## (5) link settings
63##
64LINKFORMAT=	-N
65TEXTADDR?=	00006000
66
67##
68## (6) port specific target dependencies
69##
70
71# For cross-compilation, the "gcc -M" mkdep script is convenient,
72# but that does not correctly make rules from *.s files.  The
73# easiest work-around is to just list those dependencies here.
74locore.o:   assym.h m68k/asm.h m68k/trap.h
75copy.o:     assym.h m68k/asm.h $S/sys/errno.h
76bcopy.o:    assym.h m68k/asm.h
77copypage.o: assym.h m68k/asm.h
78lock_stubs.o: assym.h
79
80# depend on CPU configuration
81db_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile
82
83# depends on DDB, etc.
84stub.o: Makefile
85
86##
87## (7) misc settings
88##
89
90##
91## (8) config(8) generated machinery
92##
93%INCLUDES
94
95%OBJS
96
97%CFILES
98
99%SFILES
100
101%LOAD
102
103%RULES
104
105##
106## (9) port independent kernel machinery
107##
108.include "$S/conf/Makefile.kern.inc"
109
110##
111## (10) Appending make options.
112##
113%MAKEOPTIONSAPPEND
114