[OpenBIOS] r532 - in trunk/openbios-devel: . config/examples config/scripts config/xml
svn at openbios.org
svn at openbios.org
Sun Aug 2 18:59:05 CEST 2009
Author: blueswirl
Date: 2009-08-02 18:59:05 +0200 (Sun, 02 Aug 2009)
New Revision: 532
Added:
trunk/openbios-devel/Makefile.target
trunk/openbios-devel/config/xml/rules.xml
Removed:
trunk/openbios-devel/config/examples/amd64_rules.xml
trunk/openbios-devel/config/examples/cross-ppc_rules.xml
trunk/openbios-devel/config/examples/cross-sparc32_rules.xml
trunk/openbios-devel/config/examples/cross-sparc64_rules.xml
trunk/openbios-devel/config/examples/cross-x86_rules.xml
trunk/openbios-devel/config/examples/ppc_rules.xml
trunk/openbios-devel/config/examples/sparc32_rules.xml
trunk/openbios-devel/config/examples/sparc64_rules.xml
trunk/openbios-devel/config/examples/x86_rules.xml
trunk/openbios-devel/config/scripts/archname
trunk/openbios-devel/config/scripts/crosscflags
Modified:
trunk/openbios-devel/Makefile
trunk/openbios-devel/config/scripts/switch-arch
Log:
Refactor the build rules
Signed-off-by: Blue Swirl <blauwirbel at gmail.com>
Modified: trunk/openbios-devel/Makefile
===================================================================
--- trunk/openbios-devel/Makefile 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/Makefile 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,4 +1,3 @@
-HOSTARCH=$(shell config/scripts/archname)
ODIRS=$(wildcard obj-*)
TARGETS=$(subst obj-,,$(ODIRS))
@@ -9,13 +8,13 @@
echo; exit 1 )
info:
- @echo "Building OpenBIOS on $(HOSTARCH) for $(TARGETS)"
+ @echo "Building OpenBIOS for $(TARGETS)"
clean:
- @printf "Cleaning up..."
- @rm -rf $(ODIRS) forth.dict.core
- @find . -type f -name "*~" -exec rm \{\} \;
- @echo " ok"
+ @echo "Cleaning up..."
+ @for dir in $(ODIRS); do \
+ $(MAKE) -C $$dir clean; \
+ done
build:
@printf "Building..."
Added: trunk/openbios-devel/Makefile.target
===================================================================
--- trunk/openbios-devel/Makefile.target (rev 0)
+++ trunk/openbios-devel/Makefile.target 2009-08-02 16:59:05 UTC (rev 532)
@@ -0,0 +1,71 @@
+#
+# OpenBIOS Makefile
+# (C) 2004-2009 by the OpenBIOS team
+#
+
+include config.mak
+
+ODIR := .
+SRCDIR := ..
+HOSTCC := gcc
+
+HOSTCFLAGS+= -O2 -g -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
+HOSTCFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
+HOSTCFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
+HOSTCFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
+HOSTCFLAGS+= -W
+HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
+
+CC := $(TARGET)gcc
+AS := $(TARGET)as
+AR := $(TARGET)ar
+LD := $(TARGET)ld
+NM := $(TARGET)nm
+STRIP := $(TARGET)strip
+RANLIB := $(TARGET)ranlib
+
+CFLAGS+= -Os -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
+CFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
+CFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
+CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
+CFLAGS+= -Werror
+INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
+AS_FLAGS+= -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
+
+info:
+ @echo "Building OpenBIOS on $(HOSTARCH) for $(ARCH)"
+
+clean:
+ @printf "Cleaning up for $(ARCH)..."
+ @rm -rf forth.dict.core forthstrap *.dict openbios-*
+ @find . -type f -name "*~" -o -name '*.o' -o -name '*.a' -exec rm \{\} \;
+ @echo " ok"
+
+build-verbose: info build
+
+build: all
+
+include rules.mak
Deleted: trunk/openbios-devel/config/examples/amd64_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/amd64_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/amd64_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,86 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2005 by the OpenBIOS team
-#
-
-ARCH := amd64
-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
-
-CC := gcc
-AS := as
-AR := ar
-LD := ld
-NM := nm
-STRIP := strip
-RANLIB := ranlib
-INSTALL := install
-
-CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
-CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
-CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
-INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
-
-#
-# 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>
Deleted: trunk/openbios-devel/config/examples/cross-ppc_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/cross-ppc_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/cross-ppc_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,104 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2005 by the OpenBIOS team
-#
-
-ARCH := ppc
-ODIR := .
-SRCDIR := ..
-HOSTCC := gcc
-HOSTARCH?=$(shell $(SRCDIR)/config/scripts/archname)
-CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH))
-HOSTCFLAGS := -Os -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
-#
-# MOLPATH is needed if you want to build openbios-mol.elf
-#
-MOLPATH=$(HOME)/mol-0.9.71
-
-TARGET=powerpc-linux-gnu-
-CC := $(TARGET)gcc
-AS := $(TARGET)as
-AR := $(TARGET)ar
-LD := $(TARGET)ld
-NM := $(TARGET)nm
-STRIP := $(TARGET)strip
-RANLIB := $(TARGET)ranlib
-CFLAGS := -Os -Wall -msoft-float -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2
-CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Werror
-CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
-INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
-
-M4 := m4
-
-#
-# pre rules
-#
-
-all: mol 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
-mol:
- @grep CONFIG_MOL $(ODIR)/forth/config.fs >/dev/null && ( \
- echo "Using MOL path $(MOLPATH)..."; \
- ln -s $(MOLPATH)/src/shared/osi_calls.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/shared/osi.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/shared/prom.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/boothelper_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/video_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/pseudofs_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/kbd_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/drivers/disk/include/scsi_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/drivers/disk/include/ablk_sh.h $(ODIR)/target/include/ ) || true
-
-]]></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>
Deleted: trunk/openbios-devel/config/examples/cross-sparc32_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/cross-sparc32_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/cross-sparc32_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,87 +0,0 @@
-<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>
Deleted: trunk/openbios-devel/config/examples/cross-sparc64_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/cross-sparc64_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/cross-sparc64_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,88 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2006 by the OpenBIOS team
-#
-
-ARCH := sparc64
-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=sparc64-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 -g
-CFLAGS+= -Wa,-xarch=v9b -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany
-CFLAGS+= -fno-builtin -nostdlib -ffreestanding
-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=v9b -Wa,-64 -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>
Deleted: trunk/openbios-devel/config/examples/cross-x86_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/cross-x86_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/cross-x86_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,88 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2005 by the OpenBIOS team
-#
-
-ARCH := x86
-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=i386-elf-
-TARGET=
-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+= -m32
-CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
-CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
-INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
-AS_FLAGS := -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>
Deleted: trunk/openbios-devel/config/examples/ppc_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/ppc_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/ppc_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,103 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2005 by the OpenBIOS team
-#
-
-ARCH := ppc
-ODIR := .
-SRCDIR := ..
-HOSTCC := gcc
-HOSTARCH?=$(shell $(SRCDIR)/config/scripts/archname)
-CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH))
-HOSTCFLAGS := -Os -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
-#
-# MOLPATH is needed if you want to build openbios-mol.elf
-#
-MOLPATH=$(HOME)/mol-0.9.71
-
-CC := gcc
-AS := as
-AR := ar
-LD := ld
-NM := nm
-STRIP := strip
-RANLIB := ranlib
-CFLAGS := -Os -Wall -msoft-float -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2
-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
-
-M4 := m4
-
-#
-# pre rules
-#
-
-all: mol 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
-mol:
- @grep CONFIG_MOL $(ODIR)/forth/config.fs >/dev/null && ( \
- echo "Using MOL path $(MOLPATH)..."; \
- ln -s $(MOLPATH)/src/shared/osi_calls.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/shared/osi.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/shared/prom.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/boothelper_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/video_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/pseudofs_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/include/kbd_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/drivers/disk/include/scsi_sh.h $(ODIR)/target/include/; \
- ln -s $(MOLPATH)/src/drivers/disk/include/ablk_sh.h $(ODIR)/target/include/ ) || true
-
-]]></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>
Deleted: trunk/openbios-devel/config/examples/sparc32_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/sparc32_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/sparc32_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,92 +0,0 @@
-<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
-
-CC := gcc
-AS := as
-AR := ar
-LD := ld
-NM := nm
-STRIP := strip
-RANLIB := ranlib
-INSTALL := install
-
-ifeq ($(shell uname), Linux)
- LIBDL_LDFLAGS=-ldl
-endif
-
-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>
Deleted: trunk/openbios-devel/config/examples/sparc64_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/sparc64_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/sparc64_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,93 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2006 by the OpenBIOS team
-#
-
-ARCH := sparc64
-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+= -Wa,-xarch=v9 -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany
-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
-
-CC := gcc
-AS := as
-AR := ar
-LD := ld
-NM := nm
-STRIP := strip
-RANLIB := ranlib
-INSTALL := install
-
-ifeq ($(shell uname), Linux)
- LIBDL_LDFLAGS=-ldl
-endif
-
-CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
-CFLAGS+= -Wa,-xarch=v9b -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany
-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=v9b -Wa,-64 -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>
Deleted: trunk/openbios-devel/config/examples/x86_rules.xml
===================================================================
--- trunk/openbios-devel/config/examples/x86_rules.xml 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/examples/x86_rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,90 +0,0 @@
-<rules>
-
-<pre><![CDATA[
-#
-# Autogenerated OpenBIOS Makefile
-# (C) 2004-2005 by the OpenBIOS team
-#
-
-ARCH := x86
-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
-
-CC := gcc
-AR := ar
-NM := nm
-STRIP := strip
-RANLIB := ranlib
-INSTALL := install
-
-ifeq ($(shell uname), Linux)
- LIBDL_LDFLAGS=-ldl
-endif
-
-CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
-CFLAGS+= -m32
-CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
-CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
-INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
-AS_FLAGS := -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>
Deleted: trunk/openbios-devel/config/scripts/archname
===================================================================
--- trunk/openbios-devel/config/scripts/archname 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/scripts/archname 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-unset ARCH
-
-case "$1" in
- # ppc|powerpc) ARCH=ppc ;;
- # mpc107) ARCH=mpc107 ;;
- # osx|darwin) ARCH=osx ;;
- ppc|powerpc|mpc107|osx|darwin) ARCH=ppc ;;
-esac
-
-test "$ARCH" || ARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
- -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
- -e "s/Power Macintosh/ppc/"`
-
-echo $ARCH
Deleted: trunk/openbios-devel/config/scripts/crosscflags
===================================================================
--- trunk/openbios-devel/config/scripts/crosscflags 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/scripts/crosscflags 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-host=$1
-target=$2
-
-if test "$host" = "powerpc" -o "$host" = "ppc" \
- -o "$host" = "mips" -o "$host" = "s390" \
- -o "$host" = "sparc32" -o "$host" = "sparc64" \
- -o "$host" = "m68k" -o "$host" = "armv4b"; then
- hostbigendian="yes"
-else
- hostbigendian="no"
-fi
-
-# host long bits test
-if test "$host" = "sparc64" -o "$host" = "ia64" \
- -o "$host" = "amd64" -o "$host" = "x86_64" \
- -o "$host" = "alpha"; then
- hostlongbits="64"
-else
- hostlongbits="32"
-fi
-
-if test "$target" = "powerpc" -o "$target" = "ppc" \
- -o "$target" = "mips" -o "$target" = "s390" \
- -o "$target" = "sparc32" -o "$target" = "sparc64" \
- -o "$target" = "m68k" -o "$target" = "armv4b"; then
- targetbigendian="yes"
-else
- targetbigendian="no"
-fi
-
-# target long bits test
-if test "$target" = "sparc64" -o "$target" = "ia64" \
- -o "$target" = "amd64" -o "target" = "x86_64" \
- -o "$target" = "alpha"; then
- targetlongbits="64"
-else
- targetlongbits="32"
-fi
-
-if test "$targetbigendian" = "$hostbigendian"; then
- cflags="-USWAP_ENDIANNESS"
-else
- cflags="-DSWAP_ENDIANNESS"
-fi
-
-if test "$targetlongbits" = "$hostlongbits"; then
- cflags="$cflags -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH"
-elif test "$targetlongbits" -lt "$hostlongbits"; then
- cflags="$cflags -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH"
-else
- cflags="$cflags -DNATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH"
-fi
-
-if test "$host" = "x86" -a "$targetlongbits" = "64"; then
- cflags="$cflags -DNEED_FAKE_INT128_T"
-fi
-
-echo "$cflags"
Modified: trunk/openbios-devel/config/scripts/switch-arch
===================================================================
--- trunk/openbios-devel/config/scripts/switch-arch 2009-08-02 12:41:31 UTC (rev 531)
+++ trunk/openbios-devel/config/scripts/switch-arch 2009-08-02 16:59:05 UTC (rev 532)
@@ -1,5 +1,10 @@
#!/bin/sh
+#
+# MOLPATH is needed if you want to build openbios-mol.elf
+#
+MOLPATH=$HOME/mol-0.9.71
+
if [ x"$1" = x ]; then
printf "Usage:\n $0 [arch-config]...\n"
printf "arch-config values supported for native builds:\n"
@@ -9,19 +14,121 @@
exit 0
fi
+crosscflags()
+{
+ local host=$1
+ local target=$2
+
+ if test "$host" = "powerpc" -o "$host" = "ppc" \
+ -o "$host" = "mips" -o "$host" = "s390" \
+ -o "$host" = "sparc32" -o "$host" = "sparc64" \
+ -o "$host" = "m68k" -o "$host" = "armv4b"; then
+ hostbigendian="yes"
+ else
+ hostbigendian="no"
+ fi
+
+# host long bits test
+ if test "$host" = "sparc64" -o "$host" = "ia64" \
+ -o "$host" = "amd64" -o "$host" = "x86_64" \
+ -o "$host" = "alpha"; then
+ hostlongbits="64"
+ else
+ hostlongbits="32"
+ fi
+
+ if test "$target" = "powerpc" -o "$target" = "ppc" \
+ -o "$target" = "mips" -o "$target" = "s390" \
+ -o "$target" = "sparc32" -o "$target" = "sparc64" \
+ -o "$target" = "m68k" -o "$target" = "armv4b"; then
+ targetbigendian="yes"
+ else
+ targetbigendian="no"
+ fi
+
+# target long bits test
+ if test "$target" = "sparc64" -o "$target" = "ia64" \
+ -o "$target" = "amd64" -o "target" = "x86_64" \
+ -o "$target" = "alpha"; then
+ targetlongbits="64"
+ else
+ targetlongbits="32"
+ fi
+
+ if test "$targetbigendian" = "$hostbigendian"; then
+ cflags="-USWAP_ENDIANNESS"
+ else
+ cflags="-DSWAP_ENDIANNESS"
+ fi
+
+ if test "$targetlongbits" = "$hostlongbits"; then
+ cflags="$cflags -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH"
+ elif test "$targetlongbits" -lt "$hostlongbits"; then
+ cflags="$cflags -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH"
+ else
+ cflags="$cflags -DNATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH"
+ fi
+
+ if test "$host" = "x86" -a "$targetlongbits" = "64"; then
+ cflags="$cflags -DNEED_FAKE_INT128_T"
+ fi
+
+ CROSSCFLAGS=$cflags
+}
+
+archname()
+{
+ HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
+ -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
+ -e "s/Power Macintosh/ppc/"`
+}
+
# This is needed because viewvc messes with the permissions of executables:
chmod 755 utils/dist/debian/rules
chmod 755 config/scripts/switch-arch
-chmod 755 config/scripts/archname
chmod 755 config/scripts/reldir
-chmod 755 config/scripts/crosscflags
+
if test "x$HOSTARCH" = "x"; then
- HOSTARCH=`config/scripts/archname`
+ archname
fi
echo "Configuring OpenBIOS on $HOSTARCH for $*"
for RULES_ARCH in $*; do
- ARCH=`cat config/examples/${RULES_ARCH}_rules.xml |grep "^ARCH" |cut -d\= -f2|tr -d \ `
+ ARCH=`echo $RULES_ARCH | sed s/cross-//g`
+ case $ARCH in
+ amd64)
+ TARGET="x86_64-linux-gnu-"
+ CFLAGS="-fno-builtin"
+ ;;
+
+ ppc)
+ TARGET="powerpc-linux-gnu-"
+ CFLAGS="-msoft-float -fno-builtin-bcopy -fno-builtin-log2"
+ ;;
+
+ sparc32)
+ TARGET="sparc-elf-"
+ CFLAGS="-Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc -fno-builtin"
+ AS_FLAGS="-Wa,-xarch=v8 -Wa,-32"
+ ;;
+
+ sparc64)
+ TARGET="sparc64-elf-"
+ CFLAGS="-Wa,-xarch=v9b -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany -fno-builtin"
+ AS_FLAGS="-Wa,-xarch=v9b -Wa,-64"
+ ;;
+
+ x86)
+ TARGET="i486-linux-gnu-"
+ CFLAGS="-fno-builtin -m32"
+ AS_FLAGS="-Wa,-32"
+ ;;
+ esac
+ if test "$ARCH" = "$RULES_ARCH"; then
+ TARGET=""
+ fi
+ crosscflags $HOSTARCH $ARCH
OBJDIR=obj-$ARCH
printf "Initializing build tree $OBJDIR..."
rm -rf "$OBJDIR"
@@ -60,15 +167,35 @@
ODIR=.
printf "Creating target Makefile..."
- ln -s $SRCDIR/config/examples/${RULES_ARCH}_rules.xml $ODIR/rules.xml
+ echo "ARCH=$ARCH" > $ODIR/config.mak
+ echo "TARGET=$TARGET" >> $ODIR/config.mak
+ echo "CFLAGS=$CFLAGS" >> $ODIR/config.mak
+ echo "AS_FLAGS=$AS_FLAGS" >> $ODIR/config.mak
+ echo "HOSTARCH?=$HOSTARCH" >> $ODIR/config.mak
+ echo "CROSSCFLAGS=$CROSSCFLAGS" >> $ODIR/config.mak
+ ln -s $SRCDIR/config/xml/rules.xml $ODIR/rules.xml
ln -s $SRCDIR/config/examples/${RULES_ARCH}_config.xml $ODIR/config.xml
+ ln -s ../Makefile.target $ODIR/Makefile
xsltproc $SRCDIR/config/xml/xinclude.xsl $SRCDIR/build.xml > $ODIR/build-full.xml
- xsltproc $SRCDIR/config/xml/makefile.xsl $ODIR/build-full.xml > $ODIR/Makefile
+ xsltproc $SRCDIR/config/xml/makefile.xsl $ODIR/build-full.xml > $ODIR/rules.mak
echo "ok."
printf "Creating config files..."
xsltproc $SRCDIR/config/xml/config-c.xsl $SRCDIR/config/examples/${RULES_ARCH}_config.xml > $ODIR/host/include/autoconf.h
xsltproc $SRCDIR/config/xml/config-c.xsl $SRCDIR/config/examples/${RULES_ARCH}_config.xml > $ODIR/target/include/autoconf.h
xsltproc $SRCDIR/config/xml/config-forth.xsl $SRCDIR/config/examples/${RULES_ARCH}_config.xml > $ODIR/forth/config.fs
echo "ok."
+
+ grep CONFIG_MOL $ODIR/forth/config.fs >/dev/null && ( \
+ echo "Using MOL path $MOLPATH..."; \
+ ln -s $MOLPATH/src/shared/osi_calls.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/shared/osi.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/shared/prom.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/include/boothelper_sh.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/include/video_sh.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/include/pseudofs_sh.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/include/kbd_sh.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/drivers/disk/include/scsi_sh.h $ODIR/target/include/; \
+ ln -s $MOLPATH/src/drivers/disk/include/ablk_sh.h $ODIR/target/include/ ) || true
+
cd $SRCDIR
done
Added: trunk/openbios-devel/config/xml/rules.xml
===================================================================
--- trunk/openbios-devel/config/xml/rules.xml (rev 0)
+++ trunk/openbios-devel/config/xml/rules.xml 2009-08-02 16:59:05 UTC (rev 532)
@@ -0,0 +1,23 @@
+<rules>
+ <!-- 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>
More information about the OpenBIOS
mailing list