2006-06-10 09:37:53 +08:00
|
|
|
<rules>
|
|
|
|
|
|
|
|
<pre><![CDATA[
|
|
|
|
#
|
|
|
|
# Autogenerated OpenBIOS Makefile
|
|
|
|
# (C) 2004-2006 by the OpenBIOS team
|
|
|
|
#
|
|
|
|
|
|
|
|
ARCH := sparc64
|
|
|
|
ODIR := obj-$(ARCH)
|
|
|
|
HOSTCC := gcc
|
|
|
|
CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -DSWAP_ENDIANNESS
|
|
|
|
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
|
|
|
|
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
|
|
|
|
2006-06-10 10:22:45 +08:00
|
|
|
CC := sparc64-linux-gcc
|
|
|
|
AS := sparc64-linux-as
|
|
|
|
AR := sparc64-linux-ar
|
|
|
|
LD := sparc64-linux-ld
|
|
|
|
NM := sparc64-linux-nm
|
|
|
|
STRIP := sparc64-linux-strip
|
|
|
|
RANLIB := sparc64-linux-ranlib
|
2006-06-11 18:59:48 +08:00
|
|
|
CFLAGS := -Os -Wall -W -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -g
|
|
|
|
CFLAGS+= -Wa,-xarch=v9 -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany
|
|
|
|
CFLAGS+= -fno-builtin -nostdlib -ffreestanding
|
2006-06-10 09:37:53 +08:00
|
|
|
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
|
|
|
|
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing
|
|
|
|
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
|
|
|
AS_FLAGS := -Wa,-xarch=v9 -Wa,-64 -g
|
|
|
|
|
|
|
|
#
|
|
|
|
# pre rules
|
|
|
|
#
|
|
|
|
|
|
|
|
all: versions dictionaries host-libraries target-libraries host-executables target-executables
|
|
|
|
|
|
|
|
VERSION := "1.0RC1"
|
|
|
|
|
|
|
|
versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
|
|
|
|
|
|
|
|
$(ODIR)/forth/version.fs:
|
|
|
|
@DATE="$(shell echo `date +'%b %e %Y %H:%M'`)" ; \
|
|
|
|
( echo ": builddate \" $$DATE\" ; " ; \
|
|
|
|
echo ": version \" $(VERSION)\" ; " ; ) \
|
|
|
|
> $(dir $@)/version.fs
|
|
|
|
|
|
|
|
$(ODIR)/target/include/openbios-version.h:
|
|
|
|
@DATE="$(shell echo `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>
|