-
Notifications
You must be signed in to change notification settings - Fork 160
/
Makefile
25 lines (15 loc) · 934 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This file is part of ICU4X. For terms of use, please see the file
# called LICENSE at the top level of the ICU4X source tree
# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
.DEFAULT_GOAL := test
.PHONY: build
ALL_HEADERS := $(wildcard ../../include/*.hpp) $(wildcard ../../../capi/include/*.h)
ALL_RUST := $(wildcard ../../../capi//src/*.rs)
$(ALL_RUST):
$(ALL_HEADERS):
../../../../target/wasm32-unknown-unknown/debug/libicu_capi.a: $(ALL_RUST)
cargo +nightly build -p icu_capi --target wasm32-unknown-unknown --features wasm_embedding
# Currently this doesn't run successfully, however it's the status quo of compiling ICU4X in C++ to WASM
main.html: ../../../../target/wasm32-unknown-unknown/debug/libicu_capi.a $(ALL_HEADERS) test.cpp
emcc -std=c++17 test.cpp ../../../../target/wasm32-unknown-unknown/debug/libicu_capi.a -ldl -lpthread -lm -g -o main.html --emrun -sWASM=1
build: main.html