diff options
author | Bad Diode <bd@badd10de.dev> | 2021-10-29 15:37:28 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-10-29 15:37:28 +0200 |
commit | e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de (patch) | |
tree | c44721b005b7a0623e7acc7103ca8e21a25ff422 /Makefile | |
parent | fcc131afdd029c606ea39f3557bc3d33a075b1de (diff) | |
download | bdl-e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de.tar.gz bdl-e73a4c16a2269cdb2f5e7d66fb9839e4c44e14de.zip |
Prepare third compiler implementation
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -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. |
5 | SRC_DIR := src/bytecode | 5 | SRC_DIR := src |
6 | BUILD_DIR := build | 6 | BUILD_DIR := build |
7 | SRC_MAIN := $(SRC_DIR)/main.c | 7 | SRC_MAIN := $(SRC_DIR)/main.c |
8 | WATCH_SRC := $(shell find $(SRC_DIR) -name "*.c" -or -name "*.s" -or -name "*.h") | 8 | WATCH_SRC := $(shell find $(SRC_DIR) -name "*.c" -or -name "*.s" -or -name "*.h") |
@@ -22,7 +22,7 @@ LDLIBS := | |||
22 | RELEASE_CFLAGS := -DNDEBUG -O2 -static | 22 | RELEASE_CFLAGS := -DNDEBUG -O2 -static |
23 | DEBUG_CFLAGS := -DDEBUG -O0 -g | 23 | DEBUG_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 | ||
48 | run: $(BIN) | ||
49 | ./$(BIN) -i | ||
50 | |||
51 | tests: $(BIN) | 48 | tests: $(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. |
59 | clean: | 56 | clean: |