summaryrefslogtreecommitdiffstats
path: root/gfx/harfbuzz/src/wasm/sample/c/Makefile
blob: 4ee073b645736a32a8b827b71542695e6b8d7e9a (plain)
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
ADD_TABLE = ../../../addTable.py

all: test-fallback.wasm.ttf test-ot.wasm.ttf

%.wasm: %.cc ../../../hb-wasm-api.h
	clang \
		--target=wasm32-unknown-wasi \
		-Wl,--no-entry \
		-fvisibility=hidden \
		-Wl,--allow-undefined \
		-nostdlib \
		-I ../../.. \
		$< \
		-o $@

test-fallback.wasm.ttf: test.ttf shape-fallback.wasm $(ADD_TABLE)
	python $(ADD_TABLE) $< $@ shape-fallback.wasm

test-ot.wasm.ttf: test.ttf shape-ot.wasm $(ADD_TABLE)
	python $(ADD_TABLE) $< $@ shape-ot.wasm

clean:
	$(RM) test-fallback.wasm.ttf test-ot.wasm.ttf shape-fallback.wasm shape-ot.wasm

.PRECIOUS: *.wasm