104 lines
2.0 KiB
Makefile
104 lines
2.0 KiB
Makefile
|
|
AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo
|
|
|
|
SUFFIXES = .c .o
|
|
AM_CFLAGS = -Wall
|
|
AM_LDFLAGS = -pthread
|
|
|
|
.c.o:
|
|
$(CC) -I. -pthread $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
|
|
|
noinst_LTLIBRARIES = libcworker.la
|
|
libcworker_la_SOURCES = \
|
|
cflexer.c \
|
|
cfparser.c \
|
|
cllexer.c \
|
|
clparser.c \
|
|
jlexer.c \
|
|
jparser.c \
|
|
logger.c \
|
|
massert.c \
|
|
rcache.c \
|
|
jblock.c \
|
|
cdynarr.c \
|
|
cstring.c
|
|
|
|
include_HEADERS = \
|
|
cflexer.h \
|
|
cfparser.h \
|
|
cllexer.h \
|
|
clparser.h \
|
|
jlexer.h \
|
|
jparser.h \
|
|
logger.h \
|
|
massert.h \
|
|
rcache.h \
|
|
jblock.h \
|
|
cdynarr.h \
|
|
cstring.h
|
|
|
|
if HAVE_VALGRIND
|
|
VALGRIND_OPT = --tool=memcheck -s
|
|
endif
|
|
|
|
test: valgrind
|
|
simple: $(bin_TESTS)
|
|
@for test in $(bin_TESTS); do \
|
|
echo ====== Test $${test} ======; \
|
|
./$${test}; \
|
|
echo ====== Done $${test} ======; \
|
|
done
|
|
|
|
valgrind: $(bin_TESTS)
|
|
@for test in $(bin_TESTS); do \
|
|
echo ====== Test $${test} ======; \
|
|
$(VALGRIND) $(VALGRIND_OPT) ./$${test}; \
|
|
echo ====== Done $${test} ======; \
|
|
done
|
|
|
|
bin_TESTS = \
|
|
cdynarr_test
|
|
|
|
noinst_PROGRAMS = \
|
|
cfparser_test \
|
|
clparser_test \
|
|
cflexer_test \
|
|
cfparser_test \
|
|
cllexer_test \
|
|
clparser_test \
|
|
jlexer_test \
|
|
jparser_test \
|
|
rcache_test \
|
|
jblock_test \
|
|
cdynarr_test \
|
|
cstring_test \
|
|
logger_test
|
|
|
|
#TESTS = $(bin_TESTS)
|
|
|
|
cflexer_test_SOURCES = cflexer_test.c
|
|
cfparser_test_SOURCES = cfparser_test.c
|
|
cllexer_test_SOURCES = cllexer_test.c
|
|
clparser_test_SOURCES = clparser_test.c
|
|
jlexer_test_SOURCES = jlexer_test.c
|
|
jparser_test_SOURCES = jparser_test.c
|
|
rcache_test_SOURCES = rcache_test.c
|
|
jblock_test_SOURCES = jblock_test.c
|
|
cdynarr_test_SOURCES = cdynarr_test.c
|
|
cstring_test_SOURCES = cstring_test.c
|
|
|
|
cflexer_test_LDADD = libcworker.la
|
|
cfparser_test_LDADD = libcworker.la
|
|
cllexer_test_LDADD = libcworker.la
|
|
clparser_test_LDADD = libcworker.la
|
|
jblock_test_LDADD = libcworker.la
|
|
jlexer_test_LDADD = libcworker.la
|
|
jparser_test_LDADD = libcworker.la
|
|
rcache_test_LDADD = libcworker.la
|
|
cdynarr_test_LDADD = libcworker.la
|
|
cstring_test_LDADD = libcworker.la
|
|
logger_test_LDADD = libcworker.la
|
|
|
|
clean-local:
|
|
rm -rf *~
|