Files
openbios/config/examples/cross-sparc32_rules.xml
Blue Swirl cd72008966 Enable -Werror for Sparc32 and Sparc64
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@504 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-14 16:05:27 +00:00

88 lines
2.6 KiB
XML

<rules>
<pre><![CDATA[
#
# Autogenerated OpenBIOS Makefile
# (C) 2004-2006 by the OpenBIOS team
#
ARCH := sparc32
ODIR := .
SRCDIR := ..
HOSTCC := gcc
HOSTARCH?=$(shell $(SRCDIR)/config/scripts/archname)
CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH))
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
TARGET=sparc-elf-
CC := $(TARGET)gcc
AS := $(TARGET)as
AR := $(TARGET)ar
LD := $(TARGET)ld
NM := $(TARGET)nm
STRIP := $(TARGET)strip
RANLIB := $(TARGET)ranlib
CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
CFLAGS+= -Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Werror
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
AS_FLAGS := -Wa,-xarch=v8 -Wa,-32 -g
#
# pre rules
#
all: versions dictionaries host-libraries target-libraries host-executables target-executables
VERSION := "1.0"
versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
$(ODIR)/forth/version.fs:
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
( echo ": builddate \" $$DATE\" ; " ; \
echo ": version \" $(VERSION)\" ; " ; ) \
> $(dir $@)/version.fs
$(ODIR)/target/include/openbios-version.h:
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \
echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \
echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \
> $(dir $@)/openbios-version.h
]]></pre>
<!-- host compiler build rules -->
<rule target="host" entity="executable">
$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
</rule>
<rule target="host" entity="object">
$(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $^
</rule>
<rule target="host" entity="library">
$(AR) cru $@ $^; $(RANLIB) $@
</rule>
<!-- target/cross compiler build rules -->
<rule target="target" entity="executable">
$(CC) $(CFLAGS) -o $@ $^
</rule>
<rule target="target" entity="object">
$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^
</rule>
<rule target="target" entity="library">
$(AR) cru $@ $^; $(RANLIB) $@
</rule>
</rules>