@@ -30,6 +30,9 @@ ifeq ($(DETECTED_OS),macOS)
3030 -DGGML_NATIVE=OFF \
3131 -DGGML_OPENMP=OFF \
3232 -DLLAMA_CURL=OFF \
33+ -DLLAMA_BUILD_COMMON=ON \
34+ -DLLAMA_BUILD_SERVER=ON \
35+ -DLLAMA_BUILD_TOOLS=ON \
3336 -GNinja \
3437 -S $(NATIVE_DIR)
3538 @echo "Building..."
@@ -43,6 +46,9 @@ ifeq ($(DETECTED_OS),macOS)
4346 rm -rf $(INSTALL_DIR)/lib/cmake
4447 rm -rf $(INSTALL_DIR)/lib/pkgconfig
4548 rm -rf $(INSTALL_DIR)/include
49+ @echo "Fixing rpath..."
50+ install_name_tool -delete_rpath "$(CURDIR)/$(BUILD_DIR)/bin" $(INSTALL_DIR)/bin/com.docker.llama-server
51+ install_name_tool -add_rpath "@executable_path/../lib" $(INSTALL_DIR)/bin/com.docker.llama-server
4652 @echo "Build complete! Binaries are in $(INSTALL_DIR)"
4753else ifeq ($(DETECTED_OS),Linux)
4854 @echo "Linux build not implemented yet"
@@ -80,16 +86,16 @@ clean:
8086 rm -rf $(INSTALL_DIR )
8187
8288build-dir :
83- @echo " $( shell pwd ) /$( BUILD_DIR) "
89+ @echo " $( CURDIR ) /$( BUILD_DIR) "
8490
8591install-dir :
86- @echo " $( shell pwd ) /$( INSTALL_DIR) "
92+ @echo " $( CURDIR ) /$( INSTALL_DIR) "
8793
8894help :
8995 @echo " Available targets:"
90- @echo " build - Build llama.cpp (macOS only for now)"
91- @echo " install-deps - Install build dependencies"
92- @echo " build-dir - Print build directory path"
93- @echo " install-dir - Print install directory path"
94- @echo " clean - Clean build artifacts"
95- @echo " help - Show this help"
96+ @echo " build - Build llama.cpp (macOS only for now)"
97+ @echo " install-deps - Install build dependencies"
98+ @echo " build-dir - Print build directory path"
99+ @echo " install-dir - Print install directory path"
100+ @echo " clean - Clean build artifacts"
101+ @echo " help - Show this help"
0 commit comments