Skip to content

Commit 0fba2d0

Browse files
committed
Fix Makefile build submodules on Windows
1 parent 20ced6c commit 0fba2d0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,18 @@ $(BUILD_DIR)/%.o: %.c
135135
test: $(TARGET)
136136
$(SQLITE3) ":memory:" -cmd ".bail on" ".load ./$<" "SELECT ai_version();"
137137

138-
# Build all libraries at once using one CMake call
138+
# Build submodules
139+
ifneq ($(PLATFORM),windows)
140+
BUILD_OPTIONS = -- -j$(CPUS)
141+
endif
139142
build/llama.cpp.stamp:
140143
cmake -B $(BUILD_LLAMA) -DBUILD_SHARED_LIBS=OFF $(LLAMA_OPTIONS) $(LLAMA_DIR)
141-
cmake --build $(BUILD_LLAMA) --config Release -- -j$(CPUS)
144+
cmake --build $(BUILD_LLAMA) --config Release $(BUILD_OPTIONS)
142145
touch $@
143146

144147
build/whisper.cpp.stamp:
145148
cmake -B $(BUILD_WHISPER) -DBUILD_SHARED_LIBS=OFF $(WHISPER_OPTIONS) $(WHISPER_DIR)
146-
cmake --build $(BUILD_WHISPER) --config Release -- -j$(CPUS)
149+
cmake --build $(BUILD_WHISPER) --config Release $(BUILD_OPTIONS)
147150
touch $@
148151

149152
$(LLAMA_LIBS): build/llama.cpp.stamp

0 commit comments

Comments
 (0)