1## Process this file with automake to produce Makefile.in
2
3# Make sure that when we re-make ./configure, we get the macros we need
4ACLOCAL_AMFLAGS = -I m4 \
5                  -I gflags/m4
6
7# This is so we can #include <google/vcencoder.h> or <gtest/gtest.h>
8AM_CPPFLAGS = -I$(top_srcdir)/src \
9              -I$(top_srcdir)/src/zlib \
10              -I$(top_srcdir)/gflags/src \
11              -I$(top_srcdir)/gtest \
12              -I$(top_srcdir)/gtest/include
13
14# For a non-optimized (debug) build, change "-DNDEBUG" to "-DDEBUG".
15AM_CXXFLAGS = -DNDEBUG -DNO_THREADS
16
17# Enable verbose gcc warnings.  We use the older option name "-W" to be
18# compatible with gcc v3.3 and earlier.  That option should be changed to
19# "-Wextra" when we can be sure that early gcc versions will not be used.
20if GCC
21AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual -W
22endif
23
24AM_LDFLAGS = -no-undefined $(LIBSTDCXX_LA_LINKER_FLAG)
25
26googleincludedir = $(includedir)/google
27## The .h files you want to install (that is, .h files that people
28## who install this package can include in their own applications.)
29googleinclude_HEADERS = src/google/vcdecoder.h src/google/vcencoder.h \
30			src/google/format_extension_flags.h \
31			src/google/output_string.h
32
33docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
34dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS
35
36# The manual pages that should be installed
37dist_man1_MANS = man/vcdiff.1
38
39## The libraries (.so's) you want to build and install
40lib_LTLIBRARIES =
41
42## Binaries to be built and installed; these are added in the RULES section
43bin_PROGRAMS =
44
45## Binary and script unit tests you want to run when people type 'make check'.
46## Tests are added one by one to these lists in the RULES sections.
47check_PROGRAMS =
48check_SCRIPTS =
49
50## Other binaries, scripts, and libraries that are built but not automatically
51## installed.
52noinst_PROGRAMS =
53noinst_SCRIPTS =
54noinst_LTLIBRARIES =
55
56## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
57
58# google-gflags: Used for command-line client
59#     Please refer to http://code.google.com/p/google-gflags/ for details
60noinst_LTLIBRARIES += libgflags.la
61libgflags_la_SOURCES = gflags/src/gflags/gflags.h \
62                       gflags/src/gflags/gflags_completions.h \
63                       gflags/src/mutex.h \
64                       gflags/src/gflags.cc \
65                       gflags/src/gflags_completions.cc \
66                       gflags/src/gflags_reporting.cc
67
68# gtest (Google Test): Used for unit tests only
69#     Please refer to http://code.google.com/p/googletest/ for details
70noinst_LTLIBRARIES += libgtest_main.la
71libgtest_main_la_SOURCES = gtest/include/gtest/gtest.h \
72                           gtest/include/gtest/gtest-death-test.h \
73                           gtest/include/gtest/gtest-message.h \
74                           gtest/include/gtest/gtest-param-test.h \
75                           gtest/include/gtest/gtest_pred_impl.h \
76                           gtest/include/gtest/gtest_prod.h \
77                           gtest/include/gtest/gtest-spi.h \
78                           gtest/include/gtest/gtest-test-part.h \
79                           gtest/include/gtest/gtest-typed-test.h \
80                           gtest/include/gtest/internal/gtest-death-test-internal.h \
81                           gtest/include/gtest/internal/gtest-filepath.h \
82                           gtest/include/gtest/internal/gtest-internal.h \
83                           gtest/include/gtest/internal/gtest-linked_ptr.h \
84                           gtest/include/gtest/internal/gtest-param-util.h \
85                           gtest/include/gtest/internal/gtest-param-util-generated.h \
86                           gtest/include/gtest/internal/gtest-port.h \
87                           gtest/include/gtest/internal/gtest-string.h \
88                           gtest/include/gtest/internal/gtest-tuple.h \
89                           gtest/include/gtest/internal/gtest-type-util.h \
90                           gtest/src/gtest-internal-inl.h \
91                           gtest/src/gtest.cc \
92                           gtest/src/gtest-death-test.cc \
93                           gtest/src/gtest-filepath.cc \
94                           gtest/src/gtest-port.cc \
95                           gtest/src/gtest-test-part.cc \
96                           gtest/src/gtest-typed-test.cc \
97                           gtest/src/gtest_main.cc \
98                           src/testing.h
99
100noinst_LTLIBRARIES += libvcdecoder_test_common.la
101libvcdecoder_test_common_la_SOURCES = src/vcdecoder_test.h \
102				      src/vcdecoder_test.cc
103libvcdecoder_test_common_la_LIBADD = libvcddec.la libgtest_main.la
104
105# libvcdcom: The open-vcdiff *common* library
106lib_LTLIBRARIES += libvcdcom.la
107libvcdcom_la_SOURCES = src/google/format_extension_flags.h \
108		       src/google/output_string.h \
109		       src/addrcache.h \
110		       src/checksum.h \
111		       src/codetable.h \
112		       src/logging.h \
113		       src/varint_bigendian.h \
114		       src/vcdiff_defs.h \
115		       src/zlib/zlib.h \
116		       src/zlib/zconf.h \
117		       src/zlib/adler32.c \
118		       src/addrcache.cc \
119		       src/codetable.cc \
120		       src/logging.cc \
121		       src/varint_bigendian.cc
122
123# libvcddec: The open-vcdiff *decoder* library
124lib_LTLIBRARIES += libvcddec.la
125libvcddec_la_SOURCES = src/google/vcdecoder.h \
126		       src/decodetable.h \
127		       src/headerparser.h \
128		       src/decodetable.cc \
129		       src/headerparser.cc \
130		       src/vcdecoder.cc
131libvcddec_la_LIBADD = libvcdcom.la
132
133# libvcdenc: The open-vcdiff *encoder* library
134lib_LTLIBRARIES += libvcdenc.la
135libvcdenc_la_SOURCES = src/google/vcencoder.h \
136		       src/blockhash.h \
137		       src/codetablewriter_interface.h \
138		       src/compile_assert.h \
139		       src/encodetable.h \
140		       src/instruction_map.h \
141		       src/jsonwriter.h \
142		       src/rolling_hash.h \
143		       src/vcdiffengine.h \
144		       src/blockhash.cc \
145		       src/encodetable.cc \
146		       src/instruction_map.cc \
147		       src/jsonwriter.cc \
148		       src/vcdiffengine.cc \
149                       src/vcencoder.cc
150libvcdenc_la_LIBADD = libvcdcom.la
151
152bin_PROGRAMS += vcdiff
153vcdiff_SOURCES = src/vcdiff_main.cc
154vcdiff_LDADD = libvcddec.la libvcdenc.la libgflags.la
155
156check_PROGRAMS += addrcache_test
157addrcache_test_SOURCES = src/addrcache_test.cc
158addrcache_test_LDADD = libvcdcom.la libgtest_main.la
159
160check_PROGRAMS += blockhash_test
161blockhash_test_SOURCES = src/blockhash_test.cc
162blockhash_test_LDADD = libvcdenc.la libgtest_main.la
163
164check_PROGRAMS += codetable_test
165codetable_test_SOURCES = src/codetable_test.cc
166codetable_test_LDADD = libvcdcom.la libgtest_main.la
167
168check_PROGRAMS += decodetable_test
169decodetable_test_SOURCES = src/decodetable_test.cc
170decodetable_test_LDADD = libvcddec.la libvcdcom.la libgtest_main.la
171
172check_PROGRAMS += encodetable_test
173encodetable_test_SOURCES = src/encodetable_test.cc
174encodetable_test_LDADD = libvcdenc.la libvcdcom.la libgtest_main.la
175
176check_PROGRAMS += headerparser_test
177headerparser_test_SOURCES = src/headerparser_test.cc
178headerparser_test_LDADD = libvcddec.la libvcdcom.la libgtest_main.la
179
180check_PROGRAMS += instruction_map_test
181instruction_map_test_SOURCES = src/instruction_map_test.cc
182instruction_map_test_LDADD = libvcdenc.la libvcdcom.la libgtest_main.la
183
184check_PROGRAMS += output_string_test
185output_string_test_SOURCES = src/output_string_crope.h \
186			     src/output_string_test.cc
187output_string_test_LDADD = libgtest_main.la
188
189check_PROGRAMS += rolling_hash_test
190rolling_hash_test_SOURCES = src/rolling_hash_test.cc
191rolling_hash_test_LDADD = libvcdcom.la libgtest_main.la
192
193check_PROGRAMS += varint_bigendian_test
194varint_bigendian_test_SOURCES = src/varint_bigendian_test.cc
195varint_bigendian_test_LDADD = libvcdcom.la libgtest_main.la
196
197check_PROGRAMS += vcdecoder1_test
198vcdecoder1_test_SOURCES = src/vcdecoder1_test.cc
199vcdecoder1_test_LDADD = libvcdecoder_test_common.la
200
201check_PROGRAMS += vcdecoder2_test
202vcdecoder2_test_SOURCES = src/vcdecoder2_test.cc
203vcdecoder2_test_LDADD = libvcdecoder_test_common.la
204
205check_PROGRAMS += vcdecoder3_test
206vcdecoder3_test_SOURCES = src/vcdecoder3_test.cc
207vcdecoder3_test_LDADD = libvcdecoder_test_common.la
208
209check_PROGRAMS += vcdecoder4_test
210vcdecoder4_test_SOURCES = src/vcdecoder4_test.cc
211vcdecoder4_test_LDADD = libvcdecoder_test_common.la
212
213check_PROGRAMS += vcdecoder5_test
214vcdecoder5_test_SOURCES = src/vcdecoder5_test.cc
215vcdecoder5_test_LDADD = libvcdecoder_test_common.la
216
217check_PROGRAMS += vcdiffengine_test
218vcdiffengine_test_SOURCES = src/vcdiffengine_test.cc
219vcdiffengine_test_LDADD = libvcdenc.la libvcdcom.la libgtest_main.la
220
221check_PROGRAMS += vcencoder_test
222vcencoder_test_SOURCES = src/vcencoder_test.cc
223vcencoder_test_LDADD = libvcddec.la libvcdenc.la libvcdcom.la libgtest_main.la
224
225check_PROGRAMS += jsonwriter_test
226jsonwriter_test_SOURCES = src/jsonwriter_test.cc
227jsonwriter_test_LDADD = libvcdenc.la libvcdcom.la libgtest_main.la
228
229check_SCRIPTS += src/vcdiff_test.sh
230dist_noinst_DATA = testdata/configure.ac.v0.1 \
231                   testdata/configure.ac.v0.2 \
232                   testdata/allocates_4gb.vcdiff
233
234## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
235
236TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
237## TESTS_ENVIRONMENT sets environment variables for when you run unit tests,
238## but it only seems to take effect for *binary* unit tests (argh!)
239TESTS_ENVIRONMENT = SRCDIR="$(top_srcdir)"
240
241rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
242	@cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
243
244deb: dist-gzip packages/deb.sh packages/deb/*
245	@cd packages && ./deb.sh ${PACKAGE} ${VERSION}
246
247libtool: $(LIBTOOL_DEPS)
248	$(SHELL) ./config.status --recheck
249
250EXTRA_DIST = $(check_SCRIPTS) \
251	     autogen.sh \
252	     gflags/src/windows/config.h \
253	     gflags/src/windows/gflags/gflags.h \
254	     gflags/src/windows/gflags/gflags_completions.h \
255	     gflags/src/windows/port.h \
256	     gflags/src/windows/port.cc \
257	     packages/rpm.sh \
258	     packages/rpm/rpm.spec \
259	     packages/deb.sh \
260	     packages/deb \
261	     src/solaris/libstdc++.la \
262	     testdata/empty_file.txt \
263	     vsprojects/config.h \
264	     vsprojects/stdint.h \
265	     vsprojects/vcdiff_test.bat \
266	     vsprojects/open-vcdiff.sln \
267	     vsprojects/addrcache_test/addrcache_test.vcproj \
268	     vsprojects/blockhash_test/blockhash_test.vcproj \
269	     vsprojects/codetable_test/codetable_test.vcproj \
270	     vsprojects/decodetable_test/decodetable_test.vcproj \
271	     vsprojects/encodetable_test/encodetable_test.vcproj \
272	     vsprojects/gtest/gtest.vcproj \
273	     vsprojects/headerparser_test/headerparser_test.vcproj \
274	     vsprojects/instruction_map_test/instruction_map_test.vcproj \
275	     vsprojects/jsonwriter_test/jsonwriter_test.vcproj \
276	     vsprojects/output_string_test/output_string_test.vcproj \
277	     vsprojects/rolling_hash_test/rolling_hash_test.vcproj \
278	     vsprojects/varint_bigendian_test/varint_bigendian_test.vcproj \
279	     vsprojects/vcdcom/vcdcom.vcproj \
280	     vsprojects/vcddec/vcddec.vcproj \
281	     vsprojects/vcdecoder_test_common/vcdecoder_test_common.vcproj \
282	     vsprojects/vcdecoder1_test/vcdecoder1_test.vcproj \
283	     vsprojects/vcdecoder2_test/vcdecoder2_test.vcproj \
284	     vsprojects/vcdecoder3_test/vcdecoder3_test.vcproj \
285	     vsprojects/vcdecoder4_test/vcdecoder4_test.vcproj \
286	     vsprojects/vcdecoder5_test/vcdecoder5_test.vcproj \
287	     vsprojects/vcdenc/vcdenc.vcproj \
288	     vsprojects/vcdiff/vcdiff.vcproj \
289	     vsprojects/vcdiffengine_test/vcdiffengine_test.vcproj \
290	     vsprojects/vcdiff_test/vcdiff_test.vcproj \
291	     vsprojects/vcencoder_test/vcencoder_test.vcproj
292