@@ -48,32 +48,6 @@ define macos_build
4848 cp $(BUILD_PATH ) /ggml/src/libggml.dylib $(RUNTIME_DIR ) /macos-$(ARCH )$(2 ) /
4949endef
5050
51- define windows_build
52- VSWHERE := $(shell dirname $(shell which vswhere.exe 2>/dev/null) )
53- VSINSTALL_PATH := $(shell $(VSWHERE ) /vswhere.exe -products * -requires Microsoft.Component.MSBuild -property installationPath -latest)
54- echo $(VSINSTALL_PATH )
55- # Fallback MSBuild paths
56- MSBUILD_CANDIDATES := \
57- "$(MSBUILD_PATH ) /MSBuild/Current/Bin/MSBuild.exe" \
58- "$(MSBUILD_PATH ) /MSBuild/15.0/Bin/MSBuild.exe" \
59- "/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" \
60- "/c/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe"
61-
62- # Find first existing MSBuild
63- MSBUILD := $(firstword $(wildcard $(MSBUILD_CANDIDATES ) ) )
64- echo $(MSBUILD )
65- $(eval ARCH := $(1 ) )
66- $(eval BUILD_PATH := $(BUILD_DIR ) /windows-$(ARCH )$(2 ) )
67- $(eval EXTRA_FLAGS := $(3 ) )
68- rm -rf "$(BUILD_PATH ) "
69- mkdir -p "$(BUILD_PATH ) "
70- $(CMAKE ) -S $(WHISPER_CPP_DIR ) -B $(BUILD_PATH ) -A $(ARCH ) $(CMAKE_COMMON_PARAMS ) $(EXTRA_FLAGS )
71- cd "$(BUILD_PATH ) " && "$(MSBUILD ) " ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64
72- mkdir -p "$(RUNTIME_DIR ) /windows-$(TARGET ) "
73- cp "$(BUILD_PATH ) /src/Release/whisper.dll" "$(RUNTIME_DIR ) /windows-$(TARGET ) /"
74- cp "$(BUILD_PATH ) /ggml/src/Release/ggml.dll" "$(RUNTIME_DIR ) /windows-$(TARGET ) /"
75- endef
76-
7751# Linux build targets
7852.PHONY : linux linux_cuda linux_openvino
7953linux : $(addprefix linux_,$(LINUX_ARCHS ) )
@@ -109,18 +83,6 @@ macos_coreml: $(addprefix macos_coreml_,$(MACOS_ARCHS))
10983macos_coreml_% :
11084 $(call macos_build,$* ,_coreml,$(AVX_FLAGS ) -DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON)
11185
112- # Windows build targets
113- .PHONY : windows
114- windows : $(addprefix windows_,$(WINDOWS_ARCHS ) )
115- windows_% :
116- $(call windows_build,$* ,,$(AVX_FLAGS ) )
117-
118- # Windows CUDA builds
119- windows_cuda : $(addprefix windows_cuda_,$(WINDOWS_ARCHS ) )
120- windows_cuda_% :
121- $(eval ARCH := $(subst windows_cuda_,,$@ ) )
122- $(call windows_build,$(ARCH ) ,_cuda,$(AVX_FLAGS ) -DGGML_CUDA=ON)
123-
12486# Clean build artifacts
12587.PHONY : clean
12688clean :
0 commit comments