diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-16 20:00:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-16 20:00:37 +0200 |
| commit | d21a3b2e16b4e5f974dd000e11c868e2021292f0 (patch) | |
| tree | d91d1351193a9f758daa9dad964e40f5a84ece7f /examples | |
| parent | 50c2c9773d5660b1497a1132ffa96a7ab10d9c45 (diff) | |
| parent | d987d62459d59a6d95ffb815d5e6eccd8dbde1dd (diff) | |
Merge pull request #3 from nekernel-org/dev
v0.0.3
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/example_02_libbtb/libbtb.cc | 12 | ||||
| -rw-r--r-- | examples/example_02_libnebuild/README.md (renamed from examples/example_02_libbtb/README.md) | 2 | ||||
| -rw-r--r-- | examples/example_02_libnebuild/libnebuild.cc | 15 | ||||
| -rw-r--r-- | examples/example_02_libnebuild/posix.json (renamed from examples/example_02_libbtb/posix.json) | 8 | ||||
| -rw-r--r-- | examples/example_02_libnebuild/win64.json (renamed from examples/example_02_libbtb/win64.json) | 4 |
5 files changed, 22 insertions, 19 deletions
diff --git a/examples/example_02_libbtb/libbtb.cc b/examples/example_02_libbtb/libbtb.cc deleted file mode 100644 index f3d45b8..0000000 --- a/examples/example_02_libbtb/libbtb.cc +++ /dev/null @@ -1,12 +0,0 @@ -#include <BTBKit/JSONManifestBuilder.h> - -#ifndef _WIN32 -static auto kPath = "./posix.json"; -#else -static auto kPath = ".\win64.json"; -#endif - -int main(int argc, char** argv) { - auto builder = new BTB::JSONManifestBuilder(); - return builder->buildTarget(strlen(kPath), kPath); -} diff --git a/examples/example_02_libbtb/README.md b/examples/example_02_libnebuild/README.md index 26ccb72..21e64be 100644 --- a/examples/example_02_libbtb/README.md +++ b/examples/example_02_libnebuild/README.md @@ -1,6 +1,6 @@ # Notice for Deployment. -In order to use libBTB, it shall live on the same directory, +In order to use libNeBuild, it shall live on the same directory, <br/> or within a directory recognized in the `$LD_LIBRARY_PATH` or `$DYLD_LIBRARY_PATH` variable. diff --git a/examples/example_02_libnebuild/libnebuild.cc b/examples/example_02_libnebuild/libnebuild.cc new file mode 100644 index 0000000..5540503 --- /dev/null +++ b/examples/example_02_libnebuild/libnebuild.cc @@ -0,0 +1,15 @@ +#include <BuildKit/JSONManifestBuilder.h> +#include <cstdlib> + +#ifndef _WIN32 +static auto kPath = "./posix.json"; +#else +static auto kPath = ".\\win64.json"; +#endif + +int main(int argc, char** argv) { + auto builder = new NeBuild::JSONManifestBuilder(); + if (!builder) return EXIT_FAILURE; + + return builder->BuildTarget(kPath); +} diff --git a/examples/example_02_libbtb/posix.json b/examples/example_02_libnebuild/posix.json index 871712e..989e712 100644 --- a/examples/example_02_libbtb/posix.json +++ b/examples/example_02_libnebuild/posix.json @@ -2,16 +2,16 @@ "compiler_path": "g++", "compiler_std": "c++20", "headers_path": [ - "../../", + "../../dev", "../../vendor" ], "sources_path": [ - "libbtb.cc" + "libnebuild.cc" ], - "output_name": "libbtb.elf", + "output_name": "libnebuild.elf", "compiler_flags": [ "-L/usr/local/lib", - "-lBTB" + "-lNeBuild" ], "cpp_macros": [ "FOO_MACRO" diff --git a/examples/example_02_libbtb/win64.json b/examples/example_02_libnebuild/win64.json index 658ee0f..3118a36 100644 --- a/examples/example_02_libbtb/win64.json +++ b/examples/example_02_libnebuild/win64.json @@ -2,7 +2,7 @@ "compiler_path": "x86_64-w64-mingw32-g++", "compiler_std": "c++20", "headers_path": [ - "../../", + "../../dev", "../../vendor" ], "sources_path": [ @@ -10,7 +10,7 @@ ], "output_name": "libbtb.exe", "compiler_flags": [ - "-lBTB" + "-lNeBuild" ], "cpp_macros": [ "FOO_MACRO" |
