aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-08 00:57:18 -0800
committerChristian C <cc@localhost>2025-03-08 00:57:18 -0800
commitca175dffc05aa1b00641647272aa7ab3d1201565 (patch)
treec6665b923e2ead8bb41e6f8ef8261cc7dbc24138
parent688c2454c55acf8720f2403ae574318f1941732f (diff)
Test minor restructure
-rw-r--r--Makefile10
-rw-r--r--test/test.c (renamed from src/test/test.c)0
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 01e8fb4..5420b74 100644
--- a/Makefile
+++ b/Makefile
@@ -77,11 +77,15 @@ LDFLAGS+=$(shell $(PKGCONF) --libs $(PKGS))
default: clean build
-.PHONY: clean build run
+.PHONY: clean build test run
build: $(PROGS)
-$(BUILD_DIR)$(PROG_DIR)%: $(SRC_OBJ_DIR)%.o $(LIB_OBJS) $(TEST_OBJS)
+$(BUILD_DIR)$(PROG_DIR)%: $(SRC_OBJ_DIR)%.o $(LIB_OBJS)
+ @echo LD --\> $@
+ @gcc -o $@ $(LDFLAGS) $^
+
+build/test: $(TEST_OBJS) $(LIB_OBJS)
@echo LD --\> $@
@gcc -o $@ $(LDFLAGS) $^
@@ -97,6 +101,8 @@ $(TEST_OBJ_DIR)%.o: $(TEST_DIR)%.c
@echo CC $< --\> $@
@gcc -o $@ $(CFLAGS) -c $<
+test: build/test
+
clean:
@echo Cleaning build files...
@-rm -rf $(OBJ_DIR) $(BUILD_DIR)
diff --git a/src/test/test.c b/test/test.c
index 40e2d6f..40e2d6f 100644
--- a/src/test/test.c
+++ b/test/test.c