Basic arithmetic and jump labels

This commit is contained in:
2019-11-17 21:02:35 +01:00
commit b84557b3e1
34 changed files with 1350 additions and 0 deletions

29
makefile Normal file
View File

@@ -0,0 +1,29 @@
CC = g++
CFLAGS = -g -std=c++17 -Wall -Iinclude #-Werror
LFLAGS = #-lsfml-graphics -lsfml-window -lsfml-system
CPPS = $(shell find src/ -name '*.cpp')
OBJS = $(patsubst src/%.cpp, build/%.o, ${CPPS})
DEPS = $(patsubst src/%.cpp, build/%.d, ${CPPS})
BINARY = bin/wassembly
.PHONY: all check clean
all: ${BINARY}
check: ${BINARY}
./$< ./bin/example.wasm
clean:
-rm -rf build ./${BINARY}
${BINARY}: ${OBJS}
mkdir -p ${@D}
${CC} ${CFLAGS} $^ ${LFLAGS} -o $@
build/%.o: src/%.cpp
mkdir -p ${@D}
${CC} ${CFLAGS} -MMD -c $< -o $@
-include ${DEPS}