guile/tests/Makefile
Andy Wingo f348b8ed6d Change headers and files to be named "lightening" instead of "jit"
This improves integration with other projects.  Like for example Guile
already has files named jit.c and jit.h; it's easier to manage if
lightening uses its own file names.
2019-04-03 13:57:48 +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