ソースを参照

Fix Makefile to build WASM examples. (#1906)

* Fix Makefile to build WASM examples.

- Add --preload-file flag before specifying the resource dir
- Add empty resource dir to `shapes/` (otherwise wasm-ld will fail)
- Add wasm outputs to .gitigore

* Delete .gitignore

Co-authored-by: Ray <raysan5@gmail.com>
pull/1909/head
Ryan Roden-Corrent 3年前
committed by GitHub
コミット
e6fe8169c2
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
2個のファイルの変更7行の追加1行の削除
  1. +6
    -0
      .gitignore
  2. +1
    -1
      examples/Makefile

+ 6
- 0
.gitignore ファイルの表示

@ -58,6 +58,12 @@ packages/
*.bc
*.so
# Ignore wasm data in examples/
examples/**/*.wasm
examples/**/*.data
examples/**/*.js
examples/**/*.html
# Ignore files build by xcode
*.mode*v*
*.pbxuser

+ 1
- 1
examples/Makefile ファイルの表示

@ -244,7 +244,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation
# --source-map-base # allow debugging in browser with source map
CFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 $(dir $<)resources@resources
CFLAGS += -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864 -s FORCE_FILESYSTEM=1 --preload-file $(dir $<)resources@resources
# NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
# we can compile same code for ALL platforms with no change required, but, working on bigger

読み込み中…
キャンセル
保存