mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-13 17:38:36 +01:00
make : add libwhisper.so target (#144)
This commit is contained in:
parent
a728be9cdb
commit
41b48ab7f1
19
Makefile
19
Makefile
@ -89,13 +89,11 @@ ifneq ($(filter armv8%,$(UNAME_M)),)
|
|||||||
CFLAGS += -mfp16-format=ieee -mno-unaligned-access
|
CFLAGS += -mfp16-format=ieee -mno-unaligned-access
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
default: main
|
||||||
# Build library + main
|
|
||||||
#
|
|
||||||
|
|
||||||
main: examples/main/main.cpp ggml.o whisper.o
|
#
|
||||||
$(CXX) $(CXXFLAGS) examples/main/main.cpp whisper.o ggml.o -o main $(LDFLAGS)
|
# Build library
|
||||||
./main -h
|
#
|
||||||
|
|
||||||
ggml.o: ggml.c ggml.h
|
ggml.o: ggml.c ggml.h
|
||||||
$(CC) $(CFLAGS) -c ggml.c -o ggml.o
|
$(CC) $(CFLAGS) -c ggml.c -o ggml.o
|
||||||
@ -106,8 +104,11 @@ whisper.o: whisper.cpp whisper.h
|
|||||||
libwhisper.a: ggml.o whisper.o
|
libwhisper.a: ggml.o whisper.o
|
||||||
$(AR) rcs libwhisper.a ggml.o whisper.o
|
$(AR) rcs libwhisper.a ggml.o whisper.o
|
||||||
|
|
||||||
|
libwhisper.so: ggml.o whisper.o
|
||||||
|
$(CXX) $(CXXFLAGS) -shared -o libwhisper.so ggml.o whisper.o $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o main stream bench libwhisper.a
|
rm -f *.o main stream bench libwhisper.a libwhisper.so
|
||||||
|
|
||||||
#
|
#
|
||||||
# Examples
|
# Examples
|
||||||
@ -115,6 +116,10 @@ clean:
|
|||||||
|
|
||||||
CC_SDL=`sdl2-config --cflags --libs`
|
CC_SDL=`sdl2-config --cflags --libs`
|
||||||
|
|
||||||
|
main: examples/main/main.cpp ggml.o whisper.o
|
||||||
|
$(CXX) $(CXXFLAGS) examples/main/main.cpp ggml.o whisper.o -o main $(LDFLAGS)
|
||||||
|
./main -h
|
||||||
|
|
||||||
stream: examples/stream/stream.cpp ggml.o whisper.o
|
stream: examples/stream/stream.cpp ggml.o whisper.o
|
||||||
$(CXX) $(CXXFLAGS) examples/stream/stream.cpp ggml.o whisper.o -o stream $(CC_SDL) $(LDFLAGS)
|
$(CXX) $(CXXFLAGS) examples/stream/stream.cpp ggml.o whisper.o -o stream $(CC_SDL) $(LDFLAGS)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user