To compile your source code in WebAssembly, you need the emscripten sdk. The quickest way to use it is to use their docker image.
You can add and adapt the following command to your makefile :
wasm: docker run --rm -v $(shell pwd):/src emscripten/emsdk emcc $(SOURCES) -o $(NAME).wasm
Tipically, if you include your libft, you can simply add it with lib/libft/*.c.