diff options
author | Wojtek Kosior <wk@koszkonutek-tmp.pl.eu.org> | 2021-04-30 00:33:56 +0200 |
---|---|---|
committer | Wojtek Kosior <wk@koszkonutek-tmp.pl.eu.org> | 2021-04-30 00:33:56 +0200 |
commit | aa4d426b4d3527d7e166df1a05058c9a4a0f6683 (patch) | |
tree | 4ff17ce8b89a2321b9d0ed4bcfc37c447bcb6820 /iniparser-4.1/test/Makefile | |
download | smtps-and-pop3s-console-program-master.tar.gz smtps-and-pop3s-console-program-master.zip |
Diffstat (limited to 'iniparser-4.1/test/Makefile')
-rw-r--r-- | iniparser-4.1/test/Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
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 |