diff --git a/Makefile.inc b/Makefile.inc index 7debe53ebd..210e9cf6c6 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -596,6 +596,17 @@ bootblock-y+=$(DEVICETREE_STATIC_C) postcar-y+=$(DEVICETREE_STATIC_C) smm-y+=$(DEVICETREE_STATIC_C) +# Ensure static.c and static.h are created before any objects are compiled +ramstage-c-deps+=$(DEVICETREE_STATIC_C) +romstage-c-deps+=$(DEVICETREE_STATIC_C) +verstage-c-deps+=$(DEVICETREE_STATIC_C) +bootblock-c-deps+=$(DEVICETREE_STATIC_C) +postcar-c-deps+=$(DEVICETREE_STATIC_C) +smm-c-deps+=$(DEVICETREE_STATIC_C) + +.PHONY: devicetree +devicetree: $(DEVICETREE_STATIC_C) + ####################################################################### # Clean up rules clean-abuild: