Commit graph

57 commits

Author SHA1 Message Date
Lephenixnoir
9e097109bc
cmake: allow assets at root of project in fxconv_declare_assets() 2022-01-05 19:15:35 +01:00
Lephenixnoir
afc6d51217
fxsdk: add more fxg1a/mkg3a flags in generate_{g1a,g3a}() 2021-11-18 23:16:17 +01:00
Lephenixnoir
30befdd2cf
cmake: automatically find libraries in FXSDK_PREFIX
This paves the way for out-of-compiler installs which might become a
relevant thing for packaging and dual gint/PrizmSDK users (if it ever
happens).
2021-05-25 20:57:22 +02:00
Lephenixnoir
55ed08abe5
cmake: lower minimum required version to 3.15
Version 3.15 introduces the <PREFIX>_KEYWORDS_MISSING_VALUES of the
cmake_parse_arguments() function, which is used in generate_g1a() and
generate_g3a(), so there is no way to bring it further down for free.
2021-05-10 15:25:47 +02:00
Lephenixnoir
ed10e727df
fxconv: enable custom types in the fxconv-metadata.txt system
Set the custom type with "custom-type: your_type_name" (instead of using
--custom on the command-line).

The converter.py in the current directory is still auto-detected as a
custom converter, but that won't work with CMake (which builds with the
build folder as current directory). Instead, a new option --converters=
with a semicolon-separated of Python files has been added. Use
fxconv_declare_converters() from the fxSDK-provided Fxconv module to
declare them programatically in CMake.
2021-05-04 17:38:28 +02:00
Lephenixnoir
d09ad9dd17
cmake: fix replacement pattern that finds sh-elf-objcopy
The previous one would fail if "gcc" was in the install path.
2021-04-17 15:59:35 +02:00
Lephenixnoir
1ad9079d90
fxg1a, mkg3a: change argument order for musl compatibility
The musl getopt does not swap arguments and requires every option to
precede every non-option. Do that in the CMake functions generate_g1a()
and generate_g3a().
2021-04-10 07:42:31 +02:00
Lephenixnoir
1a295958ee
use CMake to build the fxSDK 2021-04-03 11:39:26 +02:00
Lephenixnoir
6415476fe3
cmake: disable default x86/x64 flags on OSes that provide them 2021-03-06 11:50:52 +01:00
Lephenixnoir
c3d9b53758
fxsdk: forward errors during make 2021-01-31 19:06:21 +01:00
Lephenixnoir
0db7ae9e2b
cmake: detect compiler install path in a LANG-agnostic way 2021-01-30 23:01:28 +01:00
Lephenixnoir
8eed69b7a0
fxsdk: do not build if CMake fails 2021-01-28 22:15:41 +01:00
Lephenixnoir
51e60fcf06
cmake: add a utility to find simple libraries 2021-01-28 22:15:41 +01:00
Lephenixnoir
74766f381b
fxsdk: enable missing options on new projects 2021-01-27 22:21:39 +01:00
Lephenixnoir
0902fdc904
cmake: provide a function to set up assets' language and dependencies 2021-01-27 20:32:34 +01:00
Lephenixnoir
4e1e3c86b4
avoid warnings when FXSDK_CMAKE_MODULE_PATH is unused 2021-01-27 15:26:43 +01:00
Lephenixnoir
70ff9ba6b8
fxsdk: define TARGET_FX9860G and TARGET_FXCG50 in Makefiles
The older FX9860G and FXCG50 are still supported for backwards
compatibility, but are deprecated.
2021-01-27 11:26:22 +01:00
Lephenixnoir
4a6bc4724d
fxsdk: expose CMake module folder for library installs
Adds a new CMake variable FXSDK_CMAKE_MODULE_PATH where libraries can
install CMake module files.

