]>
git.proxmox.com Git - wasi-libc.git/blob - Makefile
1 # These variables are specifically meant to be overridable via
2 # the make command-line.
5 WASM_TARGET_FLAGS
= --target
=wasm32
8 # These variables describe the locations of various files and
9 # directories in the source tree.
11 BASICS_INC
= basics
/include
12 BASICS_LIBC_DIR
= $(BASICS_DIR
)/libc
13 BASICS_LIBC_SOURCES
= $(BASICS_LIBC_DIR
)/string.c
18 mkdir
-p
"$(SYSROOT)/usr"
21 # Install the include files.
23 cp
-r
"$(BASICS_INC)" "$(SYSROOT)/usr"
26 # Build the C startup files.
29 "$(WASM_CC)" $(WASM_CFLAGS
) $(WASM_TARGET_FLAGS
) --sysroot
="$(SYSROOT)" -c
$(BASICS_LIBC_DIR
)/crt
*.s
30 mkdir
-p
"$(SYSROOT)/lib"
31 mv
*.o
"$(SYSROOT)/lib"
34 # Compile and install the libc-subset source files.
37 "$(WASM_CC)" $(WASM_CFLAGS
) $(WASM_TARGET_FLAGS
) --sysroot
="$(SYSROOT)" -c
$(BASICS_LIBC_SOURCES
)
38 mkdir
-p
"$(SYSROOT)/lib"
39 $(AR
) crs
"$(SYSROOT)/lib/libc.a" *.o