-case "${HVL_TARGET}" in
- arm*)
- CLFS_BUILDFLAGS="-mabi=aapcs-linux -mfloat-abi=soft"
- CLFS_TARGET="arm-linux-gnueabi"
- CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/arm.*/arm/g')
- CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/armeb/BIG/' -e 's/arm/LITTLE/')
- if [ "${CLFS_ENDIAN}" = "LITTLE" ]; then
- CLFS_NOT_ENDIAN="BIG"
- else
- CLFS_NOT_ENDIAN="LITTLE"
- fi
- ;;
- "x86_64")
- CLFS_BUILDFLAGS="-m64"
- CLFS_TARGET="${HVL_TARGET}-unknown-linux-gnu"
- CLFS_ARCH=${HVL_TARGET}
- ;;
- "x86")
- # No special flags
- CLFS_BUILDFLAGS=""
- CLFS_TARGET="i686-unknown-linux-gnu"
- CLFS_ARCH=${HVL_TARGET}
- ;;
- m68k*)
- #CLFS_BUILDFLAGS="-mcpu=51jm"
- CLFS_BUILDFLAGS=""
- CLFS_TARGET="${HVL_TARGET}-unknown-linux-gnu"
- CLFS_ARCH=${HVL_TARGET}
- ;;
- *)
- echo "Unsupported target architecture: ${HVL_TARGET}"
- return ${EXIT_FAILURE}
- ;;
-esac
+# Load default values. They can be overriden
+# by a target-specific file
+source ../targets/default
+
+if [ -f ../targets/${HVL_TARGET} ]; then
+ source ../targets/${HVL_TARGET}
+fi
+
+CLFS_TARGET="${CLFS_ARCH}-${CLFS_OS}-${CLFS_ABI}"