53 lines
1.5 KiB
Makefile
53 lines
1.5 KiB
Makefile
check_PROGRAMS = test_tracker test_stats test_send
|
|
|
|
test_tracker_SOURCES = test_support.c ping/tracker/test_tracker.c
|
|
test_stats_SOURCES = test_support.c ping/stats/test_stats.c
|
|
test_send_SOURCES = test_support.c send/test_do_send.c
|
|
|
|
BASE_CFLAGS = -std=c99 $(STRICT_CFLAGS)
|
|
|
|
if ENABLE_DEBUG
|
|
EXTRA_CFLAGS = -g -O0
|
|
else
|
|
EXTRA_CFLAGS =
|
|
endif
|
|
|
|
TEST_CPPFLAGS = \
|
|
-I $(top_srcdir)/includes \
|
|
-I $(top_srcdir)/libicmp/includes \
|
|
-I $(top_srcdir)/libcli/include \
|
|
-I $(top_srcdir)/tests \
|
|
-D_GNU_SOURCE
|
|
|
|
TEST_CFLAGS = $(BASE_CFLAGS) $(EXTRA_CFLAGS)
|
|
|
|
TEST_LDADD = \
|
|
$(top_builddir)/src/ping/libping_core.la \
|
|
$(top_srcdir)/libicmp/libicmp.a \
|
|
$(top_builddir)/libcli/src/libcli.la \
|
|
$(CRITERION_LIBS) \
|
|
-lm
|
|
|
|
test_tracker_CPPFLAGS = $(TEST_CPPFLAGS)
|
|
test_tracker_CFLAGS = $(TEST_CFLAGS)
|
|
test_tracker_LDFLAGS =
|
|
test_tracker_LDADD = $(TEST_LDADD)
|
|
|
|
test_stats_CPPFLAGS = $(TEST_CPPFLAGS)
|
|
test_stats_CFLAGS = $(TEST_CFLAGS)
|
|
test_stats_LDFLAGS =
|
|
test_stats_LDADD = $(TEST_LDADD)
|
|
|
|
test_send_CPPFLAGS = $(TEST_CPPFLAGS)
|
|
test_send_CFLAGS = $(TEST_CFLAGS)
|
|
test_send_LDFLAGS = \
|
|
-Wl,--wrap=icmp_send_echo \
|
|
-Wl,--wrap=icmp_should_retry \
|
|
-Wl,--wrap=icmp_strerror \
|
|
-Wl,--wrap=ping_scheduler_arm
|
|
test_send_LDADD = $(TEST_LDADD)
|
|
|
|
TESTS = test_tracker test_stats test_send
|
|
|
|
# Version header needed by test_main.c
|
|
BUILT_SOURCES = $(top_srcdir)/includes/version_gen.h
|