From 16d62f280f97d47315e9d6a932b7f5a54aa820c3 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 18 Jan 2025 11:10:50 -0500 Subject: [PATCH] Fix Makefile assuming dirs. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0cbde49..b232b06 100644 --- a/Makefile +++ b/Makefile @@ -81,17 +81,18 @@ $(UNITY_OBJ): $(UNITY_C) $(UNITY_H) # Compile test object. $(TEST_OBJ_DIR)/test_%.o: $(TEST_DIR)/test_%.c + @ mkdir -p $(TEST_OBJ_DIR) @ $(PRINT) "$(WHITE_BOLD)Compiling test object $(WHITE)$@$(WHITE_BOLD)...$(RESETCOLOR)" $(CC) $(CFLAGS) -c $< -o $@ # Link final test binary. $(TEST_BUILD_DIR)/test_%.out: $(TEST_OBJ_DIR)/test_%.o $(OBJ_DIR)/%.o $(UNITY_OBJ) + @ mkdir -p $(TEST_BUILD_DIR) @ $(PRINT) "$(WHITE_BOLD)Linking test binary $(WHITE)$@$(WHITE_BOLD)...$(RESETCOLOR)" $(LINK) -o $@ $? $(LDFLAGS) # Run the test files. test: $(TARGET) $(TEST_BIN_FILES) - mkdir -p $(TEST_BUILD_DIR) @ $(PRINT) "$(WHITE_BOLD)Running unit tests...$(RESETCOLOR)" for test in $(TEST_BIN_FILES); do ./$${test}; done @ $(PRINT) "$(WHITE_BOLD)Running validation tests...$(RESETCOLOR)"