mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Add support for configuring for multiple targets
git-svn-id: svn://coreboot.org/openbios/openbios-devel@420 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := amd64
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
CC := gcc
|
||||
AS := as
|
||||
@@ -26,7 +29,7 @@ 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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
#
|
||||
# pre rules
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := ppc
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
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
|
||||
#
|
||||
@@ -29,7 +32,7 @@ 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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
M4 := m4
|
||||
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := sparc32
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
TARGET=sparc-elf-
|
||||
CC := $(TARGET)gcc
|
||||
@@ -26,7 +29,7 @@ CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fn
|
||||
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
|
||||
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
AS_FLAGS := -Wa,-xarch=v8 -Wa,-32 -g
|
||||
|
||||
#
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := sparc64
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
TARGET=sparc64-elf-
|
||||
CC := $(TARGET)gcc
|
||||
@@ -27,7 +30,7 @@ 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
|
||||
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
AS_FLAGS := -Wa,-xarch=v9b -Wa,-64 -g
|
||||
|
||||
#
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := x86
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
#TARGET=i386-elf-
|
||||
TARGET=
|
||||
@@ -27,7 +30,7 @@ CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fn
|
||||
CFLAGS+= -m32
|
||||
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
|
||||
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
|
||||
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
AS_FLAGS := -Wa,-32 -g
|
||||
|
||||
#
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := ppc
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
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
|
||||
#
|
||||
@@ -28,7 +31,7 @@ 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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
M4 := m4
|
||||
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := sparc32
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
CC := gcc
|
||||
AS := as
|
||||
@@ -31,7 +34,7 @@ CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fn
|
||||
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
|
||||
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
AS_FLAGS := -Wa,-xarch=v8 -Wa,-32 -g
|
||||
|
||||
#
|
||||
|
||||
@@ -7,13 +7,16 @@
|
||||
#
|
||||
|
||||
ARCH := sparc64
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
CC := gcc
|
||||
AS := as
|
||||
@@ -32,7 +35,7 @@ CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fn
|
||||
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
|
||||
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
AS_FLAGS := -Wa,-xarch=v9b -Wa,-64 -g
|
||||
|
||||
ifeq ($(shell uname), OpenBSD)
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
#
|
||||
|
||||
ARCH := x86
|
||||
ODIR := obj-$(ARCH)
|
||||
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 := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
|
||||
CC := gcc
|
||||
AR := ar
|
||||
@@ -29,7 +32,7 @@ CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fn
|
||||
CFLAGS+= -m32
|
||||
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
|
||||
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
|
||||
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
|
||||
INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
|
||||
AS_FLAGS := -Wa,-32 -g
|
||||
|
||||
#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ x"$1" = x ]; then
|
||||
printf "Usage:\n $0 [arch-config]\n"
|
||||
printf "Usage:\n $0 [arch-config]...\n"
|
||||
printf "arch-config values supported for native builds:\n"
|
||||
printf " amd64, ppc, sparc32, sparc64, x86\n"
|
||||
printf "arch-config values supported for cross compiled builds:\n"
|
||||
@@ -9,9 +9,64 @@ if [ x"$1" = x ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ARCH=$1
|
||||
# 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
|
||||
HOSTARCH=`config/scripts/archname`
|
||||
|
||||
rm -f rules.xml
|
||||
rm -f config.xml
|
||||
ln -s config/examples/${ARCH}_rules.xml rules.xml
|
||||
ln -s config/examples/${ARCH}_config.xml config.xml
|
||||
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 \ `
|
||||
OBJDIR=obj-$ARCH
|
||||
printf "Initializing build tree $OBJDIR..."
|
||||
rm -rf "$OBJDIR"
|
||||
mkdir "$OBJDIR"
|
||||
mkdir -p $OBJDIR/target
|
||||
mkdir -p $OBJDIR/target/include
|
||||
mkdir -p $OBJDIR/target/arch
|
||||
mkdir -p $OBJDIR/target/arch/unix
|
||||
mkdir -p $OBJDIR/target/arch/$ARCH
|
||||
mkdir -p $OBJDIR/target/arch/ppc
|
||||
mkdir -p $OBJDIR/target/arch/ppc/briq # no autodetection of those..
|
||||
mkdir -p $OBJDIR/target/arch/ppc/pearpc
|
||||
mkdir -p $OBJDIR/target/arch/ppc/qemu
|
||||
mkdir -p $OBJDIR/target/arch/ppc/mol
|
||||
mkdir -p $OBJDIR/target/arch/x86
|
||||
mkdir -p $OBJDIR/target/arch/x86/xbox
|
||||
mkdir -p $OBJDIR/target/libgcc
|
||||
mkdir -p $OBJDIR/target/kernel
|
||||
mkdir -p $OBJDIR/target/modules
|
||||
mkdir -p $OBJDIR/target/fs
|
||||
mkdir -p $OBJDIR/target/fs/grubfs
|
||||
mkdir -p $OBJDIR/target/fs/hfs
|
||||
mkdir -p $OBJDIR/target/fs/hfsplus
|
||||
mkdir -p $OBJDIR/target/drivers
|
||||
mkdir -p $OBJDIR/target/libc
|
||||
mkdir -p $OBJDIR/host/include
|
||||
mkdir -p $OBJDIR/host/kernel
|
||||
mkdir -p $OBJDIR/forth
|
||||
ln -s ../../../include/$ARCH $OBJDIR/target/include/asm
|
||||
#compile the host binary with target settings instead
|
||||
#ln -s ../../../include/$HOSTARCH $OBJDIR/host/include/asm
|
||||
echo "ok."
|
||||
|
||||
cd $OBJDIR
|
||||
SRCDIR=..
|
||||
ODIR=.
|
||||
|
||||
printf "Creating target Makefile..."
|
||||
ln -s $SRCDIR/config/examples/${RULES_ARCH}_rules.xml $ODIR/rules.xml
|
||||
ln -s $SRCDIR/config/examples/${RULES_ARCH}_config.xml $ODIR/config.xml
|
||||
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
|
||||
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."
|
||||
cd $SRCDIR
|
||||
done
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<xsl:value-of select="$dictname"/><xsl:text>-DICTIONARY:=$(</xsl:text>
|
||||
<xsl:value-of select="$dictname"/><xsl:text>-DICTIONARY) </xsl:text>
|
||||
|
||||
<xsl:text>$(SRCDIR)/</xsl:text>
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:value-of select="@source"/>
|
||||
<xsl:text> </xsl:text>
|
||||
@@ -116,6 +117,7 @@
|
||||
|
||||
<xsl:if test="$conditions = 0">
|
||||
<xsl:text> -I</xsl:text>
|
||||
<xsl:text>$(SRCDIR)/</xsl:text>
|
||||
<xsl:value-of select="$path"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<xsl:include href="object.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:value-of select="document('../../rules.xml')/rules/pre"/>
|
||||
<xsl:value-of select="document('rules.xml',.)/rules/pre"/>
|
||||
<xsl:apply-templates select="." mode="dictionaries"/>
|
||||
<xsl:apply-templates select="." mode="objects"/>
|
||||
</xsl:template>
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<xsl:text>.o: </xsl:text>
|
||||
|
||||
<!-- path of source file -->
|
||||
<xsl:text>$(SRCDIR)/</xsl:text>
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:value-of select="@source"/>
|
||||
|
||||
@@ -68,7 +69,7 @@
|
||||
<xsl:text>" ;\</xsl:text>
|
||||
</xsl:if>
|
||||
<!-- FIXME this requires strict spaces in rules.xml -->
|
||||
<xsl:value-of select="document('../../rules.xml')//rule[@target=$target][@entity='object']"/>
|
||||
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
@@ -154,7 +155,7 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- FIXME this requires strict spaces in rules.xml -->
|
||||
<xsl:value-of select="document('../../rules.xml')//rule[@target=$target][@entity='executable']"/>
|
||||
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='executable']"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
@@ -252,7 +253,7 @@
|
||||
|
||||
|
||||
<!-- FIXME this requires strict spaces in rules.xml -->
|
||||
<xsl:value-of select="document('../../rules.xml')//rule[@target=$target][@entity='library']"/>
|
||||
<xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='library']"/>
|
||||
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$expression!=''">
|
||||
<xsl:variable name="value"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::value"/></xsl:variable>
|
||||
<xsl:variable name="type"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::type"/></xsl:variable>
|
||||
<xsl:variable name="value"><xsl:value-of select="document('config.xml',.)//option[@name=$confexpr]/attribute::value"/></xsl:variable>
|
||||
<xsl:variable name="type"><xsl:value-of select="document('config.xml',.)//option[@name=$confexpr]/attribute::type"/></xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type='boolean'">
|
||||
<xsl:choose>
|
||||
|
||||
Reference in New Issue
Block a user