summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fa6909a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+.PHONY: all clean
+
+CC = gcc
+CXX = g++
+
+ifdef DEBUG
+ OPT = -g -O0
+else
+ OPT = -O3
+endif
+
+CFLAGS = $(OPT) -Wall
+CXXFLAGS = $(OPT) -Wall -std=c++11 -Wno-extern-c-compat -I.
+
+all: weerun
+
+clean:
+ rm -f weerun *.o
+
+test: weerun
+ ./weerun -test
+
+#weerun: vm.h weerun.c common.h common.c ir.c weewasm.h illegal.h weerun.hpp weerun_dis.cpp weerun_inst.cpp weerun_parse.cpp weerun_runtime.cpp
+# cc -g -O0 -Wall -c weerun.c common.c ir.c
+# c++ -g -O0 -Wall -std=c++11 -Wno-extern-c-compat -o weerun -I. \
+# weerun.o common.o ir.o \
+# weerun_dis.cpp weerun_inst.cpp weerun_parse.cpp weerun_jit.cpp weerun_runtime.cpp
+#
+weeify: vm.h weeify.c common.h common.c weewasm.h illegal.h
+ cc -o weeify weeify.c common.c
+
+weerun: weerun.o common.o ir.o weerun_dis.o weerun_inst.o weerun_jit.o weerun_parse.o weerun_runtime.o
+ $(CXX) -o $@ $^