openvcdiff | 311c714 | 2008-08-26 19:29:25 +0000 | [diff] [blame^] | 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> |
| 7 | AM_CPPFLAGS = -I$(top_srcdir)/src |
| 8 | |
| 9 | # For a non-optimized (debug) build, change "-DNDEBUG" to "-DDEBUG". |
| 10 | AM_CXXFLAGS = -DNDEBUG |
| 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. |
| 15 | if GCC |
| 16 | AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual -W |
| 17 | endif |
| 18 | |
| 19 | AM_LDFLAGS = -no-undefined |
| 20 | |
| 21 | googleincludedir = $(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.) |
| 24 | googleinclude_HEADERS = src/google/vcdecoder.h src/google/vcencoder.h \ |
| 25 | src/google/output_string.h |
| 26 | |
| 27 | docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) |
| 28 | ## This is for HTML and other documentation you want to install. |
| 29 | ## Add your documentation files (in doc/) in addition to these |
| 30 | ## top-level boilerplate files. Also add a TODO file if you have one. |
| 31 | dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS |
| 32 | |
| 33 | # The manual pages that should be installed |
| 34 | dist_man1_MANS = man/vcdiff.1 |
| 35 | |
| 36 | ## The libraries (.so's) you want to install |
| 37 | lib_LTLIBRARIES = |
| 38 | |
| 39 | ## Internal libraries that will not be installed |
| 40 | noinst_LTLIBRARIES = |
| 41 | |
| 42 | ## Binaries to be built; these are added in the RULES section |
| 43 | bin_PROGRAMS = |
| 44 | |
| 45 | ## unittests you want to run when people type 'make check'. |
| 46 | ## Individual tests are added to TESTS in the RULES section. |
| 47 | ## TESTS is for binary unittests, check_SCRIPTS for script-based unittests. |
| 48 | ## TESTS_ENVIRONMENT sets environment variables for when you run unittest, |
| 49 | ## but it only seems to take effect for *binary* unittests (argh!) |
| 50 | TESTS = |
| 51 | TESTS_ENVIRONMENT = SRCDIR="$(top_srcdir)" |
| 52 | check_SCRIPTS = |
| 53 | # Every time you add a unittest to check_SCRIPTS, add it here too |
| 54 | noinst_SCRIPTS = |
| 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 |
| 60 | noinst_LTLIBRARIES += libgflags.la |
| 61 | libgflags_la_SOURCES = src/gflags/gflags.h \ |
| 62 | src/gflags.cc \ |
| 63 | src/gflags_reporting.cc |
| 64 | |
| 65 | # gtest (Google Test): Used for unit tests only |
| 66 | # Please refer to http://code.google.com/p/googletest/ for details |
| 67 | noinst_LTLIBRARIES += libgtest.la |
| 68 | libgtest_la_SOURCES = src/gtest/gtest.h \ |
| 69 | src/gtest/gtest-death-test.h \ |
| 70 | src/gtest/gtest-message.h \ |
| 71 | src/gtest/gtest_pred_impl.h \ |
| 72 | src/gtest/gtest-spi.h \ |
| 73 | src/gtest/gtest_prod.h \ |
| 74 | src/gtest/internal/gtest-death-test-internal.h \ |
| 75 | src/gtest/internal/gtest-filepath.h \ |
| 76 | src/gtest/internal/gtest-internal.h \ |
| 77 | src/gtest/internal/gtest-port.h \ |
| 78 | src/gtest/internal/gtest-string.h \ |
| 79 | src/gtest/src/gtest-internal-inl.h \ |
| 80 | src/gtest/gtest.cc \ |
| 81 | src/gtest/gtest-death-test.cc \ |
| 82 | src/gtest/gtest-filepath.cc \ |
| 83 | src/gtest/gtest-port.cc \ |
| 84 | src/testing.h |
| 85 | |
| 86 | noinst_LTLIBRARIES += libgtest_main.la |
| 87 | libgtest_main_la_SOURCES = src/gtest/gtest_main.cc |
| 88 | libgtest_main_la_LIBADD = libgtest.la |
| 89 | |
| 90 | # libvcdcom: The open-vcdiff *common* library |
| 91 | lib_LTLIBRARIES += libvcdcom.la |
| 92 | libvcdcom_la_SOURCES = src/google/output_string.h \ |
| 93 | src/addrcache.h \ |
| 94 | src/checksum.h \ |
| 95 | src/codetable.h \ |
| 96 | src/logging.h \ |
| 97 | src/varint_bigendian.h \ |
| 98 | src/vcdiff_defs.h \ |
| 99 | src/zlib.h \ |
| 100 | src/zconf.h \ |
| 101 | src/adler32.c \ |
| 102 | src/addrcache.cc \ |
| 103 | src/codetable.cc \ |
| 104 | src/logging.cc \ |
| 105 | src/varint_bigendian.cc |
| 106 | |
| 107 | # libvcddec: The open-vcdiff *decoder* library |
| 108 | lib_LTLIBRARIES += libvcddec.la |
| 109 | libvcddec_la_SOURCES = src/google/vcdecoder.h \ |
| 110 | src/decodetable.h \ |
| 111 | src/headerparser.h \ |
| 112 | src/decodetable.cc \ |
| 113 | src/headerparser.cc \ |
| 114 | src/vcdecoder.cc |
| 115 | libvcddec_la_LIBADD = libvcdcom.la |
| 116 | |
| 117 | # libvcdenc: The open-vcdiff *encoder* library |
| 118 | lib_LTLIBRARIES += libvcdenc.la |
| 119 | libvcdenc_la_SOURCES = src/google/vcencoder.h \ |
| 120 | src/blockhash.h \ |
| 121 | src/compile_assert.h \ |
| 122 | src/encodetable.h \ |
| 123 | src/instruction_map.h \ |
| 124 | src/rolling_hash.h \ |
| 125 | src/vcdiffengine.h \ |
| 126 | src/blockhash.cc \ |
| 127 | src/encodetable.cc \ |
| 128 | src/instruction_map.cc \ |
| 129 | src/vcdiffengine.cc \ |
| 130 | src/vcencoder.cc |
| 131 | libvcdenc_la_LIBADD = libvcdcom.la |
| 132 | |
| 133 | bin_PROGRAMS += vcdiff |
| 134 | vcdiff_SOURCES = src/vcdiff_main.cc |
| 135 | vcdiff_LDADD = libvcddec.la libvcdenc.la libgflags.la |
| 136 | |
| 137 | TESTS += addrcache_test |
| 138 | addrcache_test_SOURCES = src/addrcache_test.cc |
| 139 | addrcache_test_LDADD = libvcdcom.la libgtest_main.la |
| 140 | |
| 141 | TESTS += blockhash_test |
| 142 | blockhash_test_SOURCES = src/blockhash_test.cc |
| 143 | blockhash_test_LDADD = libvcdenc.la libgtest_main.la |
| 144 | |
| 145 | TESTS += codetable_test |
| 146 | codetable_test_SOURCES = src/codetable_test.cc |
| 147 | codetable_test_LDADD = libvcdcom.la libgtest_main.la |
| 148 | |
| 149 | TESTS += decodetable_test |
| 150 | decodetable_test_SOURCES = src/decodetable_test.cc |
| 151 | decodetable_test_LDADD = libvcddec.la libgtest_main.la |
| 152 | |
| 153 | TESTS += encodetable_test |
| 154 | encodetable_test_SOURCES = src/encodetable_test.cc |
| 155 | encodetable_test_LDADD = libvcdenc.la libgtest_main.la |
| 156 | |
| 157 | TESTS += headerparser_test |
| 158 | headerparser_test_SOURCES = src/headerparser_test.cc |
| 159 | headerparser_test_LDADD = libvcddec.la libgtest_main.la |
| 160 | |
| 161 | TESTS += instruction_map_test |
| 162 | instruction_map_test_SOURCES = src/instruction_map_test.cc |
| 163 | instruction_map_test_LDADD = libvcdenc.la libgtest_main.la |
| 164 | |
| 165 | TESTS += output_string_test |
| 166 | output_string_test_SOURCES = src/output_string_test.cc |
| 167 | output_string_test_LDADD = libgtest_main.la |
| 168 | |
| 169 | TESTS += rolling_hash_test |
| 170 | rolling_hash_test_SOURCES = src/rolling_hash_test.cc |
| 171 | rolling_hash_test_LDADD = libvcdcom.la libgtest_main.la |
| 172 | |
| 173 | TESTS += varint_bigendian_test |
| 174 | varint_bigendian_test_SOURCES = src/varint_bigendian_test.cc |
| 175 | varint_bigendian_test_LDADD = libvcdcom.la libgtest_main.la |
| 176 | |
| 177 | TESTS += vcdecoder_test |
| 178 | vcdecoder_test_SOURCES = src/vcdecoder_test.h src/vcdecoder_test.cc \ |
| 179 | src/vcdecoder_test1.cc src/vcdecoder_test2.cc \ |
| 180 | src/vcdecoder_test3.cc src/vcdecoder_test4.cc |
| 181 | vcdecoder_test_LDADD = libvcddec.la libgtest_main.la |
| 182 | |
| 183 | TESTS += vcdiffengine_test |
| 184 | vcdiffengine_test_SOURCES = src/vcdiffengine_test.cc |
| 185 | vcdiffengine_test_LDADD = libvcdenc.la libgtest_main.la |
| 186 | |
| 187 | TESTS += vcencoder_test |
| 188 | vcencoder_test_SOURCES = src/vcencoder_test.cc |
| 189 | vcencoder_test_LDADD = libvcddec.la libvcdenc.la libgtest_main.la |
| 190 | |
| 191 | ## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS |
| 192 | |
| 193 | ## This should always include $(TESTS), but may also include other |
| 194 | ## binaries that you compile but don't want automatically installed. |
| 195 | noinst_PROGRAMS = $(TESTS) |
| 196 | |
| 197 | rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec |
| 198 | @cd packages && ./rpm.sh ${PACKAGE} ${VERSION} |
| 199 | |
| 200 | deb: dist-gzip packages/deb.sh packages/deb/* |
| 201 | @cd packages && ./deb.sh ${PACKAGE} ${VERSION} |
| 202 | |
| 203 | libtool: $(LIBTOOL_DEPS) |
| 204 | $(SHELL) ./config.status --recheck |
| 205 | |
| 206 | EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh \ |
| 207 | packages/deb autogen.sh $(SCRIPTS) libtool |