82 lines
1.8 KiB
Makefile
82 lines
1.8 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 $@ $<
|
|
|
|
#config.h: config.h.in
|
|
# ./config.status $@
|
|
|
|
sbin_PROGRAMS = cworker
|
|
cworker_SOURCES = main.c cworker.c $(common_SOURCES)
|
|
|
|
common_SOURCES = \
|
|
cflexer.c \
|
|
cflexer.h \
|
|
cfparser.c \
|
|
cfparser.h \
|
|
cllexer.c \
|
|
cllexer.h \
|
|
clparser.c \
|
|
clparser.h \
|
|
jlexer.c \
|
|
jlexer.h \
|
|
jparser.c \
|
|
jparser.h \
|
|
logger.c \
|
|
logger.h \
|
|
massert.c \
|
|
massert.h \
|
|
rcache.c \
|
|
rcache.h
|
|
|
|
run: $(sbin_PROGRAMS)
|
|
./cworker --port=9002
|
|
|
|
if HAVE_VALGRIND
|
|
VALGRIND_OPT = --tool=memcheck
|
|
endif
|
|
|
|
test: $(bin_TESTS)
|
|
@for test in $(bin_TESTS); do \
|
|
echo ======= Test $${test} ======; \
|
|
$(VALGRIND) $(VALGRIND_OPT) ./$${test}; \
|
|
echo ====== Done $${test} ======; \
|
|
done
|
|
|
|
bin_TESTS = \
|
|
cflexer_test \
|
|
cfparser_test \
|
|
cllexer_test \
|
|
clparser_test \
|
|
jlexer_test \
|
|
jparser_test \
|
|
rcache_test
|
|
|
|
noinst_PROGRAMS = $(bin_TESTS)
|
|
#TESTS = $(bin_TESTS)
|
|
|
|
cflexer_test_SOURCES = cflexer_test.c $(common_SOURCES)
|
|
cfparser_test_SOURCES = cfparser_test.c $(common_SOURCES)
|
|
cllexer_test_SOURCES = cllexer_test.c $(common_SOURCES)
|
|
clparser_test_SOURCES = clparser_test.c $(common_SOURCES)
|
|
jlexer_test_SOURCES = jlexer_test.c $(common_SOURCES)
|
|
jparser_test_SOURCES = jparser_test.c $(common_SOURCES)
|
|
rcache_test_SOURCES = rcache_test.c $(common_SOURCES)
|
|
|
|
clean-local:
|
|
rm -rf autom4te.cache
|
|
rm -rf *~
|
|
|
|
#install-data-local:
|
|
# test -z $(DESTDIR)$(APP_LIBDIR) || $(MKDIR_P) $(DESTDIR)$(APP_LIBDIR)
|
|
# test -z $(DESTDIR)$(APP_CONFDIR) || $(MKDIR_P) $(DESTDIR)$(APP_CONFDIR)
|
|
# test -z $(DESTDIR)$(APP_LOGDIR) || $(MKDIR_P) $(DESTDIR)$(APP_LOGDIR)
|
|
# test -z $(DESTDIR)$(APP_RUNDIR) || $(MKDIR_P) $(DESTDIR)$(APP_RUNDIR)
|
|
# test -z $(DESTDIR)$(APP_DATABASEDIR) || $(MKDIR_P) $(DESTDIR)$(APP_DATABASEDIR)
|
|
#EOF
|