aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 33bf25d..b20c925 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ OBJS := $(BUILD_DIR)/parser.tab.o $(BUILD_DIR)/lex.yy.o $(BUILD_DIR)/driver
TARGET := $(BUILD_DIR)/imp
-.PHONY: all clean
+.PHONY: all clean run
all: $(TARGET)
@@ -46,6 +46,9 @@ $(BUILD_DIR)/driver.o: $(DRIVER_C) $(PARSER_H) $(AST_H) | $(BUILD_DIR)
$(BUILD_DIR)/ast.o: $(AST_C) $(AST_H) | $(BUILD_DIR)
$(CC) $(CFLAGS) -c $(AST_C) -o $@
+run: $(TARGET)
+ ./$(TARGET) example.imp
+
clean:
rm -rf $(BUILD_DIR)