Skip to content

Commit

Permalink
use "LDLIBS" instead of "LDFLAGS"
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexicon226 committed Jun 3, 2024
1 parent 34d8b44 commit 42b1de5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions wasm2c/examples/callback/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Use implicit rules for compiling C files.
CFLAGS=-I../..
LDFLAGS=-lm
LDLIBS=-lm

all: callback

clean:
rm -rf callback callback.wasm callback.c callback.h *.o

callback: main.o callback.o ../../wasm-rt-impl.o ../../wasm-rt-mem-impl.o
$(CC) -o $@ $^ $(LDFLAGS)

callback.wasm: callback.wat ../../../bin/wat2wasm
../../../bin/wat2wasm --debug-names $< -o $@
Expand Down
3 changes: 1 addition & 2 deletions wasm2c/examples/fac/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Use implicit rules for compiling C files.
CFLAGS=-I../..
LDFLAGS=-lm
LDLIBS=-lm

all: fac

clean:
rm -rf fac fac.wasm fac.c *.o

fac: main.o fac.o ../../wasm-rt-impl.o
$(CC) -o $@ $^ $(LDFLAGS)

fac.wasm: fac.wat ../../../bin/wat2wasm
../../../bin/wat2wasm $< -o $@
Expand Down
Binary file removed wasm2c/examples/fac/fac.wasm
Binary file not shown.
3 changes: 1 addition & 2 deletions wasm2c/examples/rot13/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Use implicit rules for compiling C files.
CFLAGS=-I../..
LDFLAGS=-lm
LDLIBS=-lm

all: rot13

clean:
rm -rf rot13 rot13.wasm rot13.c rot13.h *.o

rot13: main.o rot13.o ../../wasm-rt-impl.o ../../wasm-rt-mem-impl.o
$(CC) -o $@ $^ $(LDFLAGS)

main.o: rot13.h

Expand Down
3 changes: 1 addition & 2 deletions wasm2c/examples/threads/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#SANITIZERS=-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all
CFLAGS=-I../.. -g -O2 -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-array-bounds -Wno-ignored-optimization-argument -Wno-tautological-constant-out-of-range-compare -Wno-infinite-recursion -fno-optimize-sibling-calls -frounding-math -fsignaling-nans ${SANITIZERS} -pthread
LDFLAGS=${SANITIZERS} -pthread -lm
LDLIBS=${SANITIZERS} -pthread -lm

all: threads

clean:
rm -rf threads sample.wasm sample.c sample.h *.o ../../*.o

threads: threads.o sample.o ../../wasm-rt-impl.o ../../wasm-rt-exceptions-impl.o
$(CC) -o $@ $^ $(LDFLAGS)

sample.wasm: sample.wat ../../../bin/wat2wasm
../../../bin/wat2wasm --debug-names $< -o $@
Expand Down

0 comments on commit 42b1de5

Please sign in to comment.