95af1006cfdabc449c7d38d9da5b1bdc4626683a
[coreboot.git] / src / mainboard / iwill / dk8_htx / Makefile.inc
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2007-2008 coresystems GmbH
5 ##
6 ## This program is free software; you can redistribute it and/or
7 ## modify it under the terms of the GNU General Public License as
8 ## published by the Free Software Foundation; version 2 of
9 ## the License.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19 ## MA 02110-1301 USA
20 ##
21
22 driver-y += mainboard.o
23
24 # Needed by irq_tables and mptable and acpi_tables.
25 obj-y += get_bus_conf.o
26 obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o
27 obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o
28 obj-$(CONFIG_GENERATE_ACPI_TABLES) += dsdt.o
29 obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi_tables.o
30 obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o
31
32 # ./ssdt.o is in northbridge/amd/amdk8/Config.lb
33 obj-y += ssdt2.o
34 obj-y += ssdt3.o
35 obj-y += ssdt4.o
36 obj-y += ssdt5.o
37
38 # This is part of the conversion to init-obj and away from included code.
39
40 initobj-y += crt0.o
41 # FIXME in $(top)/Makefile
42 crt0s := $(src)/cpu/x86/16bit/entry16.inc
43 crt0s += $(src)/cpu/x86/32bit/entry32.inc
44 crt0s += $(src)/cpu/x86/16bit/reset16.inc
45 crt0s += $(src)/arch/i386/lib/id.inc
46 crt0s += $(src)/cpu/amd/car/cache_as_ram.inc
47 crt0s += $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc
48
49 ldscripts := $(src)/arch/i386/init/ldscript_fallback_cbfs.lb
50 ldscripts += $(src)/cpu/x86/16bit/entry16.lds
51 ldscripts += $(src)/cpu/x86/16bit/reset16.lds
52 ldscripts += $(src)/arch/i386/lib/id.lds
53 ldscripts += $(src)/arch/i386/lib/failover.lds
54
55 ifdef POST_EVALUATION
56
57 $(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dx/dsdt_lb.dsl
58         iasl -p $(obj)/dsdt -tc $(src)/mainboard/$(MAINBOARDDIR)/dx/dsdt_lb.dsl
59         mv $(obj)/dsdt.hex $@
60
61 $(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c
62         $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@
63
64 $(obj)/mainboard/$(MAINBOARDDIR)/ssdt2.c: $(src)/mainboard/$(MAINBOARDDIR)/dx/pci2.asl
65         iasl -p $(obj)/pci2 -tc $(src)/mainboard/$(MAINBOARDDIR)/dx/pci2.asl
66         perl -pi -e 's/AmlCode/AmlCode_ssdt2/g' $(obj)/pci2.hex
67         mv $(obj)/pci2.hex $@
68
69 $(obj)/mainboard/$(MAINBOARDDIR)/ssdt3.c: $(src)/mainboard/$(MAINBOARDDIR)/dx/pci3.asl
70         iasl -p $(obj)/pci3 -tc $(src)/mainboard/$(MAINBOARDDIR)/dx/pci3.asl
71         perl -pi -e 's/AmlCode/AmlCode_ssdt3/g' $(obj)/pci3.hex
72         mv $(obj)/pci3.hex $@
73
74 $(obj)/mainboard/$(MAINBOARDDIR)/ssdt4.c: $(src)/mainboard/$(MAINBOARDDIR)/dx/pci4.asl
75         iasl -p $(obj)/pci4 -tc $(src)/mainboard/$(MAINBOARDDIR)/dx/pci4.asl
76         perl -pi -e 's/AmlCode/AmlCode_ssdt4/g' $(obj)/pci4.hex
77         mv $(obj)/pci4.hex $@
78
79 $(obj)/mainboard/$(MAINBOARDDIR)/ssdt5.c: $(src)/mainboard/$(MAINBOARDDIR)/dx/pci5.asl
80         iasl -p $(obj)/pci5 -tc $(src)/mainboard/$(MAINBOARDDIR)/dx/pci5.asl
81         perl -pi -e 's/AmlCode/AmlCode_ssdt5/g' $(obj)/pci5.hex
82         mv $(obj)/pci5.hex $@
83
84 $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/option_table.h
85         $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S  $(src)/mainboard/$(MAINBOARDDIR)/romstage.c -o $@
86         perl -e 's/\.rodata/.rom.data/g' -pi $@
87         perl -e 's/\.text/.section .rom.text/g' -pi $@
88
89 endif
90