xref: /netbsd/sys/arch/sun2/conf/Makefile.sun2 (revision c4a72b64)
1# $NetBSD: Makefile.sun2,v 1.15 2002/11/26 18:51:17 thorpej 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=	${SUN2}/sun2/genassym.cf
30
31##
32## (2) compile settings
33##
34CPPFLAGS+=	-Dsun2
35CFLAGS+=	-msoft-float -fno-defer-pop
36AFLAGS+=	-x assembler-with-cpp -traditional-cpp
37
38##
39## (3) libkern and compat
40##
41KERN_AS=	obj
42# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that
43# XXX our MACHINE_ARCH is m68000, and not m68k.  --fredette
44KERNMISCMAKEFLAGS=	MACHINE_ARCH=${MACHINE_ARCH}
45
46##
47## (4) local objects, compile rules, and dependencies
48##
49MD_OBJS=	locore.o
50MD_CFILES=
51MD_SFILES=	${SUN2}/sun2/locore.s
52
53locore.o: ${SUN2}/sun2/locore.s
54	${NORMAL_S}
55
56##
57## (5) link settings
58##
59LINKFORMAT=	-N
60TEXTADDR?=	00006000
61
62##
63## (6) port specific target dependencies
64##
65
66# For cross-compilation, the "gcc -M" mkdep script is convenient,
67# but that does not correctly make rules from *.s files.  The
68# easiest work-around is to just list those dependencies here.
69locore.o:   assym.h m68k/asm.h m68k/trap.h
70copy.o:     assym.h m68k/asm.h $S/sys/errno.h
71bcopy.o:    assym.h m68k/asm.h
72copypage.o: assym.h m68k/asm.h
73
74# depend on CPU configuration
75db_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile
76
77# depends on DDB, etc.
78stub.o: Makefile
79
80##
81## (7) misc settings
82##
83
84##
85## (8) config(8) generated machinery
86##
87%INCLUDES
88
89%OBJS
90
91%CFILES
92
93%SFILES
94
95%LOAD
96
97%RULES
98
99##
100## (9) port independent kernel machinery
101##
102.include "$S/conf/Makefile.kern.inc"
103