summaryrefslogtreecommitdiffhomepage
path: root/webassembly/Makefile
blob: eeaa35799f7b03cb87a9755dc03bdfb6ba36d5f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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