build with sh-elf by default (fixes #1)

This commit is contained in:
Lephenixnoir 2020-02-18 07:51:47 +01:00
parent e4cedf72a9
commit ef49aa8da4
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 10 additions and 12 deletions

View File

@ -3,7 +3,7 @@
cflags := -m3 -mb -ffreestanding -nostdlib -fstrict-volatile-bitfields -Wall \
-Wextra -Os -I .
target ?= sh3eb-elf
target ?= sh-elf
lib := libprof.a
header := libprof.h

View File

@ -10,33 +10,31 @@ code.
## Building
libprof is built only once for both fx-9860G and fx-CG 50, but if you use
different compilers you will need to install it twice. The dependencies are:
libprof is built and installed only once for both fx-9860G and fx-CG 50. The
The dependencies are:
* A GCC cross-compiler for a SuperH architecture
* The [gint kernel](/Lephenixnoir/gint)
The Makefile will build the library without further instructions.
The Makefile will build and install the library without further instructions.
```sh
% make
% make install
```
By default `sh3eb-elf` is used to build; you can override this by setting the
By default `sh-elf` is used to build; you can override this by setting the
`target` variable.
```sh
% make target=sh4eb-elf
```
Install as usual:
```sh
% make install
# or
% make install target=sh4eb-elf
```
If you have the older setup with two toolchains (`sh3eb-elf` and `sh4eb-elf`),
instead of the new one with two targets on the same toolchain (`sh-elf`), you
will need to make and install twice.
## Basic use
To access the library, include the `<libprof.h>` header file.