From aa4d426b4d3527d7e166df1a05058c9a4a0f6683 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 00:33:56 +0200 Subject: initial/final commit --- iniparser-4.1/test/Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 iniparser-4.1/test/Makefile (limited to 'iniparser-4.1/test/Makefile') diff --git a/iniparser-4.1/test/Makefile b/iniparser-4.1/test/Makefile new file mode 100644 index 0000000..15a8d26 --- /dev/null +++ b/iniparser-4.1/test/Makefile @@ -0,0 +1,35 @@ +CC ?= gcc + +ifndef V +QUIET_CC = @echo "CC $@"; +QUIET_MAKE_TESTS = @echo "GN Alltests.c"; +endif + +DEPS = $(shell ls ../src/*.[ch]) + +SRC = $(shell ls *.c | sed 's/AllTests.c//') +OBJ = $(SRC:.c=.o) + +INCLUDE = -I../src +CFLAGS += -pipe -ansi -pedantic -Wall -Wextra -g +LDFLAGS += + +all: check + +check: testrun + @./testrun + +testrun: AllTests.o $(OBJ) + $(QUIET_CC)$(CC) -o $@ AllTests.o $(OBJ) $(LDFLAGS) + +AllTests.o: $(OBJ) + $(QUIET_MAKE_TESTS)./make-tests.sh > AllTests.c + $(QUIET_CC)$(CC) -c -o AllTests.o AllTests.c $(CFLAGS) $(INCLUDE) + +%.o: %.c $(DEPS) + $(QUIET_CC)$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE) + +clean veryclean: + rm -rf AllTests.c + rm -rf $(OBJ) AllTests.o + rm -rf testrun -- cgit v1.2.3