aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-03-08 19:23:18 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-03-08 19:23:18 -0500
commit5325e91ecbb4e5150a1aacbe039e2568f53d9d92 (patch)
tree038accefd5b5c98b4a96d47bc7a9b3bd0e414d47
parent76e58028d28e78431f9de3cee0b3c88d807fa39d (diff)
downloadseabios-5325e91ecbb4e5150a1aacbe039e2568f53d9d92.tar.gz
Add additional dependency checks to Makefile.
Generate dependencies on pre-processed ASL files. This ensures that a change to an imported dsdt file will cause iasl to be called. Make .config depend on Kconfig files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ada8fa5..7ca8036 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,8 @@ SRC32SEG=util.c output.c pci.c pcibios.c apm.c stacks.c
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
; then echo "$(2)"; else echo "$(3)"; fi ;)
+CPPFLAGS = -P -MD -MT $@
+
COMMONCFLAGS := -I$(OUT) -Os -MD -g \
-Wall -Wno-strict-aliasing -Wold-style-definition \
$(call cc-option,$(CC),-Wtype-limits,) \
@@ -63,6 +65,7 @@ OBJCOPY=objcopy
OBJDUMP=objdump
STRIP=strip
PYTHON=python
+CPP=cpp
IASL:=iasl
# Default targets
@@ -115,7 +118,7 @@ $(OUT)%.o: %.c $(OUT)autoconf.h
$(OUT)%.lds: %.lds.S
@echo " Precompiling $@"
- $(Q)$(CPP) -P -D__ASSEMBLY__ $< -o $@
+ $(Q)$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $@
################ Main BIOS build rules
@@ -214,7 +217,7 @@ iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \
$(OUT)%.hex: src/%.dsl ./tools/acpi_extract_preprocess.py ./tools/acpi_extract.py
@echo " Compiling IASL $@"
- $(Q)cpp -P $< > $(OUT)$*.dsl.i.orig
+ $(Q)$(CPP) $(CPPFLAGS) $< -o $(OUT)$*.dsl.i.orig
$(Q)$(PYTHON) ./tools/acpi_extract_preprocess.py $(OUT)$*.dsl.i.orig > $(OUT)$*.dsl.i
$(Q)$(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $(OUT)$* $(OUT)$*.dsl.i
$(Q)$(PYTHON) ./tools/acpi_extract.py $(OUT)$*.lst > $(OUT)$*.off
@@ -231,7 +234,7 @@ $(Q)$(MAKE) -C $(OUT) -f $(CURDIR)/tools/kconfig/Makefile srctree=$(CURDIR) src=
endef
$(OUT)autoconf.h : $(KCONFIG_CONFIG) ; $(call do-kconfig, silentoldconfig)
-$(KCONFIG_CONFIG): ; $(call do-kconfig, defconfig)
+$(KCONFIG_CONFIG): src/Kconfig vgasrc/Kconfig ; $(call do-kconfig, defconfig)
%onfig: ; $(call do-kconfig, $@)
help: ; $(call do-kconfig, $@)