diff options
-rw-r--r-- | Build/Makefile | 7 | ||||
-rw-r--r-- | NaiveFFT/main.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Build/Makefile b/Build/Makefile index 8b31c12..e19df12 100644 --- a/Build/Makefile +++ b/Build/Makefile @@ -1,12 +1,17 @@ - +EMCC=emcc CC=gcc SOURCEDIR=../NaiveFFT LDFLAGS=-lm +EM_LDFALGS=-s LLD_REPORT_UNDEFINED + make: $(CC) -c $(SOURCEDIR)/main.c -g3 $(CC) main.o -o NaiveFFT $(LDFLAGS) +emcc: + $(EMCC) $(SOURCEDIR)/main.c ../NaiveFFT/fft.c -s WASM=1 -O3 -o index.js $(EM_LDFALGS) -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' + web: darkhttpd ./ --port 12345 diff --git a/NaiveFFT/main.c b/NaiveFFT/main.c index 718e5d0..036bb79 100644 --- a/NaiveFFT/main.c +++ b/NaiveFFT/main.c @@ -42,6 +42,7 @@ int main(int argc, const char * argv[]) { ffti_shuffle_1(data_i, data_q, DATA_SIZE); fft_1(data_i, data_q, DATA_SIZE, 0); + //run dft by default //dft(data_i, data_q, DATA_SIZE,0); printf("after FFT\n"); @@ -83,7 +84,6 @@ int main(int argc, const char * argv[]) { free(d_q); d_q = NULL; } - { time_t timer; char buffer[32]; @@ -94,7 +94,6 @@ int main(int argc, const char * argv[]) { strftime(buffer, 32, "%H:%M:%S", tm_info); puts(buffer); - } return 0; } |