-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile-tmpl
51 lines (44 loc) · 1.42 KB
/
Makefile-tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
default: build-submodule
.PHONY:
update-submodule:
# create a clean (maybe updated) copy of whisper.cpp
rsync ../../ggml.c Sources/whisper/
rsync ../../ggml-alloc.c Sources/whisper/
rsync ../../ggml-alloc.h Sources/whisper/
rsync ../../ggml-backend.c Sources/whisper/
rsync ../../ggml-backend.h Sources/whisper/
rsync ../../ggml-backend-impl.h Sources/whisper/
rsync ../../ggml-common.h Sources/whisper/
rsync ../../ggml-impl.h Sources/whisper/
rsync ../../ggml-metal.h Sources/whisper/
rsync ../../ggml-metal.m Sources/whisper/
rsync ../../ggml-metal.metal Sources/whisper/
rsync ../../ggml-quants.c Sources/whisper/
rsync ../../ggml-quants.h Sources/whisper/
rsync ../../whisper.cpp Sources/whisper/
rsync ../../ggml.h Sources/whisper/include/
rsync ../../whisper.h Sources/whisper/include/
rsync ../../coreml/* Sources/whisper/coreml/
SOURCES := $(shell find Sources/ -print)
.build: $(SOURCES)
swift build
.PHONY:
build-submodule: update-submodule Package.swift .build
touch publish-trigger
.PHONY:
build: Package.swift .build
.PHONY:
test: build
./.build/debug/test-objc
./.build/debug/test-swift
.PHONY:
publish: publish-trigger
@echo " \
\n\
cd /path/to/whisper.cpp/bindings/ios\n\
git commit\n\
git tag @PROJECT_VERSION@\n\
git push origin master --tags\n\
"
clean:
rm -rf .build