]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - config.mk
Fix 440GR to print correct cpu revision
[people/ms/u-boot.git] / config.mk
index 95b7256c54a8ee78dc811e311cd0905a95f3c6b9..ff83091746887aad0e44a0e03113c75863f68a91 100644 (file)
--- a/config.mk
+++ b/config.mk
 
 #########################################################################
 
+# clean the slate ...
+PLATFORM_RELFLAGS =
+PLATFORM_CPPFLAGS =
+PLATFORM_LDFLAGS =
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
@@ -54,6 +59,9 @@ endif
 ifdef  CPU
 sinclude $(TOPDIR)/cpu/$(CPU)/config.mk        # include  CPU  specific rules
 endif
+ifdef  SOC
+sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include  SoC  specific rules
+endif
 ifdef  VENDOR
 BOARDDIR = $(VENDOR)/$(BOARD)
 else
@@ -97,16 +105,18 @@ RELFLAGS= $(PLATFORM_RELFLAGS)
 DBGFLAGS= -g #-DDEBUG
 OPTFLAGS= -Os #-fomit-frame-pointer
 ifndef LDSCRIPT
-#LDSCRIPT := board/$(BOARDDIR)/u-boot.lds.debug
+#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
 LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
 endif
 OBJCFLAGS += --gap-fill=0xff
 
+gccincdir := $(shell $(CC) -print-file-name=include)
+
 CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS)                \
        -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE)           \
        -I$(TOPDIR)/include                             \
-       -fno-builtin                                    \
-       -pipe $(PLATFORM_CPPFLAGS)
+       -fno-builtin -ffreestanding -nostdinc -isystem  \
+       $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
 
 ifdef BUILD_TAG
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \
@@ -115,6 +125,14 @@ else
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
 endif
 
+# avoid trigraph warnings while parsing pci.h (produced by NIOS gcc-2.9)
+# this option have to be placed behind -Wall -- that's why it is here
+ifeq ($(ARCH),nios)
+ifeq ($(findstring 2.9,$(shell $(CC) --version)),2.9)
+CFLAGS := $(CPPFLAGS) -Wall -Wno-trigraphs
+endif
+endif
+
 AFLAGS_DEBUG := -Wa,-gstabs
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
@@ -143,6 +161,10 @@ BFD_ROOT_DIR =             /opt/powerpc
 endif
 endif
 
+ifeq ($(PCI_CLOCK),PCI_66M)
+CFLAGS := $(CFLAGS) -DPCI_66M
+endif
+
 #########################################################################
 
 export CONFIG_SHELL HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE \