Cross compile windows

pull/121/head
jafri 3 years ago
parent 2c281d190b
commit 94b2d7f74b

@ -1,6 +1,6 @@
UNAME_S := $(shell uname -s)
UNAME_P := $(shell uname -p)
UNAME_M := $(shell uname -m)
UNAME_S=${UNAME_S:-shell uname -s}
UNAME_P=${UNAME_P:-shell uname -p}
UNAME_M=${UNAME_M:-shell uname -m}
# Mac OS + Arm can report x86_64
# ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
@ -78,13 +78,13 @@ main: examples/main/main.cpp ggml.o whisper.o
./main -h
ggml.o: ggml.c ggml.h
$(CC) $(CFLAGS) -c ggml.c
$(CC) $(CFLAGS) -c ggml.c -o ggml.o
whisper.o: whisper.cpp whisper.h
$(CXX) $(CXXFLAGS) -c whisper.cpp
$(CXX) $(CXXFLAGS) -c whisper.cpp -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
clean:
rm -f *.o main stream bench libwhisper.a

@ -14,7 +14,7 @@
#include <stdint.h>
#include <stdio.h>
#if defined _MSC_VER
#if defined _MSC_VER || defined(__MINGW32__)
#include <Windows.h>
typedef volatile LONG atomic_int;
@ -193,7 +193,7 @@ static ggml_fp16_t table_exp_f16[1 << 16];
// timing
//
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__MINGW32__)
static int64_t timer_freq;
void ggml_time_init(void) {
LARGE_INTEGER frequency;

Loading…
Cancel
Save