summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2010-02-08 15:46:37 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2010-02-08 15:46:37 +0000
commitaf97d33ec426b9414133fd82d958cf9ab52a390f (patch)
treed99f6480914df848dabb0ec197864e0c8f64d939 /Makefile
parent0e92974904703272b55d66dc4959d95adba6f30c (diff)
downloadcoreboot-af97d33ec426b9414133fd82d958cf9ab52a390f.tar.xz
Clean up ACPI:
- unify all iasl related rules into the toplevel Makefile - build a filesystem standard for ACPI files and use it - pass ACPI sources through cpp, so constants can be shared between C and ACPI more easily - use cpp's #include instead of ACPI's Include() so cpp gets the whole picture Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5094 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e526ba9079..461ee13b0b 100644
--- a/Makefile
+++ b/Makefile
@@ -138,12 +138,13 @@ subdirs:=$(PLATFORM-y) $(BUILD-y)
$(eval $(call evaluate_subdirs))
-define c_dsl_template
-$(obj)/$(1)%.c: src/$(1)%.dsl $(obj)/build.h
+define objs_dsl_template
+$(obj)/$(1)%.o: src/$(1)%.asl
@printf " IASL $$(subst $$(shell pwd)/,,$$(@))\n"
- iasl -p $$(basename $$@) -tc $$<
- perl -pi -e 's/AmlCode/AmlCode_$$(notdir $$(basename $$@))/g' $$(basename $$@).hex
- mv $$(basename $$@).hex $$@
+ $(CPP) -D__ACPI__ -P $(CPPFLAGS) -include $(obj)/config.h -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
+ iasl -p $$(basename $$@) -tc $$(basename $$@).asl
+ mv $$(basename $$@).hex $$(basename $$@).c
+ $(CC) -m32 $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@ $$(basename $$@).c
endef
define objs_c_template
@@ -196,7 +197,7 @@ endef
usetemplate=$(foreach d,$(sort $(dir $($(1)))),$(eval $(call $(1)_$(2)_template,$(subst $(obj)/,,$(d)))))
usetemplate=$(foreach d,$(sort $(dir $($(1)))),$(eval $(call $(1)_$(2)_template,$(subst $(obj)/,,$(d)))))
-$(eval $(call usetemplate,c,dsl))
+$(eval $(call usetemplate,objs,dsl))
$(eval $(call usetemplate,objs,c))
$(eval $(call usetemplate,objs,S))
$(eval $(call usetemplate,initobjs,c))