aboutsummaryrefslogtreecommitdiff
path: root/src/main/Makefile.am
blob: d5245f97739804e3492b436b8e26dd2d82d1366d (plain) (blame)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
SUBDIRS  = .

INCLUDES = -I$(top_srcdir)/src/include $(LTDLINCL)

# install test plugins under /tmp (we must install them somewhere,
# with 'noinst' automake insists on building a static library...)
tmpdir = /tmp/

LIBS = \
 @LE_LIBINTL@ @LE_LIB_LIBS@

lib_LTLIBRARIES = \
  libextractor.la 

bin_PROGRAMS = extract

extract_LDADD = \
  $(top_builddir)/src/main/libextractor.la 

if HAVE_ZLIB
  zlib =-lz
endif
if HAVE_BZ2
  bz2lib = -lbz2
endif

libextractor_la_LDFLAGS = \
  $(LE_LIB_LDFLAGS) -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
libextractor_la_LIBADD = \
  $(LIBLTDL) $(zlib) $(bz2lib) $(LTLIBICONV)

if WINDOWS
EXTRACTOR_IPC=extractor_ipc_w32.c
else
EXTRACTOR_IPC=extractor_ipc_gnu.c
endif

if HAVE_GNU_LD
 makesymbolic=-Wl,-Bsymbolic
endif

PLUGINFLAGS = $(makesymbolic) $(LE_PLUGIN_LDFLAGS)

EXTRA_DIST = \
  iconv.c fuzz_default.sh fuzz_thumbnail.sh

libextractor_la_CPPFLAGS = -DPLUGINDIR=\"@RPLUGINDIR@\" -DPLUGININSTDIR=\"${plugindir}\" $(AM_CPPFLAGS)

libextractor_la_SOURCES = \
  extractor_common.c extractor_common.h \
  extractor_datasource.c extractor_datasource.h \
  $(EXTRACTOR_IPC) extractor_ipc.c extractor_ipc.h \
  extractor_logging.c extractor_logging.h \
  extractor_metatypes.c \
  extractor_plugpath.c extractor_plugpath.h \
  extractor_plugins.c extractor_plugins.h \
  extractor_print.c \
  extractor_plugin_main.c extractor_plugin_main.h \
  extractor.c 

extract_SOURCES = \
  extract.c \
  getopt.c getopt.h getopt1.c 



LDADD = \
 $(top_builddir)/src/main/libextractor.la  

TESTS_ENVIRONMENT = testdatadir=$(top_srcdir)/test
TESTS_ENVIRONMENT += bindir=${bindir}

tmp_LTLIBRARIES = \
  libextractor_test.la 

libextractor_test_la_SOURCES = \
  test_extractor.c 
libextractor_test_la_LDFLAGS = \
  $(PLUGINFLAGS)
libextractor_test_la_LIBADD = \
  $(LE_LIBINTL)

check_PROGRAMS = \
 test_trivial \
 test_plugin_loading \
 test_plugin_load_multi \
 test_ipc \
 test_file

TESTS = $(check_PROGRAMS)

test_trivial_SOURCES = \
 test_trivial.c 

test_plugin_loading_SOURCES = \
 test_plugin_loading.c 

test_plugin_load_multi_SOURCES = \
 test_plugin_load_multi.c 

test_ipc_SOURCES = \
 test_ipc.c 

test_file_SOURCES = \
 test_file.c