summary refs log blame commit diff stats
path: root/libchatprivacy/src/Makefile
blob: ca3e70eabd848529d9d1751820d31d852b3a194b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                                                                                                                                                    
EMCC=emcc
KOTLINC=kotlinc
WASM2KOTLIN=wasm2kotlin

libchatprivacy.jar: libchatprivacy.kt wasm_rt_impl.kt
	JAVA_OPTS=-Xmx2G $(KOTLINC) -jvm-target 1.8 -nowarn -d libchatprivacy.jar libchatprivacy.kt wasm_rt_impl.kt

libchatprivacy.kt: libchatprivacy.wasm
	$(WASM2KOTLIN) -p libchatprivacy libchatprivacy.wasm -o libchatprivacy.kt

libchatprivacy.wasm: libchatprivacy.o
	$(EMCC) -flto=full -Oz -s ALLOW_TABLE_GROWTH=1 -s ALLOW_MEMORY_GROWTH=1 -s PURE_WASI=1 -L$$(cd ../../libotr/buildenv; pwd)/lib -lotr -lgcrypt -lgpg-error --no-entry -o libchatprivacy.wasm libchatprivacy.o

libchatprivacy.o: libchatprivacy.c libchatprivacy.h
	$(EMCC) -flto=full -Oz -s PURE_WASI=1 -std=c99 -Wall -Wextra -Weverything -pedantic -isystem$$(cd ../../libotr/buildenv; pwd)/include -c -o libchatprivacy.o libchatprivacy.c