1 # $NetBSD: Makefile.amd64,v 1.28 2009/10/02 10:14:20 skrll Exp $
5 # This makefile is constructed from a machine description:
7 # Most changes should be made in the machine description
8 # /sys/arch/amd64/conf/``machineid''
9 # after which you should do
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.
15 # To specify debugging, add the config line: makeoptions DEBUG="-g"
16 # A better way is to specify -g only for a few files.
18 # makeoptions DEBUGLIST="uvm* trap if_*"
22 NEED_OWN_INSTALL_TARGET?=no
28 ## (1) port identification
31 GENASSYM_CONF= ${AMD64}/amd64/genassym.cf
34 ## (2) compile settings
37 CPPFLAGS+= -Damd64 -Dx86_64
38 CFLAGS+= -mcmodel=kernel
39 CFLAGS+= -mno-red-zone
40 AFLAGS+= -x assembler-with-cpp -traditional-cpp
43 ## (3) libkern and compat
48 ## (4) local objects, compile rules, and dependencies
50 MD_OBJS= locore.o vector.o copy.o spl.o
52 MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \
53 ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S
55 locore.o: ${AMD64}/amd64/locore.S assym.h
58 vector.o: ${AMD64}/amd64/vector.S assym.h
61 copy.o: ${AMD64}/amd64/copy.S assym.h
64 spl.o: ${AMD64}/amd64/spl.S assym.h
70 TEXTADDR?= 0xffffffff80100000
71 EXTRA_LINKFLAGS= -z max-page-size=0x100000
73 KERN_LDSCRIPT?= kern.ldscript
74 LINKFORMAT= -T ${AMD64}/conf/${KERN_LDSCRIPT}
77 ## (6) port specific target dependencies
80 # depend on CPU configuration
81 locore.o machdep.o: Makefile
83 acpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h
84 linux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h
85 netbsd32_sigcode.o: assym.h
92 ## (8) config(8) generated machinery
106 ## Include rules for ACPI wakecode
107 .include "$S/arch/x86/acpi/Makefile.wakecode.inc"
110 ## (9) port independent kernel machinery
112 .include "$S/conf/Makefile.kern.inc"
115 ## (10) Appending make options.