* fix crt0s/ldscripts paths to fix out of tree build.
[coreboot.git] / src / mainboard / roda / rk886ex / 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 ##
23 ## This mainboard requires DCACHE_AS_RAM enabled. It won't work without.
24 ##
25
26 driver-y += mainboard.o
27 driver-y += m3885.o
28 driver-y += ec.o
29 driver-y += rtl8168.o
30
31 obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o
32 obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o
33 obj-$(CONFIG_GENERATE_ACPI_TABLES) += dsdt.o
34 obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi_tables.o
35 obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o
36
37 smmobj-$(CONFIG_HAVE_SMI_HANDLER) += mainboard_smi.o
38
39 # This is part of the conversion to init-obj and away from included code.
40
41 initobj-y += crt0.o
42 # FIXME in $(top)/Makefile
43 crt0s := $(src)/cpu/x86/16bit/entry16.inc
44 crt0s += $(src)/cpu/x86/32bit/entry32.inc
45 crt0s += $(src)/cpu/x86/16bit/reset16.inc
46 crt0s += $(src)/arch/i386/lib/id.inc
47 crt0s += $(src)/cpu/intel/model_6ex/cache_as_ram.inc
48 crt0s += $(obj)/mainboard/$(MAINBOARDDIR)/auto.inc
49
50 ldscripts := $(src)/arch/i386/init/ldscript_fallback_cbfs.lb
51 ldscripts += $(src)/cpu/x86/16bit/entry16.lds
52 ldscripts += $(src)/cpu/x86/16bit/reset16.lds
53 ldscripts += $(src)/arch/i386/lib/id.lds
54 ldscripts += $(src)/arch/i386/lib/failover.lds
55
56 ifdef POST_EVALUATION
57
58 $(obj)/dsdt.c: $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl
59         $(CPP) -D__ACPI__ -P $(CPPFLAGS) -include $(obj)/config.h -I$(src)/mainboard/$(MAINBOARDDIR) $(src)/mainboard/$(MAINBOARDDIR)/dsdt.asl -o $(obj)/dsdt.asl
60         iasl -p $(obj)/dsdt -tc $(obj)/dsdt.asl
61         mv $(obj)/dsdt.hex $@
62
63 $(obj)/mainboard/$(MAINBOARDDIR)/dsdt.o: $(obj)/dsdt.c
64         $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c $< -o $@
65
66 $(obj)/mainboard/$(MAINBOARDDIR)/auto.inc: $(src)/mainboard/$(MAINBOARDDIR)/auto.c $(obj)/option_table.h
67         $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S  $(src)/mainboard/$(MAINBOARDDIR)/auto.c -o $@
68         perl -e 's/\.rodata/.rom.data/g' -pi $@
69         perl -e 's/\.text/.section .rom.text/g' -pi $@
70
71 endif
72