17 lines
436 B
Makefile
17 lines
436 B
Makefile
CFLAGS = -Wall -Wextra -pedantic -std=c23 \
|
|
-Wconversion -Wdouble-promotion \
|
|
-Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion \
|
|
-fsanitize=undefined \
|
|
--target=wasm32 -O1 -flto -ffreestanding -fno-builtin -nostdlib
|
|
|
|
math.o: math.c
|
|
clang $(CFLAGS) -c math.c -o math.o
|
|
|
|
beep.wasm: beep.c math.o
|
|
clang $(CFLAGS) \
|
|
-Wl,--no-entry \
|
|
-Wl,--export=beep \
|
|
-Wl,--export=get_samples \
|
|
beep.c math.o \
|
|
-o beep.wasm
|