Files
openbios/config/examples/x86_rules.xml
Stefan Reinauer b623837257 Automatic cross-compiler flags
Detect cross-compiling flags (CROSSCFLAGS) automatically based on endian
and word size differences.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@66 f158a5a8-5612-0410-a976-696ce0be7e32
2006-07-18 21:35:55 +00:00

77 lines
1.6 KiB
XML

<rules>
<pre><![CDATA[
#
# Autogenerated OpenBIOS Makefile
# (C) 2004-2005 by the OpenBIOS team
#
ARCH := x86
ODIR := obj-$(ARCH)
HOSTCC := gcc
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) -Wno-unused
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
CC := gcc -m32
AR := ar
NM := nm
STRIP := strip
RANLIB := ranlib
INSTALL := install
ifeq ($(shell uname), Linux)
LIBDL_LDFLAGS=-ldl
endif
CFLAGS := -Os -Wall -W -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
#
# pre rules
#
all: versions dictionaries host-libraries target-libraries host-executables target-executables
VERSION := "1.0RC1"
versions: $(ODIR)/forth/version.fs
$(ODIR)/forth/version.fs:
@test -d $(dir $@) || $(INSTALL) -d $(dir $@)
@DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \
( echo ": builddate \" $$DATE\" ; " ; \
echo ": version \" $(VERSION)\" ; " ; ) \
> $(dir $@)/version.fs
]]></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>