mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-28 20:43:38 +01:00
Update configure script
* add early "-h" and "--help" handling * replace "--support-<ABI_NAME>" flags by "--support=<target>,<target>,..." * rename libraries name: * "libfxlibc-casio-abi-fx9860g" -> "libfxlibc-fx9860g" * "libfxlibc-casio-abi-fxcg5" -> "libfxlibc-fxcg50" Update the README.md
This commit is contained in:
parent
e9984365eb
commit
47e79813d9
3 changed files with 58 additions and 35 deletions
26
README.md
26
README.md
|
@ -14,7 +14,7 @@ system.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
Fx C library depends on a suitable GCC toolchain in the PATH. You can absolutely
|
Fx C library depends on a suitable GCC toolchain in the PATH. You can absolutely
|
||||||
not build gint with your system compiler!
|
not build `fxlibc` with your system compiler!
|
||||||
|
|
||||||
* The tutorial on Planète Casio builds an sh-elf that works everywhere.
|
* The tutorial on Planète Casio builds an sh-elf that works everywhere.
|
||||||
* For fx-9860G II, `sh3eb-elf` is strongly advised.
|
* For fx-9860G II, `sh3eb-elf` is strongly advised.
|
||||||
|
@ -35,14 +35,14 @@ the wiki)
|
||||||
|
|
||||||
#### Configuration and support
|
#### Configuration and support
|
||||||
The Fx C library supports these ABI:
|
The Fx C library supports these ABI:
|
||||||
* `casio-abi-fx9860g` for the support of Casio ABI used by fx9860g-like devices.
|
* `fx9860g` for the support of Casio ABI used by fx9860g-like devices.
|
||||||
* `casio-abi-fxcg50` for the support of Casio ABI used by the fxcg50 device.
|
* `fxcg50` for the support of Casio ABI used by the fxcg50 device.
|
||||||
* `vhex-kernel` for the support of Vhex kernel ABI.
|
* `vhex` for the support of Vhex kernel ABI.
|
||||||
* (nothing) compile only standing functions.
|
* (nothing) compile only standing functions.
|
||||||
|
|
||||||
The Fx C library support these format:
|
The Fx C library support these format:
|
||||||
* `static` generate static libraries.
|
* `static` generate static libraries.
|
||||||
* `shared` generate shared libraries (Only for the Vhex kernel).
|
* `dynamic` generate dynamic libraries (Only for the Vhex kernel).
|
||||||
|
|
||||||
Note that the shared feature is not currently implemented because of
|
Note that the shared feature is not currently implemented because of
|
||||||
non-support of the shared library generation by the GCC compiler for SuperH
|
non-support of the shared library generation by the GCC compiler for SuperH
|
||||||
|
@ -50,13 +50,13 @@ architecture. A workaround can be used but it requires a static library to do
|
||||||
the dynamic symbols resolving (Thanks Kristaba).
|
the dynamic symbols resolving (Thanks Kristaba).
|
||||||
|
|
||||||
For more information about library build configuration, you can use the
|
For more information about library build configuration, you can use the
|
||||||
`../configure --help` command.
|
`./configure --help` command.
|
||||||
|
|
||||||
#### Building
|
#### Building
|
||||||
Create a build directory and configure in it:
|
Create a build directory and configure in it:
|
||||||
```
|
```
|
||||||
% mkdir build && cd build
|
% mkdir build && cd build
|
||||||
% ../configure
|
% ../configure --static --support=vhex,fx9860g,fxcg50
|
||||||
```
|
```
|
||||||
|
|
||||||
Then build the source and install the library files to the selected directory.
|
Then build the source and install the library files to the selected directory.
|
||||||
|
@ -95,10 +95,10 @@ To use Fx C library as your runtime environment, the bare minimum is:
|
||||||
* You must add `fxlibc/` instead of each include file (for example, if you want
|
* You must add `fxlibc/` instead of each include file (for example, if you want
|
||||||
to include `stdio.h` you mush use `#include <fxlibc/stdio.h>`.
|
to include `stdio.h` you mush use `#include <fxlibc/stdio.h>`.
|
||||||
* Link with:
|
* Link with:
|
||||||
* `-lfxlibc` for standalone feature
|
* `-lfxlibc-fx9860g` for Casio ABI support for monochrome devices
|
||||||
* `-lfxlibc-casio-abi-fx9860g` for Casio ABI support for monochrome devices
|
* `-lfxlibc-fxcg50` for Casio ABI support for primz devices
|
||||||
* `-lfxlibc-casio-abi-fxcg50` for Casio ABI support for primz devices
|
|
||||||
* `-lfxlibc-vhex` for Vhex kernel support.
|
* `-lfxlibc-vhex` for Vhex kernel support.
|
||||||
|
* `-lfxlibc` for standalone features
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -106,3 +106,9 @@ To use Fx C library as your runtime environment, the bare minimum is:
|
||||||
This work is licensed under a CC0 1.0 Universal License. To view a copy of this
|
This work is licensed under a CC0 1.0 Universal License. To view a copy of this
|
||||||
license, visit: https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
|
license, visit: https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
|
||||||
Or see the LICENSE file.
|
Or see the LICENSE file.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Special thanks to
|
||||||
|
* Lephenixnoir - For all <3
|
||||||
|
* Kristaba - For the idea with the shared libraries workaround !
|
||||||
|
|
65
configure
vendored
65
configure
vendored
|
@ -1,9 +1,5 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
#
|
# Fx C standard library configuration script
|
||||||
# -= TODO =-
|
|
||||||
# * check if the wanted lib exist (check lib verion too)!
|
|
||||||
# * option to list all installed libraries with their versions
|
|
||||||
# * each ABI options define one specific libs (fxlibc-common, fxlibc-vhex, fxlibc-fx9860g, fxlibc-fxcg50)
|
|
||||||
|
|
||||||
# output file
|
# output file
|
||||||
confile='fxlibc.cfg'
|
confile='fxlibc.cfg'
|
||||||
|
@ -18,7 +14,6 @@ makefile='Makefile.default'
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
debug=false
|
debug=false
|
||||||
valgrind=false
|
|
||||||
|
|
||||||
# ABI support
|
# ABI support
|
||||||
support_vhex_kernel=false
|
support_vhex_kernel=false
|
||||||
|
@ -52,20 +47,24 @@ Build options:
|
||||||
--prefix=PREFIX Install prefix (PREFIX/lib and PREFIX/include are used)
|
--prefix=PREFIX Install prefix (PREFIX/lib and PREFIX/include are used)
|
||||||
|
|
||||||
ABI support:
|
ABI support:
|
||||||
--support-vhex
|
--support=<target>,<target>, ...
|
||||||
Enable the Vhex kernel support
|
Support all <target> ABI if supported by the library.
|
||||||
--support-casio-fx9860,
|
|
||||||
--support-casio-fxcg50
|
|
||||||
Enable the support of the Casio' ABI (used by malloc, free, ...)
|
|
||||||
|
|
||||||
fx9860 covers all fx-9860G II-like monochromes models that support add-ins
|
target-list:
|
||||||
or can be flashed with an OS that does. This includes SH3 and SH4 machines.
|
* vhex
|
||||||
|
Enable the Vhex kernel support
|
||||||
|
* fx9860g, fxcg50
|
||||||
|
Enable the support of the Casio' ABI
|
||||||
|
|
||||||
fxcg50 covers just the fx-CG 50; there is some unofficial compatibility with
|
fx9860 covers all fx-9860G II-like monochromes models that support
|
||||||
fx-CG 10/20. All of these are SH4-only.
|
addins or can be flashed with an OS that does. This includes SH3 and
|
||||||
|
SH4 machines.
|
||||||
|
|
||||||
The 'ABI support' is used to allow some part of the code, in particular the 'unistd'
|
fxcg50 covers just the fx-CG 50; there is some unofficial compatibility
|
||||||
part, I/O management and additionals feature. (like process, fs, ...).
|
with fx-CG 10/20. All of these are SH4-only.
|
||||||
|
|
||||||
|
The 'ABI support' is used to allow some part of the code, in particular the
|
||||||
|
'unistd' part, I/O management and additionals feature. (like process, fs, ...).
|
||||||
|
|
||||||
Format:
|
Format:
|
||||||
--static Generate static libraries (default)
|
--static Generate static libraries (default)
|
||||||
|
@ -89,6 +88,13 @@ EOF
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#---
|
||||||
|
# Check early help options
|
||||||
|
#---
|
||||||
|
if [[ $# -lt 1 ]] || [[ "$1" = "-h" ]] || [[ "$1" = "--help" ]]; then
|
||||||
|
help
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#---
|
#---
|
||||||
# Check mandatory build location
|
# Check mandatory build location
|
||||||
|
@ -125,12 +131,23 @@ for arg; do case "$arg" in
|
||||||
cflags=${arg#*=};;
|
cflags=${arg#*=};;
|
||||||
|
|
||||||
# ABI support
|
# ABI support
|
||||||
--support-vhex)
|
--support=*)
|
||||||
support_vhex_kernel=true;;
|
IFS=',' read -ra target_abi <<< "${arg#*=}"
|
||||||
--support-casio-abi-fx9860)
|
for abi in "${target_abi[@]}"; do case "$abi" in
|
||||||
support_casio_abi_fx9860=true;;
|
all)
|
||||||
--support-casio-abi-fxcg50)
|
support_vhex_kernel=true
|
||||||
support_casio_abi_fxcg50=true;;
|
support_casio_abi_fx9860=true
|
||||||
|
support_casio_abi_fxcg50=true;;
|
||||||
|
vhex)
|
||||||
|
support_vhex_kernel=true;;
|
||||||
|
fx9860g)
|
||||||
|
support_casio_abi_fx9860=true;;
|
||||||
|
fxcg50)
|
||||||
|
support_casio_abi_fxcg50=true;;
|
||||||
|
*)
|
||||||
|
echo "error: unreconized target '$abi', giving up." >&2
|
||||||
|
exit 1
|
||||||
|
esac; done;;
|
||||||
|
|
||||||
# format options
|
# format options
|
||||||
--static)
|
--static)
|
||||||
|
@ -168,11 +185,11 @@ then
|
||||||
prefix=$inst
|
prefix=$inst
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# TODO: check if the wanted lib exist (check lib verion too)!
|
# TODO: check if the wanted lib exist (check lib verion too)!
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
|
||||||
#---
|
#---
|
||||||
# Dump appropriate Makefile
|
# Dump appropriate Makefile
|
||||||
# @note:
|
# @note:
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#---
|
#---
|
||||||
MAJOR := 0
|
MAJOR := 0
|
||||||
MINOR := 3
|
MINOR := 3
|
||||||
PATCH := 0
|
PATCH := 1
|
||||||
EXTRAVERSION :=
|
EXTRAVERSION :=
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue