forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwasi.mk
36 lines (32 loc) · 824 Bytes
/
wasi.mk
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
26
27
28
29
30
31
32
33
34
35
36
WASI_SDK=$(HOME)/Downloads/wasi/wasi-sdk-12.0
WASI_SYSROOT=$(HOME)/Downloads/wasi/wasi-sysroot
ifeq (${_INCLUDE_MK_GCC_},)
_INCLUDE_MK_GCC_=1
EXT_EXE=.wasm
EXT_SO=.o
WITH_LIBS=0
EXT_AR=a
CC=$(WASI_SDK)/bin/clang --sysroot=$(WASI_SYSROOT) -DHAVE_PTHREAD=0 -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -DHAVE_PTY=0 -lc-printscan-long-double
AR=$(WASI_SDK)/bin/ar
LINK=
RANLIB=$(WASI_SDK)/bin/ranlib
ONELIB=0
CC_AR=$(AR) q ${LIBAR}
PARTIALLD=$(CC) -nostdlib -Wl,--whole-archive -Wl,--no-entry
PIC_CFLAGS=-fPIC
CFLAGS+=-MD -D__UNIX__=1
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
CFLAGS_OPT3=-O3
CFLAGS_DEBUG=-g
ifeq ($(OSTYPE),auto)
OSTYPE=$(shell uname | tr 'A-Z' 'a-z')
endif
LDFLAGS_LIB=-shared
LDFLAGS_SONAME=-DA_
CC_LIB=${CC} ${LDFLAGS_LIB} -o ${LIBSO}
endif