To compile your raylib code for web, it's recommended you use an already setup `Makefile` ready for that, `raylib/templates/simple_game/Makefile` could be used for reference, just copy it to your code folder.
To compile your raylib code for web, it's recommended you use an already setup `Makefile` ready for that, [raysan5/raylib-game-template](https://github.com/raysan5/raylib-game-template) could be used for reference.
Before compiling the game, review the copied `Makefile` to make sure emscripten sdk path (`EMSDK_PATH`) and other paths are correctly set. Also review the following `Makefile` variables: `PROJECT_NAME`, `RAYLIB_PATH`, `PROJECT_SOURCE_FILES`.