From a61c702d91d7444ce0bb094ddccc70f72416500b Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 28 Jan 2023 15:07:14 +0100 Subject: Added WebAssembly for C++ implementation of Diff --- webassembly/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 webassembly/Makefile (limited to 'webassembly') diff --git a/webassembly/Makefile b/webassembly/Makefile new file mode 100644 index 0000000..eeaa357 --- /dev/null +++ b/webassembly/Makefile @@ -0,0 +1,20 @@ +TARGET=libwhiteboard.wasm +TARGETJS=$(TARGET:.wasm=.js) + +OBJS=diff.o + +CXX=em++ + +CXXFLAGS=-I/usr/include +LDFLAGS=-s WASM=1 -s LINKABLE=1 -s EXPORT_ALL=1 +default: $(TARGET) + +$(TARGET): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(TARGETJS) + cp $(TARGETJS) $(TARGET) ../html/ + +diff.o: ../diff.cpp + $(CXX) -c $< $(CXXFLAGS) -o $@ + +clean: + -rm -f *.o *.js *.wasm *.html -- cgit v1.2.3