summaryrefslogtreecommitdiff
path: root/Makefile
blob: fa6909a6af20440c686802121f8e8adc80b2805a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 $@ $^