aboutsummaryrefslogtreecommitdiff
path: root/src/main/Makefile.am
blob: a2de4b410d4a94ac0d045f955ba71eec0339792b (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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 \
  test_file.dat \
  test_file.dat.gz \
  test_file.dat.bz2

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_test2.la 

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

libextractor_test2_la_SOURCES = \
  test2_extractor.c 
libextractor_test2_la_LDFLAGS = \
  $(PLUGINFLAGS)
libextractor_test2_la_LIBADD = \
  $(LE_LIBINTL)


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

if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif

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 

test_gzip_SOURCES = \
 test_gzip.c 

test_bzip2_SOURCES = \
 test_bzip2.c