diff options
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  | 
