Makefile.i386 revision 1.119
1#	$NetBSD: Makefile.i386,v 1.119 2001/11/16 00:23:03 atatat 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
25##
26## (1) port identification
27##
28I386=		$S/arch/i386
29GENASSYM=	${I386}/i386/genassym.cf
30MD_CPPFLAGS=	-Di386
31
32##
33## (2) compile settings
34##
35CPPFLAGS=	${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT \
36		${MD_CPPFLAGS}
37COPTS?=		-O2
38CFLAGS=		${DEBUG} ${COPTS} ${CWARNFLAGS}
39AFLAGS=		-x assembler-with-cpp -traditional-cpp -D_LOCORE
40
41##
42## (3) libkern and compat 
43##
44KERN_AS=	obj
45
46##
47## (4) local objects, compile rules, and dependencies
48##
49MD_OBJS=	locore.o
50MD_CFILES=
51MD_SFILES=	${I386}/i386/locore.s
52
53locore.o: ${I386}/i386/locore.s assym.h
54	${NORMAL_S}
55
56##
57## (5) link settings
58##
59TEXTADDR?=	c0100000
60EXTRA_LINKFLAGS=-X
61.if (${OBJECT_FMT} == "ELF")
62KERN_LDSCRIPT?=	kern.ldscript
63LINKFORMAT=	-T ${I386}/conf/${KERN_LDSCRIPT}
64.else
65LINKFORMAT=	-z
66.endif
67
68##
69## (6) port specific target dependencies
70##
71
72freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o svr4_sigcode.o: assym.h
73apmcall.o in_cksum.o pnpbioscall.o: assym.h
74
75##
76## (7) misc settings
77##
78KERNLINTFLAGS=	-bceghnxzF
79
80##
81## (8) config(8) generated machinery
82##
83%INCLUDES
84
85%OBJS
86
87%CFILES
88
89%SFILES
90
91%LOAD
92
93%RULES
94
95##
96## (9) port independent kernel machinery
97##
98.include "$S/conf/Makefile.kern.inc"
99