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