| @@ -1,115 +1,115 @@ | | | @@ -1,115 +1,115 @@ |
1 | # $NetBSD: Makefile.amd64,v 1.27 2009/10/01 09:15:19 skrll Exp $ | | 1 | # $NetBSD: Makefile.amd64,v 1.28 2009/10/02 10:14:20 skrll Exp $ |
2 | | | 2 | |
3 | # Makefile for NetBSD | | 3 | # Makefile for NetBSD |
4 | # | | 4 | # |
5 | # This makefile is constructed from a machine description: | | 5 | # This makefile is constructed from a machine description: |
6 | # config machineid | | 6 | # config machineid |
7 | # Most changes should be made in the machine description | | 7 | # Most changes should be made in the machine description |
8 | # /sys/arch/amd64/conf/``machineid'' | | 8 | # /sys/arch/amd64/conf/``machineid'' |
9 | # after which you should do | | 9 | # after which you should do |
10 | # config machineid | | 10 | # config machineid |
11 | # Machine generic makefile changes should be made in | | 11 | # Machine generic makefile changes should be made in |
12 | # /sys/arch/amd64/conf/Makefile.amd64 | | 12 | # /sys/arch/amd64/conf/Makefile.amd64 |
13 | # after which config should be rerun for all machines of that type. | | 13 | # after which config should be rerun for all machines of that type. |
14 | # | | 14 | # |
15 | # To specify debugging, add the config line: makeoptions DEBUG="-g" | | 15 | # To specify debugging, add the config line: makeoptions DEBUG="-g" |
16 | # A better way is to specify -g only for a few files. | | 16 | # A better way is to specify -g only for a few files. |
17 | # | | 17 | # |
18 | # makeoptions DEBUGLIST="uvm* trap if_*" | | 18 | # makeoptions DEBUGLIST="uvm* trap if_*" |
19 | | | 19 | |
20 | MACHINE_ARCH=x86_64 | | 20 | MACHINE_ARCH=x86_64 |
21 | USETOOLS?= no | | 21 | USETOOLS?= no |
22 | NEED_OWN_INSTALL_TARGET?=no | | 22 | NEED_OWN_INSTALL_TARGET?=no |
23 | .include <bsd.own.mk> | | 23 | .include <bsd.own.mk> |
24 | | | 24 | |
25 | ## | | 25 | ## |
26 | ## (1) port identification | | 26 | ## (1) port identification |
27 | ## | | 27 | ## |
28 | AMD64= $S/arch/amd64 | | 28 | AMD64= $S/arch/amd64 |
29 | GENASSYM_CONF= ${AMD64}/amd64/genassym.cf | | 29 | GENASSYM_CONF= ${AMD64}/amd64/genassym.cf |
30 | | | 30 | |
31 | ## | | 31 | ## |
32 | ## (2) compile settings | | 32 | ## (2) compile settings |
33 | ## | | 33 | ## |
34 | DEFCOPTS= -O2 | | 34 | DEFCOPTS= -O2 |
35 | CPPFLAGS+= -Damd64 -Dx86_64 | | 35 | CPPFLAGS+= -Damd64 -Dx86_64 |
36 | CFLAGS+= -mcmodel=kernel | | 36 | CFLAGS+= -mcmodel=kernel |
37 | CFLAGS+= -mno-red-zone | | 37 | CFLAGS+= -mno-red-zone |
38 | AFLAGS+= -x assembler-with-cpp -traditional-cpp | | 38 | AFLAGS+= -x assembler-with-cpp -traditional-cpp |
39 | | | 39 | |
40 | ## | | 40 | ## |
41 | ## (3) libkern and compat | | 41 | ## (3) libkern and compat |
42 | ## | | 42 | ## |
43 | KERN_AS= obj | | 43 | KERN_AS= obj |
44 | | | 44 | |
45 | ## | | 45 | ## |
46 | ## (4) local objects, compile rules, and dependencies | | 46 | ## (4) local objects, compile rules, and dependencies |
47 | ## | | 47 | ## |
48 | MD_OBJS= locore.o vector.o copy.o spl.o | | 48 | MD_OBJS= locore.o vector.o copy.o spl.o |
49 | MD_CFILES= | | 49 | MD_CFILES= |
50 | MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ | | 50 | MD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ |
51 | ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S | | 51 | ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S |
52 | | | 52 | |
53 | locore.o: ${AMD64}/amd64/locore.S assym.h | | 53 | locore.o: ${AMD64}/amd64/locore.S assym.h |
54 | ${NORMAL_S} | | 54 | ${NORMAL_S} |
55 | | | 55 | |
56 | vector.o: ${AMD64}/amd64/vector.S assym.h | | 56 | vector.o: ${AMD64}/amd64/vector.S assym.h |
57 | ${NORMAL_S} | | 57 | ${NORMAL_S} |
58 | | | 58 | |
59 | copy.o: ${AMD64}/amd64/copy.S assym.h | | 59 | copy.o: ${AMD64}/amd64/copy.S assym.h |
60 | ${NORMAL_S} | | 60 | ${NORMAL_S} |
61 | | | 61 | |
62 | spl.o: ${AMD64}/amd64/spl.S assym.h | | 62 | spl.o: ${AMD64}/amd64/spl.S assym.h |
63 | ${NORMAL_S} | | 63 | ${NORMAL_S} |
64 | | | 64 | |
65 | ## | | 65 | ## |
66 | ## (5) link settings | | 66 | ## (5) link settings |
67 | ## | | 67 | ## |
68 | TEXTADDR?= 0xffffffff80100000 | | 68 | TEXTADDR?= 0xffffffff80100000 |
69 | EXTRA_LINKFLAGS= -z maxpagesize=0x100000 | | 69 | EXTRA_LINKFLAGS= -z max-page-size=0x100000 |
70 | LINKFLAGS_NORMAL= -X | | 70 | LINKFLAGS_NORMAL= -X |
71 | KERN_LDSCRIPT?= kern.ldscript | | 71 | KERN_LDSCRIPT?= kern.ldscript |
72 | LINKFORMAT= -T ${AMD64}/conf/${KERN_LDSCRIPT} | | 72 | LINKFORMAT= -T ${AMD64}/conf/${KERN_LDSCRIPT} |
73 | | | 73 | |
74 | ## | | 74 | ## |
75 | ## (6) port specific target dependencies | | 75 | ## (6) port specific target dependencies |
76 | ## | | 76 | ## |
77 | | | 77 | |
78 | # depend on CPU configuration | | 78 | # depend on CPU configuration |
79 | locore.o machdep.o: Makefile | | 79 | locore.o machdep.o: Makefile |
80 | | | 80 | |
81 | acpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h | | 81 | acpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h |
82 | linux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h | | 82 | linux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h |
83 | netbsd32_sigcode.o: assym.h | | 83 | netbsd32_sigcode.o: assym.h |
84 | | | 84 | |
85 | ## | | 85 | ## |
86 | ## (7) misc settings | | 86 | ## (7) misc settings |
87 | ## | | 87 | ## |
88 | | | 88 | |
89 | ## | | 89 | ## |
90 | ## (8) config(8) generated machinery | | 90 | ## (8) config(8) generated machinery |
91 | ## | | 91 | ## |
92 | %INCLUDES | | 92 | %INCLUDES |
93 | | | 93 | |
94 | %OBJS | | 94 | %OBJS |
95 | | | 95 | |
96 | %CFILES | | 96 | %CFILES |
97 | | | 97 | |
98 | %SFILES | | 98 | %SFILES |
99 | | | 99 | |
100 | %LOAD | | 100 | %LOAD |
101 | | | 101 | |
102 | %RULES | | 102 | %RULES |
103 | | | 103 | |
104 | ## Include rules for ACPI wakecode | | 104 | ## Include rules for ACPI wakecode |
105 | .include "$S/arch/x86/acpi/Makefile.wakecode.inc" | | 105 | .include "$S/arch/x86/acpi/Makefile.wakecode.inc" |
106 | | | 106 | |
107 | ## | | 107 | ## |
108 | ## (9) port independent kernel machinery | | 108 | ## (9) port independent kernel machinery |
109 | ## | | 109 | ## |
110 | .include "$S/conf/Makefile.kern.inc" | | 110 | .include "$S/conf/Makefile.kern.inc" |
111 | | | 111 | |
112 | ## | | 112 | ## |
113 | ## (10) Appending make options. | | 113 | ## (10) Appending make options. |
114 | ## | | 114 | ## |
115 | %MAKEOPTIONSAPPEND | | 115 | %MAKEOPTIONSAPPEND |