1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00
guile/libguile/lightning/tests/Makefile
2019-04-03 13:59:33 +02:00

24 lines
542 B
Makefile

TESTS=$(sort $(basename $(wildcard *.c)))
CC = gcc
CFLAGS = -Wall -O0 -g
all: $(addprefix test-,$(TESTS))
check: all
@echo "Running unit tests..."
@set -e; for test in $(TESTS); do \
echo "Testing: $$test"; \
./test-$$test; \
done
@echo "Success."
lightening.o: ../lightening.h ../lightening/*.c
$(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o lightening.o -c ../lightening/lightening.c
test-%: %.c lightening.o test.h
$(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening.o $<
clean:
rm -f $(addprefix test-,$(TESTS))
rm -f lightening.o