This patch sets max freq defaults for ddr2 and ddr3for fam10.
[coreboot.git] / Makefile.inc
index 6c4a16ac0cbc93aef451d06967d1a13d1692ef7c..f8c4deb2acff1e8ed0acc3e11ae0bb2468c39581 100644 (file)
@@ -64,8 +64,8 @@ define ramstage-objs_asl_template
 $(obj)/$(1).ramstage.o: src/$(1).asl $(obj)/config.h
        @printf "    IASL       $$(subst $(top)/,,$$(@))\n"
        $(CC) -x assembler-with-cpp -E -MMD -MT $$(@) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl
-       iasl -p $$(obj)/$(1) -tc $$(basename $$@).asl
-       mv $$(obj)/$(1).hex $$(basename $$@).c
+       cd $$(dir $$@); iasl -p $$(notdir $$@) -tc $$(notdir $$(basename $$@)).asl
+       mv $$(basename $$@).hex $$(basename $$@).c
        $(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c
        # keep %.o: %.c rule from catching the temporary .c file after a make clean
        mv $$(basename $$@).c $$(basename $$@).hex
@@ -85,7 +85,11 @@ cbfs-files-handler= \
 
 #######################################################################
 # a variety of flags for our build
+CBFS_COMPRESS_FLAG:=
+ifeq ($(CONFIG_COMPRESS_RAMSTAGE),y)
 CBFS_COMPRESS_FLAG:=l
+endif
+
 CBFS_PAYLOAD_COMPRESS_FLAG:=
 CBFS_PAYLOAD_COMPRESS_NAME:=none
 ifeq ($(CONFIG_COMPRESSED_PAYLOAD_LZMA),y)
@@ -102,16 +106,13 @@ INCLUDES += -Isrc/devices/oprom/include
 # abspath is a workaround for romcc
 INCLUDES += -include $(abspath $(obj)/config.h)
 
-CFLAGS = $(INCLUDES) -Os -pipe -g
+CFLAGS = $(INCLUDES) -Os -pipe -g -nostdinc
 CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
 CFLAGS += -Wstrict-aliasing -Wshadow
 ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y)
 CFLAGS += -Werror
 endif
-ifneq ($(CONFIG_AMD_AGESA),y)
-CFLAGS += -nostdinc 
-endif
 CFLAGS += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
 
 additional-dirs := $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options
@@ -178,7 +179,7 @@ $(objutil)/%.o: $(objutil)/%.c
        @printf "    HOSTCC     $(subst $(objutil)/,,$(@))\n"
        $(HOSTCC) -MMD -I$(subst $(objutil)/,util/,$(dir $<)) -I$(dir $<) $(HOSTCFLAGS) -c -o $@ $<
 
-$(obj)/%.ramstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
+$(obj)/%.ramstage.o $(abspath $(obj))/%.ramstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
        @printf "    CC         $(subst $(obj)/,,$(@))\n"
        $(CC) -MMD $(CFLAGS) -c -o $@ $<
 
@@ -229,3 +230,10 @@ lint:
        done; \
        test $$FAILED -eq 0 || { echo "ERROR: $$FAILED test(s) failed." &&  exit 1; }; \
        rm -f $$LINTLOG
+
+crossgcc: clean-for-update
+       $(MAKE) -C util/crossgcc build
+
+crossgcc-clean: clean-for-update
+       $(MAKE) -C util/crossgcc clean
+