Added feature to run after compiling in Makefile

This commit is contained in:
kilroy
2025-11-28 19:43:53 -05:00
parent b222c27f46
commit 2a7bd4bef7

View File

@@ -29,6 +29,10 @@ $(OBJS): dir
@mkdir -p $(BUILD_DIR)/$(@D) @mkdir -p $(BUILD_DIR)/$(@D)
@$(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ -c $*.c @$(CC) $(CFLAGS) -o $(BUILD_DIR)/$@ -c $*.c
# Compiles and runs
run: dir $(OBJS) $(NAME)
@$(BIN_DIR)/$(NAME)
# Runs CUnit tests # Runs CUnit tests
# test: dir # test: dir
# @$(CC) $(CFLAGS) -lcunit -o $(BIN_DIR)/$(NAME)_test $(TESTS_DIR)/*.c # @$(CC) $(CFLAGS) -lcunit -o $(BIN_DIR)/$(NAME)_test $(TESTS_DIR)/*.c