From 89428f6c6ab2c1cea735258b4257f15f71648d0f Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Thu, 6 Apr 2023 14:13:07 +0200 Subject: Refactor makefile --- tests/unit/Makefile | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'tests') diff --git a/tests/unit/Makefile b/tests/unit/Makefile index aeaf6ae..fac3f68 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile @@ -38,22 +38,30 @@ CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH) -DTMP_DATA_SIZE=1000 test: test-filter test-operations test-op-call -test-filter-build: test_filter_build.c $(SRCS_FILTER_BUILD) $(HEADERS_FILTER_BUILD) - $(CC) $(CFLAGS) -o test-filter-build $(SRCS_FILTER) \ +build-filter-build: test_filter_build.c $(SRCS_FILTER_BUILD) $(HEADERS_FILTER_BUILD) + $(CC) $(CFLAGS) -o filter-build $(SRCS_FILTER) \ test_filter_build.c - ./test-filter-build -test-filter: test_filter.c $(SRCS_FILTER) $(HEADERS_FILTER) - $(CC) $(CFLAGS) -o test-filter $(SRCS_FILTER) \ +test-filter-build: build-filter-build + ./filter-build + +build-filter: test_filter.c $(SRCS_FILTER) $(HEADERS_FILTER) + $(CC) $(CFLAGS) -o filter $(SRCS_FILTER) \ test_filter.c - ./test-filter -test-op-call: test_op_call.c $(SRCS_OP_CALL) $(HEADERS_OP_CALL) - $(CC) $(CFLAGS) -o test-op-call $(SRCS_OP_CALL) \ +test-filter: build-filter + ./filter + +build-op-call: test_op_call.c $(SRCS_OP_CALL) $(HEADERS_OP_CALL) + $(CC) $(CFLAGS) -o op-call $(SRCS_OP_CALL) \ test_op_call.c - ./test-op-call -test-operations: test_operations.c $(SRCS_OP) $(HEADERS_OP) - $(CC) $(CFLAGS) -o test-operations $(SRCS_OP) \ +test-op-call: build-op-call + ./op-call + +build-operations: test_operations.c $(SRCS_OP) $(HEADERS_OP) + $(CC) $(CFLAGS) -o operations $(SRCS_OP) \ test_operations.c - ./test-operations + +test-operations: build-operations + ./operations -- cgit v1.2.3