Skip to content

Commit

Permalink
chore: fix test target paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosNicolau committed Jan 6, 2025
1 parent e6b563d commit 1694dc4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ test: build ## Run test for all libs. To run only the tests of a specific lib ru
done

test_%: build $(TESTS_BUILD_DIR)
@for test in libs/$*/tests/*.c; do \
$(CC) $(CFLAGS) -I$(INCLUDE_BUILD_DIR) -L$(LIB_BUILD_DIR) -l$* -o $(BUILD_DIR)/tests/$$(basename $$test .c) $$test; \
LD_LIBRARY_PATH=$(LIB_BUILD_DIR) $(BUILD_DIR)/tests/$$(basename $$test .c); \
@for test in libs/$*/$(TEST_DIR)/*.c; do \
mkdir -p $(TESTS_BUILD_DIR)/$*; \
$(CC) $(CFLAGS) -I$(INCLUDE_BUILD_DIR) -L$(LIB_BUILD_DIR) -l$* -o $(TESTS_BUILD_DIR)/$*/$$(basename $$test .c) $$test; \
LD_LIBRARY_PATH=$(LIB_BUILD_DIR) $(TESTS_BUILD_DIR)/$*/$$(basename $$test .c); \
done

clean: ## Clean build file
Expand Down

0 comments on commit 1694dc4

Please sign in to comment.