Also remove FindGint.cmake which is now in gint.
2021-01-27 08:46:57 +01:00
Lephenixnoir
f5085e693d
fxsdk: add DSP assemblers flags 2021-01-26 10:09:03 +01:00
Lephenixnoir
ad5d9bdb4c
fxsdk: update Makefile-based build system for fxconv
* Use [find] for sources since it's used for dependency files...
* Get fxconv parameters from fxconv-metadata.txt
* Approximate dependencies: every asset depends on every metadata file
* Update location of example image
2021-01-26 09:47:16 +01:00
Lephenixnoir
53ea134c62
fxsdk: add options to fxsdk build 2021-01-25 10:40:55 +01:00
Lephenixnoir
1992aac4bd
cmake: define FXSDK_COMPILER_INSTALL for library installs 2021-01-23 15:02:42 +01:00
Lephenixnoir
fe36c99f98
cmake: reconfigure based on Makefile, not folder
This way [fxsdk build-*] will reconfigure if CMake fails the first time.
2021-01-22 16:12:06 +01:00
Lephenixnoir
e75c6aca59
fxsdk: do not force -m3 on fx to allow SH4 assembler 2021-01-22 16:10:40 +01:00
Lephenixnoir
985e86df77
cmake: add a helper module to retrieve version from Git tags 2021-01-22 14:42:05 +01:00
Lephenixnoir
6e24074688
remove the update command for Makefile build systems 2021-01-21 11:56:38 +01:00
Lephenixnoir
e2ba617405
fxsdk: command-line interface for fxSDK 2.3
* Add the CMake build system
* Use CMake as the default for new projects
* Change [fxsdk new] but continue supporting the previous signature
* Automatically configure in [fxsdk build-fx] and [fxsdk build-cg]
* Improve help screen
2021-01-14 11:07:06 +01:00
Lephenixnoir
d5759423db
fxsdk: helpers for CMake build systems 2021-01-14 11:07:06 +01:00
Lephenixnoir
7a4e5cde3b
fxsdk: move default project.cfg out of fxsdk.sh 2021-01-11 21:49:14 +01:00
Lephenixnoir
c9b1db8221
fxsdk: remove the WIP command-line interface
The fxSDK will no longer specify the final values for these parameters,
leaving them to the user in CMakeLists.txt or project.cfg, as reasonable
defaults are good enough.
2021-01-11 21:29:04 +01:00
Lephenixnoir
0d6a7728a1
fix return code for build-* and -s option
No idea how that slipped in there, damn.
2021-01-07 11:50:01 +01:00
Lephenixnoir
fefff0637a
add __pycache__ and .vscode to the default .gitignore 2021-01-04 13:45:56 +01:00
Lephenixnoir
203572b2af
fxsdk: add a sensible .gitignore when creating projects 2020-12-30 20:58:37 +01:00
Lephenixnoir
f11c70aac4
fxsdk: change INCLUDE flags to support folders inside GCC
Useful for OpenLibm as it is installed inside an [openlibm] folder but
needs to be included directly as it uses #include without the openlibm/
part.
2020-10-24 18:54:16 +02:00
Lephenixnoir
ee9c459c69
fxconv: add custom conversions
Custom conversions can be used by:
* Providing a converters.py in the main directory with a convert()
  function
* Specifying --custom on the fxconv command-line or using a subfolder or
  assets-{fx,cg} unused by standard fxconv
2020-10-23 13:05:50 +02:00
Lephenixnoir
74b0bfaba1
fxsdk: don't use basename -s for busybox compatibility 2020-09-22 15:36:28 +02:00
Lephenixnoir
cf12d5cfd1
fxsdk: disable warning about missing field initializers 2020-08-14 18:48:58 +02:00
Lephenixnoir
66e2f8429c
fxsdk: update starter's main.c for changes in dtext() 2020-07-14 12:20:49 +02:00
Lephenixnoir
c79b3b1a9d
fxconv: add suport for libimg images and deprecate --image
This commit introduces the libimg image format, selected with the option
type:libimg-image. To avoid confusion with the bopti image format,
options -i and --image are now deprecated and should be replaced with
--bopti-image or type:bopti-image. The fxSDK Makefile has been updated
accordingly.

To support the construction of a structure that contains a pointer in
fxconv, an assembly-code feature has been added. The structure itself is
assembled with as and then linked with the data proper. This allows the
structure to reference the data by name and have the pointer calculated
by ld at link time.
2020-03-11 19:37:27 +01:00
Lephenixnoir
b86b96aa4a
fxsdk: split additional libs into LIBS_FX and LIBS_CG
This is because several libraries have separate binaries, and so are
linked with different command-line arguments, just like gint is linked
with -lgint-fx on one side and -lgint-cg on the other.
2020-03-10 22:39:25 +01:00
Lephenixnoir
7d31294dc6
build: rewrite PREFIX in fxsdk.sh at compile-time
This makes it possible to change PREFIX at the last minute when running
install, effectively installing the files into a false packaging root
while retaining the same contents as if installed normally.
2020-02-19 22:26:29 +01:00
Lephenixnoir
e66035da44 fxsdk: use sh-elf by default in project.cfg 2019-11-29 10:46:22 +01:00
Lephenixnoir
15712b4f5b
fxsdk: add an option to choose add-in output path 2019-09-12 15:38:15 +02:00
Lephenixnoir
46b19bab62
fxsdk: new build system 2019-09-12 14:34:26 +02:00
Lephenixnoir
4f145cb202
fxsdk: add assembler compilation rules 2019-09-08 22:16:54 +02:00
Lephe
627fe14290
fxsdk: add update command and fix LD flag order 2019-09-03 23:23:24 +02:00
Lephe
e1ddf0f452 fxconv: code review and color image conversion
This change enhances the style of fxconv by using more classes and
generally more Pythonic constructions.

It also introduces image conversion for fx-CG 50, requiring the use
of --fx or --cg to specify the target machine with -i. The default
is set to --fx to maintain compatibility with older Makefiles.
2019-08-04 14:05:59 +02:00
Lephe
d022755c2a fxsdk: fix the source selection wildcard
Turns out make doesn't have /**/. Whatever.
2019-07-21 13:22:27 -04:00
Lephe
c11003eead fxsdk: detect source files recursively 2019-07-21 12:41:48 -04:00
Lephe
fae60c518c default project: fix stupidity (#2) 2019-07-05 08:54:29 -04:00