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