From 2ae776318e6c92079528c35f3f5faf81f54fa10e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 19 Dec 2025 14:15:06 +0100 Subject: chore: Add MailMap, rename `examples` to `example`. Signed-off-by: Amlal El Mahrouss --- MailMap | 1 + example/example_01_hello_world/hello_world.cc | 7 +++++++ example/example_01_hello_world/posix.json | 10 ++++++++++ example/example_01_hello_world/win64.json | 10 ++++++++++ example/example_02_libnebuild/README.md | 7 +++++++ example/example_02_libnebuild/libnebuild.cc | 17 +++++++++++++++++ example/example_02_libnebuild/posix.json | 20 ++++++++++++++++++++ example/example_02_libnebuild/win64.json | 19 +++++++++++++++++++ example/example_03_hello_world_toml/hello_world.cc | 7 +++++++ example/example_03_hello_world_toml/posix.toml | 8 ++++++++ example/example_03_hello_world_toml/win64.toml | 8 ++++++++ examples/example_01_hello_world/hello_world.cc | 7 ------- examples/example_01_hello_world/posix.json | 10 ---------- examples/example_01_hello_world/win64.json | 10 ---------- examples/example_02_libnebuild/README.md | 7 ------- examples/example_02_libnebuild/libnebuild.cc | 17 ----------------- examples/example_02_libnebuild/posix.json | 20 -------------------- examples/example_02_libnebuild/win64.json | 19 ------------------- examples/example_03_hello_world_toml/hello_world.cc | 7 ------- examples/example_03_hello_world_toml/posix.toml | 8 -------- examples/example_03_hello_world_toml/win64.toml | 8 -------- 21 files changed, 114 insertions(+), 113 deletions(-) create mode 100644 MailMap create mode 100644 example/example_01_hello_world/hello_world.cc create mode 100644 example/example_01_hello_world/posix.json create mode 100644 example/example_01_hello_world/win64.json create mode 100644 example/example_02_libnebuild/README.md create mode 100644 example/example_02_libnebuild/libnebuild.cc create mode 100644 example/example_02_libnebuild/posix.json create mode 100644 example/example_02_libnebuild/win64.json create mode 100644 example/example_03_hello_world_toml/hello_world.cc create mode 100644 example/example_03_hello_world_toml/posix.toml create mode 100644 example/example_03_hello_world_toml/win64.toml delete mode 100644 examples/example_01_hello_world/hello_world.cc delete mode 100644 examples/example_01_hello_world/posix.json delete mode 100644 examples/example_01_hello_world/win64.json delete mode 100644 examples/example_02_libnebuild/README.md delete mode 100644 examples/example_02_libnebuild/libnebuild.cc delete mode 100644 examples/example_02_libnebuild/posix.json delete mode 100644 examples/example_02_libnebuild/win64.json delete mode 100644 examples/example_03_hello_world_toml/hello_world.cc delete mode 100644 examples/example_03_hello_world_toml/posix.toml delete mode 100644 examples/example_03_hello_world_toml/win64.toml diff --git a/MailMap b/MailMap new file mode 100644 index 0000000..99f9dd1 --- /dev/null +++ b/MailMap @@ -0,0 +1 @@ +@amlel-el-mahrouss - amlal@nekernel.org \ No newline at end of file diff --git a/example/example_01_hello_world/hello_world.cc b/example/example_01_hello_world/hello_world.cc new file mode 100644 index 0000000..ae47ce8 --- /dev/null +++ b/example/example_01_hello_world/hello_world.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char** argv) { + std::cout << "hello, world!\n"; + return 0; +} diff --git a/example/example_01_hello_world/posix.json b/example/example_01_hello_world/posix.json new file mode 100644 index 0000000..197e4a2 --- /dev/null +++ b/example/example_01_hello_world/posix.json @@ -0,0 +1,10 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["lib"], + "sources_path": ["hello_world.cc"], + "output_name": "./hello_world.elf", + "compiler_flags": ["-fPIC"], + "cpp_macros": ["FOO_MACRO"], + "run_after_build": true +} diff --git a/example/example_01_hello_world/win64.json b/example/example_01_hello_world/win64.json new file mode 100644 index 0000000..4545228 --- /dev/null +++ b/example/example_01_hello_world/win64.json @@ -0,0 +1,10 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["lib"], + "sources_path": ["hello_world.cc"], + "output_name": "./hello_world.elf", + "compiler_flags": ["-fPIC"], + "cpp_macros": ["FOO_MACRO"], + "run_after_build": true +} diff --git a/example/example_02_libnebuild/README.md b/example/example_02_libnebuild/README.md new file mode 100644 index 0000000..21e64be --- /dev/null +++ b/example/example_02_libnebuild/README.md @@ -0,0 +1,7 @@ +# Notice for Deployment. + +In order to use libNeBuild, it shall live on the same directory, +
+or within a directory recognized in the `$LD_LIBRARY_PATH` or `$DYLD_LIBRARY_PATH` variable. + +## Thanks in advance. \ No newline at end of file diff --git a/example/example_02_libnebuild/libnebuild.cc b/example/example_02_libnebuild/libnebuild.cc new file mode 100644 index 0000000..fffb962 --- /dev/null +++ b/example/example_02_libnebuild/libnebuild.cc @@ -0,0 +1,17 @@ +#include + +int main(int argc, char** argv) { +#ifndef _WIN32 + constexpr auto path = "./posix.json"; +#else + constexpr auto path = ".\\win64.json"; +#endif + + NeBuild::JSONManifestBuilder builder; + NeBuild::BuildConfig config; + + config.path_ = path; + config.dry_run_ = false; + + return builder.BuildTarget(config); +} diff --git a/example/example_02_libnebuild/posix.json b/example/example_02_libnebuild/posix.json new file mode 100644 index 0000000..d7ef767 --- /dev/null +++ b/example/example_02_libnebuild/posix.json @@ -0,0 +1,20 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": [ + "../../include", + "../../vendor" + ], + "sources_path": [ + "libnebuild.cc" + ], + "output_name": "./libnebuild.elf", + "compiler_flags": [ + "-L/usr/lib", + "-lNeBuildKit" + ], + "cpp_macros": [ + "FOO_MACRO" + ], + "run_after_build": true +} \ No newline at end of file diff --git a/example/example_02_libnebuild/win64.json b/example/example_02_libnebuild/win64.json new file mode 100644 index 0000000..094208b --- /dev/null +++ b/example/example_02_libnebuild/win64.json @@ -0,0 +1,19 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": [ + "../../include", + "../../vendor" + ], + "sources_path": [ + "libbtb.cc" + ], + "output_name": "./libbtb.exe", + "compiler_flags": [ + "-lNeBuild" + ], + "cpp_macros": [ + "FOO_MACRO" + ], + "run_after_build": true +} \ No newline at end of file diff --git a/example/example_03_hello_world_toml/hello_world.cc b/example/example_03_hello_world_toml/hello_world.cc new file mode 100644 index 0000000..ae47ce8 --- /dev/null +++ b/example/example_03_hello_world_toml/hello_world.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char** argv) { + std::cout << "hello, world!\n"; + return 0; +} diff --git a/example/example_03_hello_world_toml/posix.toml b/example/example_03_hello_world_toml/posix.toml new file mode 100644 index 0000000..a384ddb --- /dev/null +++ b/example/example_03_hello_world_toml/posix.toml @@ -0,0 +1,8 @@ +compiler_path = "clang++" +compiler_std = "c++20" +headers_path = [ "lib" ] +sources_path = [ "hello_world.cc" ] +output_name = "./hello_world.elf" +compiler_flags = [ "-fPIC" ] +cpp_macros = [ "FOO_MACRO" ] +run_after_build = true diff --git a/example/example_03_hello_world_toml/win64.toml b/example/example_03_hello_world_toml/win64.toml new file mode 100644 index 0000000..6f30476 --- /dev/null +++ b/example/example_03_hello_world_toml/win64.toml @@ -0,0 +1,8 @@ +compiler_path = "x86_64-w64-mingw32-g++" +compiler_std = "c++20" +headers_path = [ "lib" ] +sources_path = [ "hello_world.cc" ] +output_name = "./hello_world.elf" +compiler_flags = [ "-fPIC" ] +cpp_macros = [ "FOO_MACRO" ] +run_after_build = true diff --git a/examples/example_01_hello_world/hello_world.cc b/examples/example_01_hello_world/hello_world.cc deleted file mode 100644 index ae47ce8..0000000 --- a/examples/example_01_hello_world/hello_world.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main(int argc, char** argv) { - std::cout << "hello, world!\n"; - return 0; -} diff --git a/examples/example_01_hello_world/posix.json b/examples/example_01_hello_world/posix.json deleted file mode 100644 index 197e4a2..0000000 --- a/examples/example_01_hello_world/posix.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": ["lib"], - "sources_path": ["hello_world.cc"], - "output_name": "./hello_world.elf", - "compiler_flags": ["-fPIC"], - "cpp_macros": ["FOO_MACRO"], - "run_after_build": true -} diff --git a/examples/example_01_hello_world/win64.json b/examples/example_01_hello_world/win64.json deleted file mode 100644 index 4545228..0000000 --- a/examples/example_01_hello_world/win64.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["lib"], - "sources_path": ["hello_world.cc"], - "output_name": "./hello_world.elf", - "compiler_flags": ["-fPIC"], - "cpp_macros": ["FOO_MACRO"], - "run_after_build": true -} diff --git a/examples/example_02_libnebuild/README.md b/examples/example_02_libnebuild/README.md deleted file mode 100644 index 21e64be..0000000 --- a/examples/example_02_libnebuild/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Notice for Deployment. - -In order to use libNeBuild, it shall live on the same directory, -
-or within a directory recognized in the `$LD_LIBRARY_PATH` or `$DYLD_LIBRARY_PATH` variable. - -## Thanks in advance. \ No newline at end of file diff --git a/examples/example_02_libnebuild/libnebuild.cc b/examples/example_02_libnebuild/libnebuild.cc deleted file mode 100644 index fffb962..0000000 --- a/examples/example_02_libnebuild/libnebuild.cc +++ /dev/null @@ -1,17 +0,0 @@ -#include - -int main(int argc, char** argv) { -#ifndef _WIN32 - constexpr auto path = "./posix.json"; -#else - constexpr auto path = ".\\win64.json"; -#endif - - NeBuild::JSONManifestBuilder builder; - NeBuild::BuildConfig config; - - config.path_ = path; - config.dry_run_ = false; - - return builder.BuildTarget(config); -} diff --git a/examples/example_02_libnebuild/posix.json b/examples/example_02_libnebuild/posix.json deleted file mode 100644 index d7ef767..0000000 --- a/examples/example_02_libnebuild/posix.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": [ - "../../include", - "../../vendor" - ], - "sources_path": [ - "libnebuild.cc" - ], - "output_name": "./libnebuild.elf", - "compiler_flags": [ - "-L/usr/lib", - "-lNeBuildKit" - ], - "cpp_macros": [ - "FOO_MACRO" - ], - "run_after_build": true -} \ No newline at end of file diff --git a/examples/example_02_libnebuild/win64.json b/examples/example_02_libnebuild/win64.json deleted file mode 100644 index 094208b..0000000 --- a/examples/example_02_libnebuild/win64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": [ - "../../include", - "../../vendor" - ], - "sources_path": [ - "libbtb.cc" - ], - "output_name": "./libbtb.exe", - "compiler_flags": [ - "-lNeBuild" - ], - "cpp_macros": [ - "FOO_MACRO" - ], - "run_after_build": true -} \ No newline at end of file diff --git a/examples/example_03_hello_world_toml/hello_world.cc b/examples/example_03_hello_world_toml/hello_world.cc deleted file mode 100644 index ae47ce8..0000000 --- a/examples/example_03_hello_world_toml/hello_world.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -int main(int argc, char** argv) { - std::cout << "hello, world!\n"; - return 0; -} diff --git a/examples/example_03_hello_world_toml/posix.toml b/examples/example_03_hello_world_toml/posix.toml deleted file mode 100644 index a384ddb..0000000 --- a/examples/example_03_hello_world_toml/posix.toml +++ /dev/null @@ -1,8 +0,0 @@ -compiler_path = "clang++" -compiler_std = "c++20" -headers_path = [ "lib" ] -sources_path = [ "hello_world.cc" ] -output_name = "./hello_world.elf" -compiler_flags = [ "-fPIC" ] -cpp_macros = [ "FOO_MACRO" ] -run_after_build = true diff --git a/examples/example_03_hello_world_toml/win64.toml b/examples/example_03_hello_world_toml/win64.toml deleted file mode 100644 index 6f30476..0000000 --- a/examples/example_03_hello_world_toml/win64.toml +++ /dev/null @@ -1,8 +0,0 @@ -compiler_path = "x86_64-w64-mingw32-g++" -compiler_std = "c++20" -headers_path = [ "lib" ] -sources_path = [ "hello_world.cc" ] -output_name = "./hello_world.elf" -compiler_flags = [ "-fPIC" ] -cpp_macros = [ "FOO_MACRO" ] -run_after_build = true -- cgit v1.2.3