aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-29 15:37:28 +0200
committerBad Diode <bd@badd10de.dev>2021-10-29 15:37:28 +0200
commite73a4c16a2269cdb2f5e7d66fb9839e4c44e14de (patch)
treec44721b005b7a0623e7acc7103ca8e21a25ff422 /Makefile
parentfcc131afdd029c606ea39f3557bc3d33a075b1de (diff)
downloadbdl-e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de.tar.gz
bdl-e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de.zip
Prepare third compiler implementation
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile13
1 files changed, 5 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 2aed0fb..b1d8597 100755
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
2.SUFFIXES: 2.SUFFIXES:
3 3
4# Source code location and files to watch for changes. 4# Source code location and files to watch for changes.
5SRC_DIR := src/bytecode 5SRC_DIR := src
6BUILD_DIR := build 6BUILD_DIR := build
7SRC_MAIN := $(SRC_DIR)/main.c 7SRC_MAIN := $(SRC_DIR)/main.c
8WATCH_SRC := $(shell find $(SRC_DIR) -name "*.c" -or -name "*.s" -or -name "*.h") 8WATCH_SRC := $(shell find $(SRC_DIR) -name "*.c" -or -name "*.s" -or -name "*.h")
@@ -22,7 +22,7 @@ LDLIBS :=
22RELEASE_CFLAGS := -DNDEBUG -O2 -static 22RELEASE_CFLAGS := -DNDEBUG -O2 -static
23DEBUG_CFLAGS := -DDEBUG -O0 -g 23DEBUG_CFLAGS := -DDEBUG -O0 -g
24 24
25.PHONY: build tests run clean 25.PHONY: build tests clean
26 26
27# Setup debug/release builds. 27# Setup debug/release builds.
28# make clean && make <target> DEBUG=0 28# make clean && make <target> DEBUG=0
@@ -45,15 +45,12 @@ $(BIN): $(SRC_MAIN) $(WATCH_SRC) $(BUILD_DIR)
45$(BUILD_DIR): 45$(BUILD_DIR):
46 mkdir -p $(BUILD_DIR) 46 mkdir -p $(BUILD_DIR)
47 47
48run: $(BIN)
49 ./$(BIN) -i
50
51tests: $(BIN) 48tests: $(BIN)
52 ./$(BIN) examples/arithmetic.bdl | diff tests/arithmetic_expected.txt - 49 # ./$(BIN) examples/arithmetic.bdl | diff tests/arithmetic_expected.txt -
53 ./$(BIN) examples/booleans.bdl | diff tests/booleans_expected.txt - 50 # ./$(BIN) examples/booleans.bdl | diff tests/booleans_expected.txt -
54 # ./$(BIN) examples/lists.bdl | diff tests/lists_expected.txt - 51 # ./$(BIN) examples/lists.bdl | diff tests/lists_expected.txt -
55 # ./$(BIN) examples/types.bdl | diff tests/types_expected.txt - 52 # ./$(BIN) examples/types.bdl | diff tests/types_expected.txt -
56 ./$(BIN) examples/variables.bdl | diff tests/variables_expected.txt - 53 # ./$(BIN) examples/variables.bdl | diff tests/variables_expected.txt -
57 54
58# Remove build directory. 55# Remove build directory.
59clean: 56clean: