diff options
| author | Wolf Vollprecht | 2019-02-10 16:29:25 +0100 |
|---|---|---|
| committer | Damien George | 2019-03-13 23:52:15 +1100 |
| commit | ea2fcdd338b9a9a545c119a7d86de1b8caf77314 (patch) | |
| tree | 7ba7f08ab092478987f223c524e148c942f0c4d2 /ports/javascript/Makefile | |
| parent | 7d675f3a17b435c4dc7880ff597ab81274721ae9 (diff) | |
javascript: Fix Emscripten async load, and to compile with modern clang.
Diffstat (limited to 'ports/javascript/Makefile')
| -rw-r--r-- | ports/javascript/Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ports/javascript/Makefile b/ports/javascript/Makefile index 3ce698f10..9b0f4d89c 100644 --- a/ports/javascript/Makefile +++ b/ports/javascript/Makefile @@ -14,7 +14,12 @@ INC += -I$(TOP) INC += -I$(BUILD) CPP = clang -E -CFLAGS = -m32 $(INC) -Wall -Werror -std=c99 $(COPT) + +ifdef EMSCRIPTEN + CPP += -isystem $(EMSCRIPTEN)/system/include/libc -cxx-isystem $(EMSCRIPTEN)/system/include/libcxx +endif + +CFLAGS = -m32 -Wall -Werror $(INC) -std=c99 $(COPT) LDFLAGS = -m32 -Wl,-Map=$@.map,--cref -Wl,--gc-sections CFLAGS += -O0 -DNDEBUG @@ -46,8 +51,7 @@ all: $(BUILD)/micropython.js $(BUILD)/micropython.js: $(OBJ) library.js wrapper.js $(ECHO) "LINK $(BUILD)/firmware.js" $(Q)emcc $(LDFLAGS) -o $(BUILD)/firmware.js $(OBJ) $(JSFLAGS) - cat $(BUILD)/firmware.js > $@ - cat wrapper.js >> $@ + cat wrapper.js $(BUILD)/firmware.js > $@ min: $(BUILD)/micropython.js uglifyjs $< -c -o $(BUILD)/micropython.min.js |
