Makefile.amd64 revision 1.5
1#	$NetBSD: Makefile.amd64,v 1.5 2004/06/04 04:45:50 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/amd64/conf/``machineid''
9# after which you should do
10#	config machineid
11# Machine generic makefile changes should be made in
12#	/sys/arch/amd64/conf/Makefile.amd64
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=x86_64
21USETOOLS?=	no
22NEED_OWN_INSTALL_TARGET?=no
23.include <bsd.own.mk>
24
25##
26## (1) port identification
27##
28AMD64=		$S/arch/amd64
29GENASSYM=	${AMD64}/amd64/genassym.cf
30
31##
32## (2) compile settings
33##
34DEFCOPTS=	-O2
35CPPFLAGS+=	-Damd64 -Dx86_64
36CFLAGS+=	-mcmodel=kernel
37CFLAGS+=	-mno-red-zone
38AFLAGS+=	-x assembler-with-cpp -traditional-cpp
39
40##
41## (3) libkern and compat
42##
43KERN_AS=	obj
44
45##
46## (4) local objects, compile rules, and dependencies
47##
48MD_OBJS=	locore.o vector.o copy.o microtime.o spl.o
49MD_CFILES=
50MD_SFILES=	${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \
51		${AMD64}/amd64/copy.S ${AMD64}/amd64/microtime.S \
52		${AMD64}/amd64/spl.S
53
54locore.o: ${AMD64}/amd64/locore.S assym.h
55	${NORMAL_S}
56
57vector.o: ${AMD64}/amd64/vector.S assym.h
58	${NORMAL_S}
59
60copy.o: ${AMD64}/amd64/copy.S assym.h
61	${NORMAL_S}
62
63microtime.o: ${AMD64}/amd64/microtime.S assym.h
64	${NORMAL_S}
65
66spl.o: ${AMD64}/amd64/spl.S assym.h
67	${NORMAL_S}
68
69##
70## (5) link settings
71##
72TEXTADDR?=	0xffffffff80100000
73LINKFLAGS_NORMAL=	-X
74KERN_LDSCRIPT?= kern.ldscript
75LINKFORMAT=	-T ${AMD64}/conf/${KERN_LDSCRIPT}
76
77##
78## (6) port specific target dependencies
79##
80
81# depend on CPU configuration
82locore.o machdep.o: Makefile
83
84mptramp.o netbsd32_sigcode.o: assym.h
85clock.o: config_time.h
86
87##
88## (7) misc settings
89##
90
91##
92## (8) config(8) generated machinery
93##
94%INCLUDES
95
96%OBJS
97
98%CFILES
99
100%SFILES
101
102%LOAD
103
104%RULES
105
106##
107## (9) port independent kernel machinery
108##
109.include "$S/conf/Makefile.kern.inc"
110
111##
112## (10) Appending make options.
113##
114%MAKEOPTIONSAPPEND
115