From 8be2a18a002a994e635157874ee2904737188d19 Mon Sep 17 00:00:00 2001 From: SwuduSusuwu <2002luvabbaluvu@gmail.com> Date: Sat, 16 Nov 2024 07:47:22 -0800 Subject: [PATCH] ?`README.md`: ?`#how-to-use-this`: new dirs ( plus howto redirect `OBJDIR` or `BINDIR`). Fixups: Ambiguous terms now clickable. ?`Target:`: version requirement English improved. ?"Allowed flags": (Now "Console flags") separate into list. Is followup to: 35b2387d3047fd634e853098abaaaacff9f525e9 (?`build.sh`: +`OBJDIR`(+`obj/`), +`BINDIR`(+`bin/`)), which is for issue #18 (support more tools). --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3037846e..3a11f4a2 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,16 @@ Dual licenses: choose [_Creative Commons_](https://creativecommons.org/share-you [`./cxx/`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/cxx/) _C++_ implementations of posts (for now is just neural system pure virtual template ([`./cxx/ClassCns.hxx`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/cxx/ClassCns.hxx)) + antivirus([`./cxx/VirusAnalysis.cxx`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/cxx/VirusAnalysis.cxx)) + assistant([`./cxx/AssistantCns.cxx`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/cxx/AssistantCns.cxx)), with lots of [issues](https://github.com/SwuduSusuwu/SubStack/issues) which you can contribute to, or can request that more resources go to). # How to use this -Targets: Windows/Linux/Android/OSX/iOS; all compilers with `201102 <= __cplusplus` (minimum [_C++11_](https://gcc.gnu.org/projects/cxx-status.html#cxx11), due to use of `auto`, `decltype`, `for(x: list) {}`nullptr`, `__func__`). [TODO: It is possible that `[modernize-use-default-member-init]` fix (commit 579a9089248a018005f36522968026ee464fc061) bumped this up to [_C++14_](https://gcc.gnu.org/projects/cxx-status.html#cxx14) (if so will undo, as was told that not all microcontrollers have compilers which support this).] +Targets: Windows/Linux/Android/OSX/iOS; minimum [_C++11_](https://gcc.gnu.org/projects/cxx-status.html#cxx11) (all `CXX` with `201102 <= __cplusplus`,) due to use of `auto`, `decltype`, `for(value: list) {}`, `nullptr`, `__func__`). [TODO: It is possible that `[modernize-use-default-member-init]` fix (commit 579a9089248a018005f36522968026ee464fc061) bumped this up to [_C++14_](https://gcc.gnu.org/projects/cxx-status.html#cxx14) (if so will undo, as was told that not all microcontrollers have compilers which support _C++14_).] -Usage: [`./build.sh`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/build.sh) produces `*.o` static libraries (for distribution to others,) plus `a.out` to do unit tests (test harnesses). +Usage: [`./build.sh [OPTIONS]`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/build.sh) produces objects (`./obj/*.o`, for distribution into other tools,) plus [_Executable and Linkable Format_](https://wikipedia.org/wiki/Executable_and_Linkable_Format) (`./bin/a.out`, to do examples/[unit tests](https://wikipedia.org/wiki/Unit_test#Agile) which prove how effective functions execute,) both of which you can redirect with `export OBJDIR=___` (or `export BINDIR=___`.) - [`./cxx/main.hxx`](https://github.com/SwuduSusuwu/SubStack/blob/trunk/cxx/main.hxx) has constants to use to interpret `a.out`'s return values. - -- Allowed flags; `./build.sh --debug` (default; includes frame-pointers/debug symbols (`-g`), includes `valgrind`-replacement tools (such as `-fsanitize=address`), `./build.sh --release` (excludes `--debug`, strips frame-pointers/symbols, optimizes with `-O2`), `./build.sh --mingw` (if on _Linux_, can use with `--release` or `--debug`, produces _Portable Executable_ for _Windows_. If on _Windows_, the default is to produce _Portable Executable_'s for _Windows_) -- Extra flags (`vim build.sh` to use); other than `_PREFER_`/`_SKIP_`, most use more resources if set to `true`: +- Console flags; + - `./build.sh` : Defaults to `./build.sh --debug`. + - `./build.sh --debug` : includes frame-pointers/debug symbols (`-g`), includes `valgrind`-replacement tools (such as `-fsanitize=address`), optimizes with `-Og`. + - `./build.sh --release` : excludes `--debug` (`-DNDEBUG`), strips frame-pointers/symbols, optimizes with `-O2`. + - `./build.sh --mingw` : can mix with `--release` or `--debug`. Produces [_Portable Executable_](https://wikipedia.org/wiki/Portable_Executable) (`./bin/a.exe`), for _Windows_ +- Special flags (`vim build.sh` to use); other than `_PREFER_`/`_SKIP_`, most use more resources if set to `true`: - Custom `sh` (console) output: - `-DSUSUWU_SH_PREFER_STDIO` to replace `std::cXXX << ...` with `fprintf(stdXXX, ...)`; default is `!defined(__cplusplus)`. - `-DSUSUWU_SH_VERBOSE` to print diagnostic messages (`SUSUWU_SH_USE_FILE`, `SUSUEU_SH_USE_LINE`, `SUSUWU_NOTICE`, `SUSUWU_DEBUG`, `SUSUWU_DEBUGEXECUTE`, `SUSUWU_NOTICE_EXECUTE`, `SUSUWU_DEBUG_EXECUTE` all use `#if SUSUWU_SH_VERBOSE`); default is `!defined(NDEBUG)`.