Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not prescribe static build of libraries #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/standalone/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ package: waforth

endif
CFLAGS:= -I$(WASMTIME_DIR)/include $(CFLAGS)
LIBS:=$(WASMTIME_DIR)/lib/libwasmtime.a $(LIBS)
LIBS:=-lwasmtime $(LIBS)
LDFLAGS := -L$(WASMTIME_DIR)/lib $(LDFLAGS)
endif

ifeq ($(DEBUG),1)
Expand Down
3 changes: 2 additions & 1 deletion src/standalone/wabt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ endif
WABT_INCLUDE_DIR := $(WABT_DIR)/include
WABT_LIB_DIR := $(WABT_DIR)/lib
CXXFLAGS:= -I$(WABT_INCLUDE_DIR) $(CXXFLAGS)
LIBS:=$(WABT_LIB_DIR)/libwabt.a $(LIBS)
LIBS:=-lwabt $(LIBS)
LDFLAGS := $(LDFLAGS) -L$(WABT_LIB_DIR)

ifeq ($(DEBUG),1)
CXXFLAGS := $(CXXFLAGS) -g
Expand Down
14 changes: 7 additions & 7 deletions src/waforthc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ WABT_DATA_DIR = $(WABT_DIR)/share/wabt
LIBS := -mmacosx-version-min=13.0
else # $(UNAME_S)
GCC_TARGET_MACHINE = $(shell gcc -dumpmachine)
WABT_INCLUDE_DIR ?= /usr/lib/include
WABT_LIB_DIR ?= /usr/lib/$(GCC_TARGET_MACHINE)
WABT_DATA_DIR ?= /usr/share/wabt
WABT_DIR ?= /usr
WABT_INCLUDE_DIR ?= $(WABT_DIR)/include
WABT_LIB_DIR ?= $(WABT_DIR)/lib/$(GCC_TARGET_MACHINE)
WABT_DATA_DIR ?= $(WABT_DIR)/share/wabt
PACKAGE_SUFFIX=x86_64-linux
endif # $(UNAME_S)
package: waforthc
$(TAR) czf waforthc-v$(VERSION)-$(PACKAGE_SUFFIX).tgz waforthc
endif # $(OS)

CXXFLAGS := -DVERSION='"$(VERSION)"' -Wall -std=c++17 -I$(WABT_INCLUDE_DIR) $(CXXFLAGS)
LIBS := \
$(WABT_LIB_DIR)/libwabt.a \
$(LIBS)
LIBS := -lwabt $(LIBS)
LDFLAGS := -L$(WABT_LIB_DIR)

ifeq ($(DEBUG),1)
CXXFLAGS := $(CXXFLAGS) -g
Expand All @@ -67,7 +67,7 @@ OBJECTS := waforthc.o
all: waforthc

waforthc: $(OBJECTS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)

waforthc.o: waforth_core.h waforth_rt.h waforth_wabt_wasm-rt-impl_c.h waforth_wabt_wasm-rt-impl_h.h waforth_wabt_wasm-rt_h.h

Expand Down