libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

Makefile.am (3218B)


      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 endif
     38 
     39 if HAVE_GNU_LD
     40  makesymbolic=-Wl,-Bsymbolic
     41 endif
     42 
     43 # install plugins under:
     44 plugindir = $(libdir)/@RPLUGINDIR@
     45 
     46 PLUGINFLAGS = $(makesymbolic) $(LE_PLUGIN_LDFLAGS)
     47 
     48 EXTRA_DIST = \
     49   iconv.c \
     50   test_file.dat \
     51   test_file.dat.gz \
     52   test_file.dat.bz2
     53 
     54 libextractor_la_CPPFLAGS = \
     55   -DPLUGINDIR=\"@RPLUGINDIR@\" -DPLUGININSTDIR=\"${plugindir}\" $(AM_CPPFLAGS)
     56 libextractor_la_SOURCES = \
     57   extractor_common.c extractor_common.h \
     58   extractor_datasource.c extractor_datasource.h \
     59   $(EXTRACTOR_IPC) extractor_ipc.c extractor_ipc.h \
     60   extractor_logging.c extractor_logging.h \
     61   extractor_metatypes.c \
     62   extractor_plugpath.c extractor_plugpath.h \
     63   extractor_plugins.c extractor_plugins.h \
     64   extractor_print.c \
     65   extractor_plugin_main.c extractor_plugin_main.h \
     66   extractor.c
     67 libextractor_la_LDFLAGS = \
     68   $(LE_LIB_LDFLAGS) -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
     69 libextractor_la_LIBADD = \
     70   -lltdl $(zlib) $(bz2lib) $(LTLIBICONV) $(XLIB) $(LE_LIBINTL) $(apparmor)
     71 
     72 extract_SOURCES = \
     73   extract.c \
     74   getopt.c getopt.h getopt1.c
     75 extract_DEPENDENCIES = \
     76   libextractor.la
     77 extract_LDADD = \
     78  $(top_builddir)/src/main/libextractor.la $(LE_LIBINTL)
     79 
     80 TESTS_ENVIRONMENT = testdatadir=$(top_srcdir)/test
     81 TESTS_ENVIRONMENT += bindir=${bindir}
     82 
     83 noinst_LTLIBRARIES = \
     84   libextractor_test.la \
     85   libextractor_test2.la
     86 
     87 libextractor_test_la_SOURCES = \
     88   test_extractor.c
     89 libextractor_test_la_LDFLAGS = \
     90   $(PLUGINFLAGS) -rpath /nowhere
     91 libextractor_test_la_LIBADD = \
     92   $(LE_LIBINTL) $(XLIB)
     93 
     94 libextractor_test2_la_SOURCES = \
     95   test2_extractor.c
     96 libextractor_test2_la_LDFLAGS = \
     97   $(PLUGINFLAGS) -rpath /nowhere
     98 libextractor_test2_la_LIBADD = \
     99   $(LE_LIBINTL) $(XLIB)
    100 
    101 
    102 check_PROGRAMS = \
    103  test_trivial \
    104  test_plugin_loading \
    105  test_plugin_load_multi \
    106  test_ipc \
    107  test_file \
    108  $(TEST_ZLIB) \
    109  $(TEST_BZIP2)
    110 
    111 if ENABLE_TEST_RUN
    112 TESTS = $(check_PROGRAMS)
    113 endif
    114 
    115 test_trivial_SOURCES = \
    116  test_trivial.c
    117 test_trivial_LDADD = \
    118  $(top_builddir)/src/main/libextractor.la
    119 
    120 test_plugin_loading_SOURCES = \
    121  test_plugin_loading.c
    122 test_plugin_loading_LDADD = \
    123  $(top_builddir)/src/main/libextractor.la
    124 
    125 test_plugin_load_multi_SOURCES = \
    126  test_plugin_load_multi.c
    127 test_plugin_load_multi_LDADD = \
    128  $(top_builddir)/src/main/libextractor.la
    129 
    130 test_ipc_SOURCES = \
    131  test_ipc.c
    132 test_ipc_LDADD = \
    133  $(top_builddir)/src/main/libextractor.la
    134 
    135 test_file_SOURCES = \
    136  test_file.c
    137 test_file_LDADD = \
    138  $(top_builddir)/src/main/libextractor.la
    139 
    140 test_gzip_SOURCES = \
    141  test_gzip.c
    142 test_gzip_LDADD = \
    143  $(top_builddir)/src/main/libextractor.la
    144 
    145 test_bzip2_SOURCES = \
    146  test_bzip2.c
    147 test_bzip2_LDADD = \
    148  $(top_builddir)/src/main/libextractor.la