Move crossgcc rules to coreboot specific Makefile
[coreboot.git] / Makefile.inc
index 6c4a16ac0cbc93aef451d06967d1a13d1692ef7c..0ef93777a86e1d96d013778602e36c55f437fcd6 100644 (file)
@@ -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
@@ -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
+