Makefile.am 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. noinst_PROGRAMS = @EXTRA_TEST@
  2. # These two lines support "make check", but we use "make test"
  3. TESTS = @EXTRA_TEST@
  4. check_PROGRAMS = @EXTRA_TEST@
  5. AM_CPPFLAGS = -DNP_STATE_DIR_PREFIX=\"$(localstatedir)\" \
  6. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins
  7. EXTRA_PROGRAMS = test_utils test_disk test_tcp test_cmd test_base64 test_ini1 test_ini3 test_opts1 test_opts2 test_opts3
  8. np_test_scripts = test_base64.t test_cmd.t test_disk.t test_ini1.t test_ini3.t test_opts1.t test_opts2.t test_opts3.t test_tcp.t test_utils.t
  9. np_test_files = config-dos.ini config-opts.ini config-tiny.ini plugin.ini plugins.ini
  10. EXTRA_DIST = $(np_test_scripts) $(np_test_files) var
  11. LIBS = @LTLIBINTL@
  12. if USE_LIBTAP_LOCAL
  13. tap_cflags = -I$(top_srcdir)/tap
  14. tap_ldflags = -L$(top_srcdir)/tap
  15. tap_ldadd = $(top_srcdir)/gl/libgnu.a
  16. else
  17. ## Shouldn't we detect that??
  18. tap_ldflags = -L/usr/local/lib
  19. endif
  20. AM_CFLAGS = -g -I$(top_srcdir)/lib -I$(top_srcdir)/gl $(tap_cflags)
  21. AM_LDFLAGS = $(tap_ldflags) -ltap
  22. LDADD = $(top_srcdir)/lib/libnagiosplug.a $(top_srcdir)/gl/libgnu.a $(SSLLIBS)
  23. SOURCES = test_utils.c test_disk.c test_tcp.c test_cmd.c test_base64.c test_ini1.c test_ini3.c test_opts1.c test_opts2.c test_opts3.c
  24. test: ${noinst_PROGRAMS}
  25. perl -MTest::Harness -e '$$Test::Harness::switches=""; runtests(map {$$_ .= ".t"} @ARGV)' $(EXTRA_PROGRAMS)
  26. test-debug: ${noinst_PROGRAMS}
  27. perl -MTest::Harness -e '$$Test::Harness::verbose=1; $$Test::Harness::switches=""; runtests(map {$$_ .= ".t"} @ARGV)' $(EXTRA_PROGRAMS)