Added feature to run after compiling in Makefile
This commit is contained in:
4
Makefile
4
Makefile
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user