build(test): now the test is using LDFlags

This commit is contained in:
Raphael 2025-12-09 12:35:07 +01:00
parent 42ec5e62e9
commit f667e27396
No known key found for this signature in database

View file

@ -6,7 +6,7 @@
# By: rparodi <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
# Updated: 2025/12/08 14:01:53 by rparodi ### ########.fr #
# Updated: 2025/12/09 12:00:39 by rparodi ### ########.fr #
# #
# **************************************************************************** #
@ -27,7 +27,7 @@ RM = rm -rf
CFLAGS = -Werror -Wextra -Wall
TEST_FILE = test/main.c
INC_DIR = includes
LDFLAGS = -L $(shell pwd)/build/
LDFLAGS = -L./build/ -lasm
CPPFLAGS = $(addprefix -I, $(INC_DIR)) -MMD -MP
# Objects
@ -84,7 +84,7 @@ run: test
test_compile:
@printf '$(GREY) Start $(END)$(GREEN)Testing on $(TEST_OUTPUT)$(END)\n'
@$(CC) $(CFLAGS) $(CPPFLAGS) $(TEST_FILE) -o $(TEST_OUTPUT) ./build/libasm.a
@$(CC) $(CFLAGS) $(CPPFLAGS) $(TEST_FILE) $(LDFLAGS) -o $(TEST_OUTPUT)
@echo ""
@./result