Makefile.i386 revision 1.183
1#	$NetBSD: Makefile.i386,v 1.183 2014/11/15 12:26:44 uebayasi 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/i386/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/i386/conf/Makefile.i386
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=	i386
21USETOOLS?=	no
22NEED_OWN_INSTALL_TARGET?=no
23.include <bsd.own.mk>
24
25USE_SSP?=	yes
26
27##
28## (1) port identification
29##
30I386=		$S/arch/i386
31GENASSYM_CONF=	${I386}/i386/genassym.cf
32
33##
34## (2) compile settings
35##
36DEFCOPTS=	-O2 -fno-omit-frame-pointer
37CPPFLAGS+=	-Di386
38CFLAGS+=	-msoft-float
39## no-sse implies no-sse2 but not no-avx
40CFLAGS+=	-mno-mmx -mno-sse -mno-avx
41
42##
43## (3) libkern and compat
44##
45OPT_MODULAR=	%MODULAR%
46.if !empty(OPT_MODULAR)
47KERN_AS=	obj
48.else
49KERN_AS=	library
50.endif
51
52##
53## (4) local objects, compile rules, and dependencies
54##
55MD_OBJS=	locore.o copy.o spl.o vector.o lock_stubs.o
56MD_CFILES=
57MD_SFILES=	${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \
58		${I386}/i386/vector.S ${I386}/i386/lock_stubs.S
59
60locore.o: ${I386}/i386/locore.S assym.h
61	${NORMAL_S}
62
63copy.o: ${I386}/i386/copy.S assym.h
64	${NORMAL_S}
65
66spl.o: ${I386}/i386/spl.S assym.h
67	${NORMAL_S}
68
69vector.o: ${I386}/i386/vector.S assym.h
70	${NORMAL_S}
71
72lock_stubs.o: ${I386}/i386/lock_stubs.S assym.h
73	${NORMAL_S}
74
75##
76## (5) link settings
77##
78TEXTADDR?=	c0100000
79LINKFLAGS_NORMAL=	-X
80KERN_LDSCRIPT?=	kern.ldscript
81LINKSCRIPT=	-T ${I386}/conf/${KERN_LDSCRIPT}
82
83##
84## (6) port specific target dependencies
85##
86
87freebsd_sigcode.o i386func.o ibcs2_sigcode.o linux_support.o: assym.h
88linux_sigcode.o lock_stubs.o svr4_sigcode.o mach_sigcode.o: assym.h
89cpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h
90mptramp.o: assym.h
91acpi_wakeup_low.o busfunc.o: assym.h
92
93##
94## (7) misc settings
95##
96
97.if !make(obj) && !make(clean) && !make(cleandir)
98.BEGIN:
99	@rm -f i386 && \
100		ln -s $S/arch/i386/include i386
101.endif
102
103##
104## (8) config(8) generated machinery
105##
106%INCLUDES
107
108%OBJS
109
110%CFILES
111
112%SFILES
113
114%LOAD
115
116%RULES
117
118##
119## (9) port independent kernel machinery
120##
121.include "$S/conf/Makefile.kern.inc"
122
123## Include rules for ACPI wakecode
124.include "$S/arch/x86/acpi/Makefile.wakecode.inc"
125
126##
127## (10) Appending make options.
128##
129%MAKEOPTIONSAPPEND
130