Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit b6f7715

Browse files
committed
refactor: build-deps
1 parent 690a94f commit b6f7715

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

cortex-cpp/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ all:
1414
# Build the Cortex engine
1515
build:
1616
ifeq ($(OS),Windows_NT)
17-
@powershell -Command "cmake -S ./nitro_deps -B ./build_deps/nitro_deps;"
18-
@powershell -Command "cmake --build ./build_deps/nitro_deps --config Release -j4;"
17+
@powershell -Command "cmake -S ./cortex-cpp-deps -B ./build-deps/cortex-cpp-deps;"
18+
@powershell -Command "cmake --build ./build-deps/cortex-cpp-deps --config Release -j4;"
1919
@powershell -Command "mkdir -p build; cd build; cmake .. $(CMAKE_EXTRA_FLAGS); cmake --build . --config Release -j4;"
2020
else ifeq ($(shell uname -s),Linux)
2121
@./install_deps.sh;
@@ -31,9 +31,9 @@ endif
3131

3232
package:
3333
ifeq ($(OS),Windows_NT)
34-
@powershell -Command "mkdir -p cortex-cpp\engines\cortex.llamacpp\; cp build\engines\cortex.llamacpp\engine.dll cortex\engines\cortex.llamacpp\;"
35-
@powershell -Command "cp build\Release\nitro.exe .\cortex-cpp\;"
36-
@powershell -Command "cp build_deps\_install\bin\zlib.dll .\cortex-cpp\;"
34+
@powershell -Command "mkdir -p cortex-cpp\engines\cortex.llamacpp\; cp build\engines\cortex.llamacpp\engine.dll cortex-cpp\engines\cortex.llamacpp\;"
35+
@powershell -Command "cp build\Release\cortex-cpp.exe .\cortex-cpp\;"
36+
@powershell -Command "cp build-deps\_install\bin\zlib.dll .\cortex-cpp\;"
3737
@powershell -Command "cp ..\.github\patches\windows\msvcp140.dll .\cortex-cpp\;"
3838
@powershell -Command "cp ..\.github\patches\windows\vcruntime140_1.dll .\cortex-cpp\;"
3939
@powershell -Command "cp ..\.github\patches\windows\vcruntime140.dll .\cortex-cpp\;"

cortex-cpp/main.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
#include "utils/cortex_utils.h"
2-
#include <climits> // for PATH_MAX
31
#include <drogon/HttpAppFramework.h>
42
#include <drogon/drogon.h>
3+
#include <climits> // for PATH_MAX
54
#include <iostream>
5+
#include "utils/cortex_utils.h"
66

77
#if defined(__APPLE__) && defined(__MACH__)
8-
#include <libgen.h> // for dirname()
8+
#include <libgen.h> // for dirname()
99
#include <mach-o/dyld.h>
1010
#elif defined(__linux__)
11-
#include <libgen.h> // for dirname()
12-
#include <unistd.h> // for readlink()
11+
#include <libgen.h> // for dirname()
12+
#include <unistd.h> // for readlink()
1313
#elif defined(_WIN32)
1414
#include <windows.h>
1515
#undef max
1616
#else
1717
#error "Unsupported platform!"
1818
#endif
1919

20-
int main(int argc, char *argv[]) {
20+
int main(int argc, char* argv[]) {
2121
int thread_num = 1;
2222
std::string host = "127.0.0.1";
2323
int port = 3928;
@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
3535

3636
// Check for port argument
3737
if (argc > 3) {
38-
port = std::atoi(argv[3]); // Convert string argument to int
38+
port = std::atoi(argv[3]); // Convert string argument to int
3939
}
4040

4141
// Uploads folder path
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
4545

4646
int logical_cores = std::thread::hardware_concurrency();
4747
int drogon_thread_num = std::max(thread_num, logical_cores);
48-
cortex_utils::nitro_logo();
48+
// cortex_utils::nitro_logo();
4949
#ifdef CORTEX_CPP_VERSION
5050
LOG_INFO << "cortex-cpp version: " << CORTEX_CPP_VERSION;
5151
#else

0 commit comments

Comments
 (0)