2006-04-26 16:39:16 +00:00
|
|
|
<rules>
|
|
|
|
|
|
|
|
|
|
<pre><![CDATA[
|
|
|
|
|
#
|
|
|
|
|
# Autogenerated OpenBIOS Makefile
|
|
|
|
|
# (C) 2004-2006 by the OpenBIOS team
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
ARCH := sparc32
|
2009-01-23 20:09:26 +00:00
|
|
|
ODIR := .
|
|
|
|
|
SRCDIR := ..
|
2006-04-26 16:39:16 +00:00
|
|
|
HOSTCC := gcc
|
2009-01-31 13:31:29 +00:00
|
|
|
HOSTARCH?=$(shell $(SRCDIR)/config/scripts/archname)
|
2009-01-23 20:09:26 +00:00
|
|
|
CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH))
|
2006-04-26 16:39:16 +00:00
|
|
|
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
|
2008-12-14 12:56:06 +00:00
|
|
|
HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
|
|
|
|
|
HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
|
2009-01-23 20:09:26 +00:00
|
|
|
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
2006-04-26 16:39:16 +00:00
|
|
|
|
2008-11-30 13:43:27 +00:00
|
|
|
TARGET=sparc-elf-
|
|
|
|
|
CC := $(TARGET)gcc
|
|
|
|
|
AS := $(TARGET)as
|
|
|
|
|
AR := $(TARGET)ar
|
|
|
|
|
LD := $(TARGET)ld
|
|
|
|
|
NM := $(TARGET)nm
|
|
|
|
|
STRIP := $(TARGET)strip
|
|
|
|
|
RANLIB := $(TARGET)ranlib
|
2008-12-15 20:35:31 +00:00
|
|
|
CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
|
2006-06-10 01:31:30 +00:00
|
|
|
CFLAGS+= -Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc
|
2006-05-22 10:37:34 +00:00
|
|
|
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
|
2009-06-14 16:05:27 +00:00
|
|
|
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Werror
|
2009-01-23 20:09:26 +00:00
|
|
|
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
2006-06-10 01:31:30 +00:00
|
|
|
AS_FLAGS := -Wa,-xarch=v8 -Wa,-32 -g
|
2006-04-26 16:39:16 +00:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# pre rules
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
all: versions dictionaries host-libraries target-libraries host-executables target-executables
|
|
|
|
|
|
2009-03-01 20:07:47 +00:00
|
|
|
VERSION := "1.0"
|
2006-04-26 16:39:16 +00:00
|
|
|
|
|
|
|
|
versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
|
|
|
|
|
|
|
|
|
|
$(ODIR)/forth/version.fs:
|
2008-12-04 20:14:23 +00:00
|
|
|
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
|
2006-04-26 16:39:16 +00:00
|
|
|
( echo ": builddate \" $$DATE\" ; " ; \
|
|
|
|
|
echo ": version \" $(VERSION)\" ; " ; ) \
|
|
|
|
|
> $(dir $@)/version.fs
|
|
|
|
|
|
|
|
|
|
$(ODIR)/target/include/openbios-version.h:
|
2008-12-04 20:14:23 +00:00
|
|
|
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
|
2006-04-26 16:39:16 +00:00
|
|
|
( 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>
|
2009-01-01 07:48:12 +00:00
|
|
|
|
2006-04-26 16:39:16 +00:00
|
|
|
<rule target="host" entity="library">
|
|
|
|
|
$(AR) cru $@ $^; $(RANLIB) $@
|
|
|
|
|
</rule>
|
2009-01-01 07:48:12 +00:00
|
|
|
|
2006-04-26 16:39:16 +00:00
|
|
|
<!-- target/cross compiler build rules -->
|
2009-01-01 07:48:12 +00:00
|
|
|
|
2006-04-26 16:39:16 +00:00
|
|
|
<rule target="target" entity="executable">
|
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
|
|
<rule target="target" entity="object">
|
|
|
|
|
$(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^
|
|
|
|
|
</rule>
|
2009-01-01 07:48:12 +00:00
|
|
|
|
2006-04-26 16:39:16 +00:00
|
|
|
<rule target="target" entity="library">
|
|
|
|
|
$(AR) cru $@ $^; $(RANLIB) $@
|
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
|
|
</rules>
|