|
|
@ -1,22 +1,15 @@
|
|
|
|
ifdef UNAME_S
|
|
|
|
ifndef UNAME_S
|
|
|
|
UNAME_S := $(UNAME_S)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ifdef UNAME_P
|
|
|
|
ifndef UNAME_P
|
|
|
|
UNAME_P := $(UNAME_P)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
UNAME_P := $(shell uname -p)
|
|
|
|
UNAME_P := $(shell uname -p)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ifdef UNAME_M
|
|
|
|
ifndef UNAME_M
|
|
|
|
UNAME_M := $(UNAME_M)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
UNAME_M := $(shell uname -m)
|
|
|
|
UNAME_M := $(shell uname -m)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Mac OS + Arm can report x86_64
|
|
|
|
# Mac OS + Arm can report x86_64
|
|
|
|
# ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
|
|
|
|
# ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
@ -93,7 +86,7 @@ main: examples/main/main.cpp ggml.o whisper.o
|
|
|
|
./main -h
|
|
|
|
./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
|
|
|
|
|
|
|
|
|
|
|
|
whisper.o: whisper.cpp whisper.h
|
|
|
|
whisper.o: whisper.cpp whisper.h
|
|
|
|
$(CXX) $(CXXFLAGS) -c whisper.cpp -o whisper.o
|
|
|
|
$(CXX) $(CXXFLAGS) -c whisper.cpp -o whisper.o
|
|
|
|