zxuno-git/sdk
Ivan Tatarinov 7b2f73b92b sdk: make SDK almost compliant with version 3.0 of the REUSE Specification 2021-04-14 18:24:23 +03:00
..
LICENSES sdk: make SDK almost compliant with version 3.0 of the REUSE Specification 2021-04-14 18:24:23 +03:00
bin sdk: added `AddItem` tool to SDK 2021-04-14 16:30:15 +03:00
src sdk: added `AddItem` tool to SDK 2021-04-14 16:30:15 +03:00
Makefile sdk: added `AddItem` tool to SDK 2021-04-14 16:30:15 +03:00
README.md sdk: added `AddItem` tool to SDK 2021-04-14 16:30:15 +03:00
README.md.license + added files `sdk/README.md`, `sdk/README.md.license`, `sdk/setvars.sh`, `sdk/bin/sjasmplus.exe.license` 2021-04-10 12:15:20 +03:00
common.mk + sdk: added MinGW build target 2021-04-13 12:26:12 +03:00
setvars.bat + added files `sdk/README.md`, `sdk/README.md.license`, `sdk/setvars.sh`, `sdk/bin/sjasmplus.exe.license` 2021-04-10 12:15:20 +03:00
setvars.sh sdk: fix mistake in path resolving in file `sdk/setvars.sh` 2021-04-10 13:21:04 +03:00

README.md

Authors

2021 Ivan Tatarinov ivan-tat@ya.ru

Contributors

No one yet.

License

This document is under GNU FDL-1.3 or later license.

1. General information

The source code of all tools is in src directory. All compiled binaries are placed in bin directory.

We try to follow REUSE recommendations on how to easely specify copyright and licensing information to our files. So we added this information to each source file we used according to SPDX specification. Check it out by using this reuse-tool.

2. Using SDK in GNU environment on Linux, FreeBSD etc.

2.1. Build tools

Command Target
make all tools
make bin/sjasmplus sjasmplus
make bin/zx7b zx7b
make bin/fcut fcut
make bin/fpad fpad
make bin/fpoke fpoke
make bin/GenRom GenRom
make bin/AddItem AddItem

To build using MinGW add this parameter for make tool:

Parameter Target system
BUILD=mingw32 Windows with i686 architecture (32-bits)
BUILD=mingw64 Windows with AMD64 architecture (64-bits)

Remember to specify proper file extension (.exe) for target when building with MinGW. Example:

make BUILD=mingw64 bin/fcut.exe bin/fpad.exe bin/fpoke.exe

Then you may use strip tool to strip debug information from file and thus shrink file's size:

strip bin/fcut.exe bin/fpad.exe bin/fpoke.exe

2.2. Clean tools

To clean everything type:

make clean

To clean MinGW builds use appropriate BUILD parameter as described in 2.1. Example:

make BUILD=mingw64 clean

2.3. Tools usage

These tools are supposed to be used mainly in Makefiles and Bash scripts invoked from Makefiles.

2.3.1. In Makefiles

To use these tools in a Makefile just include common.mk file at the beginning of one like this:

include ../sdk/common.mk

Remember to specify correct relative path to it.

This will set ZXUNOSDK environment variable (on first inclusion only) and update your PATH environment variable to point to SDK's tools. These changes are actual for current invocation of make utility and all child processes.

2.3.2. In Bash scripts

Bash scripts are supposed to be invoked from Makefiles where the correct environment is already prepared by make utility so nothing must be done for such scripts.

In other cases you must source setvars.sh file in a Bash script like this:

source ../sdk/setvars.sh

or

. ../sdk/setvars.sh

Remember to specify correct relative path to it.

This has the same behavior as the inclusion of common.mk file in a Makefile.

3. Using SDK in GNU environment on Windows

NOTE: by default compilation of the following tools:

  • sjasmplus
  • zx7b
  • fcut
  • fpad
  • fpoke
  • GenRom
  • AddItem

on Windows platform is disabled right now because of presence of precompiled binaries of them in repository. By default they are not deleted when cleaning.

3.1. Build tools

The building process is similar to one for GNU on Linux, FreeBSD etc. See 2.1 with addition that you should provide correct target name (specify file extension .exe) and also specify parameter FORCEBUILD=1.

3.2. Clean tools

The cleaning process is similar to one for GNU on Linux, FreeBSD etc. See 2.2 with addition that you should specify parameter FORCECLEAN=1.

3.3. Tools usage

3.3.1. In Makefiles

The usage is similar to one for GNU on Linux, FreeBSD etc. See 2.3.1.

3.3.2. In Bash scripts

The usage is similar to one for GNU on Linux, FreeBSD etc. See 2.3.2.

4. Using SDK on Windows without GNU environment

4.1. In batch scripts

To use these tools in a batch script just call setvars.bat file at the beginning of one like this:

call ..\sdk\setvars.bat

Remember to specify correct relative path to it.

This will set ZXUNOSDK environment variable (on first call only) and update your PATH environment variable to point to SDK's tools. These changes are actual for current invocation of command shell and all child processes.

References