1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
############################################################
# The library
#-----------------------------------------------------------
if BUILD_LIBRARY
lib_LTLIBRARIES = libinotify.la
nobase_include_HEADERS = sys/inotify.h
libinotify_la_SOURCES = \
utils.c \
barriers.c \
conversions.c \
dep-list.c \
watch.c \
worker-sets.c \
worker-thread.c \
worker.c \
controller.c
libinotify_la_CFLAGS = -I. -DNDEBUG
if FREEBSD
libinotify_la_LDFLAGS = -pthread
else
libinotify_la_LDFLAGS = -lpthread
endif
endif
############################################################
# Test suite
#-----------------------------------------------------------
EXTRA_PROGRAMS = check_libinotify
test: check_libinotify
@echo Running test suite...
@./check_libinotify
.PHONY: test
check_libinotify_SOURCES = \
tests/core/log.cc \
tests/core/event.cc \
tests/core/action.cc \
tests/core/request.cc \
tests/core/response.cc \
tests/core/inotify_client.cc \
tests/core/consumer.cc \
tests/core/journal.cc \
tests/core/test.cc \
tests/start_stop_test.cc \
tests/start_stop_dir_test.cc \
tests/fail_test.cc \
tests/notifications_test.cc \
tests/notifications_dir_test.cc \
tests/update_flags_test.cc \
tests/update_flags_dir_test.cc \
tests/open_close_test.cc \
tests/tests.cc
if LINUX
check_libinotify_CXXFLAGS = -std=c++0x
check_libinotify_SOURCES += barriers.c
endif
if BUILD_LIBRARY
check_libinotify_LDADD = libinotify.la
endif
if FREEBSD
check_libinotify_LDFLAGS = -pthread
else
check_libinotify_LDFLAGS = -lpthread
endif
noinst_programs = check_libinotify
|