On Thu, Oct 1, 2009 at 11:59 AM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Thu, Oct 01, 2009 at 11:40:23AM -0700, ron minnich wrote:
On Thu, Oct 1, 2009 at 11:29 AM, Uwe Hermann uwe@hermann-uwe.de wrote:
+ifeq ($(CONFIG_CPU_AMD_GX1),y) +crt0-y += ../../../../src/cpu/amd/model_gx1/cpu_setup.inc +crt0-y += ../../../../src/cpu/amd/model_gx1/gx_setup.inc +crt0-y += auto.inc
let's stick with the standard way of doing this. It makes any automated tools easier.
crt0-$(CONFIG_CPU_AMD_GX1) += ./../../../src/cpu/amd/model_gx1/cpu_setup.inc crt0-$(CONFIG_CPU_AMD_GX1) +=../../../../src/cpu/amd/model_gx1/gx_setup.inc
In general, yes. But in the GX1 case I think it cannot be done this way (but please correct me if I'm wrong), see full patch:
+ifeq ($(CONFIG_CPU_AMD_GX1),y) +crt0-y += ../../../../src/cpu/amd/model_gx1/cpu_setup.inc +crt0-y += ../../../../src/cpu/amd/model_gx1/gx_setup.inc +crt0-y += auto.inc +else crt0-y += ../../../../src/cpu/x86/mmx/enable_mmx.inc crt0-y += auto.inc crt0-y += ../../../../src/cpu/x86/mmx/disable_mmx.inc +endif
In the GX1 case we need to include cpu_setup.inc, then gx_setup.inc, then auto.inc. However, enable_mmx.inc and disable_mmx.inc must _not_ be included in the GX1 case. Hence the ifeq/else construct.
I understand your point. You are correct about the mmx stuff. So what must happen is that the mmx stuff must ALSO be conditional. Hence my point, that to make this Makefile completely general, we need to make ALL of the crt0-y entries conditional.
thanks
ron