From f6665cdd73e2b2931545bac3bd98e380f5438e00 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 3 Mar 2020 19:01:36 +1000 Subject: [PATCH] Move the examples readme into the build folder. --- examples/README.md | 22 ---------------------- examples/build/README.md | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 22 deletions(-) delete mode 100644 examples/README.md create mode 100644 examples/build/README.md diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 04908463..00000000 --- a/examples/README.md +++ /dev/null @@ -1,22 +0,0 @@ -To compile these examples, cd into the "build" directory and run the applicable build script. Executables -will be placed in the "bin" directory. - - cd build - ./ma_build_examples_linux - -Then you can run executables like this: - - ../bin/simple_playback my_sound.wav - -Emscripten ----------- -On Windows, you need to move into the build and run emsdk_env.bat from a command prompt using an absolute -path like "C:\emsdk\emsdk_env.bat". Note that PowerShell doesn't work for me for some reason. Then, run the -relevant batch file: - - ma_build_examples_emscripten.bat - -The output will be placed in the bin folder. If you have output WASM it may not work when running the web -page locally. To test you can run with something like this: - - emrun ../bin/simple_playback_emscripten.html \ No newline at end of file diff --git a/examples/build/README.md b/examples/build/README.md new file mode 100644 index 00000000..7a3aa85d --- /dev/null +++ b/examples/build/README.md @@ -0,0 +1,17 @@ +Examples +-------- +gcc ../simple_playback.c -o bin/simple_playback -ldl -lpthread -lm +gcc ../simple_playback.c -o bin/simple_playback -ldl -lpthread -lm -Wall -Wextra -Wpedantic -std=c89 + +Emscripten +---------- +On Windows, you need to move into the build and run emsdk_env.bat from a command prompt using an absolute +path like "C:\emsdk\emsdk_env.bat". Note that PowerShell doesn't work for me for some reason. Examples: + + emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html + emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html -s WASM=0 -Wall + +If you output WASM it may not work when running the web page locally. To test you can run with something +like this: + + emrun ./bin/simple_playback_emscripten.html \ No newline at end of file