diff options
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -22,7 +22,7 @@ LDLIBS := | |||
22 | RELEASE_CFLAGS := -DNDEBUG -O2 | 22 | RELEASE_CFLAGS := -DNDEBUG -O2 |
23 | DEBUG_CFLAGS := -DDEBUG -O2 -g | 23 | DEBUG_CFLAGS := -DDEBUG -O2 -g |
24 | 24 | ||
25 | .PHONY: tools clean run | 25 | .PHONY: build tests run 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 |
@@ -40,14 +40,15 @@ $(BIN): $(SRC_MAIN) $(WATCH_SRC) $(BUILD_DIR) | |||
40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC_MAIN) $(LDLIBS) | 40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(SRC_MAIN) $(LDLIBS) |
41 | 41 | ||
42 | # Create build directory if needed. | 42 | # Create build directory if needed. |
43 | $(BUILD_DIR): tools | 43 | $(BUILD_DIR): |
44 | mkdir -p $(BUILD_DIR) | 44 | mkdir -p $(BUILD_DIR) |
45 | 45 | ||
46 | run: $(BIN) | 46 | run: $(BIN) |
47 | ./$(BIN) -i | 47 | ./$(BIN) -i |
48 | 48 | ||
49 | tests: $(BIN) | 49 | tests: $(BIN) |
50 | ./$(BIN) examples/arithmetic.bdl | diff -q tests/arithmetic_expected.txt - | 50 | ./$(BIN) examples/arithmetic.bdl | diff tests/arithmetic_expected.txt - |
51 | ./$(BIN) examples/booleans.bdl | diff tests/booleans_expected.txt - | ||
51 | 52 | ||
52 | # Remove build directory. | 53 | # Remove build directory. |
53 | clean: | 54 | clean: |