Makefile.am (4150B)
1 # This Makefile.am is in the public domain 2 SUBDIRS = . 3 4 AM_CPPFLAGS = -I$(top_srcdir)/src/include 5 6 AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) 7 8 LIBS = \ 9 @LE_LIBINTL@ @LE_LIB_LIBS@ 10 11 if USE_COVERAGE 12 AM_CFLAGS += --coverage -O0 13 XLIB = -lgcov 14 endif 15 16 lib_LTLIBRARIES = \ 17 libextractor.la 18 19 bin_PROGRAMS = extract 20 21 if HAVE_ZLIB 22 zlib =-lz 23 TEST_ZLIB = test_gzip 24 endif 25 if HAVE_BZ2 26 bz2lib = -lbz2 27 TEST_BZIP2 = test_bzip2 28 endif 29 if HAVE_APPARMOR 30 apparmor=-lapparmor 31 endif 32 33 if WINDOWS 34 EXTRACTOR_IPC=extractor_ipc_w32.c 35 else 36 EXTRACTOR_IPC=extractor_ipc_gnu.c 37 # Runs each plugin out-of-process, see extractor_ipc_gnu.c. The library 38 # looks for it under this name, so it is installed by hand: automake 39 # would apply --program-transform-name to it. 40 noinst_PROGRAMS = libextractor-helper 41 install-exec-local: 42 $(MKDIR_P) '$(DESTDIR)$(plugindir)' 43 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install \ 44 $(INSTALL_PROGRAM) libextractor-helper$(EXEEXT) '$(DESTDIR)$(plugindir)' 45 uninstall-local: 46 rm -f '$(DESTDIR)$(plugindir)/libextractor-helper$(EXEEXT)' 47 endif 48 49 if HAVE_GNU_LD 50 makesymbolic=-Wl,-Bsymbolic 51 endif 52 53 # install plugins under: 54 plugindir = $(libdir)/@RPLUGINDIR@ 55 56 PLUGINFLAGS = $(makesymbolic) $(LE_PLUGIN_LDFLAGS) 57 58 EXTRA_DIST = \ 59 iconv.c \ 60 test_file.dat \ 61 test_file.dat.gz \ 62 test_file.dat.bz2 63 64 libextractor_la_CPPFLAGS = \ 65 -DPLUGINDIR=\"@RPLUGINDIR@\" -DPLUGININSTDIR=\"${plugindir}\" \ 66 -DPLUGINHELPER=\"libextractor-helper$(EXEEXT)\" $(AM_CPPFLAGS) 67 libextractor_la_SOURCES = \ 68 extractor_common.c extractor_common.h \ 69 extractor_datasource.c extractor_datasource.h \ 70 $(EXTRACTOR_IPC) extractor_ipc.c extractor_ipc.h \ 71 extractor_logging.c extractor_logging.h \ 72 extractor_metatypes.c \ 73 extractor_plugpath.c extractor_plugpath.h \ 74 extractor_plugins.c extractor_plugins.h \ 75 extractor_print.c \ 76 extractor_plugin_main.c extractor_plugin_main.h \ 77 extractor.c 78 libextractor_la_LDFLAGS = \ 79 $(LE_LIB_LDFLAGS) -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ 80 libextractor_la_LIBADD = \ 81 -lltdl $(zlib) $(bz2lib) $(LTLIBICONV) $(XLIB) $(LE_LIBINTL) 82 83 # The helper calls functions that libextractor.so does not export, so 84 # it is built from the library's sources instead of linking against it. 85 libextractor_helper_SOURCES = \ 86 extractor_helper.c $(libextractor_la_SOURCES) 87 libextractor_helper_CPPFLAGS = \ 88 $(libextractor_la_CPPFLAGS) 89 libextractor_helper_LDADD = \ 90 -lltdl $(zlib) $(bz2lib) $(LTLIBICONV) $(XLIB) $(LE_LIBINTL) $(apparmor) 91 92 extract_SOURCES = \ 93 extract.c \ 94 getopt.c getopt.h getopt1.c 95 extract_DEPENDENCIES = \ 96 libextractor.la 97 extract_LDADD = \ 98 $(top_builddir)/src/main/libextractor.la $(LE_LIBINTL) 99 100 TESTS_ENVIRONMENT = testdatadir=$(top_srcdir)/test 101 TESTS_ENVIRONMENT += bindir=${bindir} 102 103 noinst_LTLIBRARIES = \ 104 libextractor_test.la \ 105 libextractor_test2.la 106 107 libextractor_test_la_SOURCES = \ 108 test_extractor.c 109 libextractor_test_la_LDFLAGS = \ 110 $(PLUGINFLAGS) -rpath /nowhere 111 libextractor_test_la_LIBADD = \ 112 $(LE_LIBINTL) $(XLIB) 113 114 libextractor_test2_la_SOURCES = \ 115 test2_extractor.c 116 libextractor_test2_la_LDFLAGS = \ 117 $(PLUGINFLAGS) -rpath /nowhere 118 libextractor_test2_la_LIBADD = \ 119 $(LE_LIBINTL) $(XLIB) 120 121 122 check_PROGRAMS = \ 123 test_trivial \ 124 test_plugin_loading \ 125 test_plugin_load_multi \ 126 test_ipc \ 127 test_file \ 128 $(TEST_ZLIB) \ 129 $(TEST_BZIP2) 130 131 if ENABLE_TEST_RUN 132 TESTS = $(check_PROGRAMS) 133 endif 134 135 test_trivial_SOURCES = \ 136 test_trivial.c 137 test_trivial_LDADD = \ 138 $(top_builddir)/src/main/libextractor.la 139 140 test_plugin_loading_SOURCES = \ 141 test_plugin_loading.c 142 test_plugin_loading_LDADD = \ 143 $(top_builddir)/src/main/libextractor.la 144 145 test_plugin_load_multi_SOURCES = \ 146 test_plugin_load_multi.c 147 test_plugin_load_multi_LDADD = \ 148 $(top_builddir)/src/main/libextractor.la 149 150 test_ipc_SOURCES = \ 151 test_ipc.c 152 test_ipc_LDADD = \ 153 $(top_builddir)/src/main/libextractor.la 154 155 test_file_SOURCES = \ 156 test_file.c 157 test_file_LDADD = \ 158 $(top_builddir)/src/main/libextractor.la 159 160 test_gzip_SOURCES = \ 161 test_gzip.c 162 test_gzip_LDADD = \ 163 $(top_builddir)/src/main/libextractor.la 164 165 test_bzip2_SOURCES = \ 166 test_bzip2.c 167 test_bzip2_LDADD = \ 168 $(top_builddir)/src/main/libextractor.la