Basic arithmetic and jump labels
This commit is contained in:
29
makefile
Normal file
29
makefile
Normal 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}
|
||||
Reference in New Issue
Block a user