Skip to content

Commit

Permalink
?README.md: ?#how-to-use-this: new dirs (
Browse files Browse the repository at this point in the history
	plus howto redirect `OBJDIR` or `BINDIR`).

	Fixups:
		Ambiguous terms now clickable.
		?`Targets:`: version requirement English improved.
		?`Allowed flags;`: (Now `Console flags:`) separate into list.

Is followup to: 35b2387 (?`build.sh`: +`OBJDIR`(+`obj/`), +`BINDIR`(+`bin/`)), which is for issue #18 (support more tools).
  • Loading branch information
SwuduSusuwu committed Nov 16, 2024
1 parent 35b2387 commit 58f4a78
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [..."warning: use default member initializer for 'inputNeurons' [cppcoreguidelines-use-defau lt-member-init,modernize-use-default-member-init]" fix@579a908](https://github.com/SwuduSusuwu/SubStack/commit/579a9089248a018005f36522968026ee464fc061) bumped the minimum 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)`.
Expand Down

0 comments on commit 58f4a78

Please sign in to comment.