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 6SUBDIRS = . 7 8DIST_SUBDIRS = src 9 10# This is so we can #include <package/foo> 11AM_CPPFLAGS = -I$(top_srcdir)/src \ 12 -I$(top_srcdir)/tests \ 13 -I$(GTEST_DIR) -I$(GTEST_DIR)/include \ 14 -I$(GMOCK_DIR) -I$(GMOCK_DIR)/include 15 16# These are good warnings to turn on by default 17if GCC 18AM_CXXFLAGS = -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare 19endif 20 21# The -no-undefined flag allows libtool to generate shared libraries for 22# Cygwin and MinGW. LIBSTDCXX_LA_LINKER_FLAG is used to fix a Solaris bug. 23# -version-info tells libtool what to put after the '.so' in the filename. 24AM_LDFLAGS = -no-undefined $(LIBSTDCXX_LA_LINKER_FLAG) \ 25 -version-info @SO_VERSION@ 26 27# The libraries (.so's) to build and install. 28lib_LTLIBRARIES = libpolo.la 29 30# Libraries that are built but not installed. 31noinst_LTLIBRARIES = libgtest.la libgmock.la 32 33## The .h files you want to install (that is, .h files that people 34## who install this package can include in their own applications.) 35 36polo_encoding_includedir = $(includedir)/polo/encoding 37polo_encoding_include_HEADERS = \ 38 src/polo/encoding/encodingoption.h \ 39 src/polo/encoding/hexadecimalencoder.h \ 40 src/polo/encoding/secretencoder.h 41 42polo_pairing_includedir = $(includedir)/polo/pairing 43polo_pairing_include_HEADERS = \ 44 src/polo/pairing/clientpairingsession.h \ 45 src/polo/pairing/pairingcontext.h \ 46 src/polo/pairing/pairinglistener.h \ 47 src/polo/pairing/pairingsession.h \ 48 src/polo/pairing/polochallengeresponse.h \ 49 src/polo/pairing/poloerror.h \ 50 src/polo/pairing/serverpairingsession.h 51 52polo_pairing_message_includedir = $(includedir)/polo/pairing/message 53polo_pairing_message_include_HEADERS = \ 54 src/polo/pairing/message/configurationackmessage.h \ 55 src/polo/pairing/message/configurationmessage.h \ 56 src/polo/pairing/message/messagelistener.h \ 57 src/polo/pairing/message/optionsmessage.h \ 58 src/polo/pairing/message/pairingrequestackmessage.h \ 59 src/polo/pairing/message/pairingrequestmessage.h \ 60 src/polo/pairing/message/polomessage.h \ 61 src/polo/pairing/message/secretackmessage.h \ 62 src/polo/pairing/message/secretmessage.h 63 64polo_util_includedir = $(includedir)/polo/util 65polo_util_include_HEADERS = \ 66 src/polo/util/certificateutil.h \ 67 src/polo/util/macros.h \ 68 src/polo/util/poloutil.h 69 70polo_wire_includedir = $(includedir)/polo/wire 71polo_wire_include_HEADERS = \ 72 src/polo/wire/polowireadapter.h \ 73 src/polo/wire/polowireinterface.h \ 74 src/polo/wire/polowirelistener.h 75 76polo_wire_protobuf_includedir = $(includedir)/polo/wire/protobuf 77polo_wire_protobuf_include_HEADERS = \ 78 src/polo/wire/protobuf/polo.pb.h \ 79 src/polo/wire/protobuf/protobufwireadapter.h 80 81docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) 82dist_doc_DATA = AUTHORS COPYING INSTALL ChangeLog README NEWS 83 84pkgconfigdir = $(libdir)/pkgconfig 85pkgconfig_DATA = polo.pc 86 87## unittests to run when people type 'make check'. 88TESTS = polo-test 89TESTS_ENVIRONMENT = 90check_SCRIPTS = 91# Every time you add a unittest to check_SCRIPTS, add it here too 92noinst_SCRIPTS = 93 94## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS 95 96protoc_inputs = \ 97 ../proto/polo.proto 98 99protoc_outputs = \ 100 src/polo/wire/protobuf/polo.pb.cc \ 101 src/polo/wire/protobuf/polo.pb.h 102 103BUILT_SOURCES = $(protoc_outputs) 104 105protoc_gen: $(protoc_inputs) 106 $(PROTOC) --proto_path=../proto \ 107 --cpp_out=$(srcdir)/src/polo/wire/protobuf \ 108 $(protoc_inputs) 109 touch protoc_gen 110 111$(protoc_outputs): protoc_gen 112 113libpolo_la_CXXFLAGS = $(PROTOBUF_CFLAGS) $(GLOG_CFLAGS) $(SSL_CFLAGS) \ 114 $(CRYPTO_CFLAGS) 115 116libpolo_la_LIBADD = $(PROTOBUF_LIBS) $(GLOG_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) 117libpolo_la_SOURCES = \ 118 src/polo/encoding/encodingoption.cc \ 119 src/polo/encoding/hexadecimalencoder.cc \ 120 src/polo/pairing/clientpairingsession.cc \ 121 src/polo/pairing/pairingcontext.cc \ 122 src/polo/pairing/pairingsession.cc \ 123 src/polo/pairing/polochallengeresponse.cc \ 124 src/polo/pairing/serverpairingsession.cc \ 125 src/polo/pairing/message/configurationackmessage.cc \ 126 src/polo/pairing/message/configurationmessage.cc \ 127 src/polo/pairing/message/optionsmessage.cc \ 128 src/polo/pairing/message/pairingrequestackmessage.cc \ 129 src/polo/pairing/message/pairingrequestmessage.cc \ 130 src/polo/pairing/message/polomessage.cc \ 131 src/polo/pairing/message/secretackmessage.cc \ 132 src/polo/pairing/message/secretmessage.cc \ 133 src/polo/util/certificateutil.cc \ 134 src/polo/util/poloutil.cc \ 135 src/polo/wire/polowireadapter.cc \ 136 src/polo/wire/protobuf/polo.pb.cc \ 137 src/polo/wire/protobuf/protobufwireadapter.cc 138 139polo_test_LDADD = libpolo.la libgtest.la libgmock.la 140 141polo_test_SOURCES = \ 142 tests/polo/polotests.cc \ 143 tests/polo/encoding/hexadecimalencodertest.cc \ 144 tests/polo/pairing/clientpairingsessiontest.cc \ 145 tests/polo/pairing/pairingsessiontest.cc \ 146 tests/polo/pairing/polochallengeresponsetest.cc \ 147 tests/polo/pairing/serverpairingsessiontest.cc \ 148 tests/polo/util/certificateutiltest.cc \ 149 tests/polo/util/poloutiltest.cc \ 150 tests/polo/wire/protobuf/protobufwireadaptertest.cc 151 152libgtest_la_SOURCES = $(GTEST_DIR)/src/gtest-all.cc 153 154libgmock_la_SOURCES = $(GMOCK_DIR)/src/gmock-all.cc 155 156## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS 157 158 159## This should always include $(TESTS), but may also include other 160## binaries that you compile but don't want automatically installed. 161noinst_PROGRAMS = $(TESTS) 162 163rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec 164 @cd packages && ./rpm.sh ${PACKAGE} ${VERSION} 165 166deb: dist-gzip packages/deb.sh packages/deb/* 167 @cd packages && ./deb.sh ${PACKAGE} ${VERSION} 168 169# Windows wants write permission to .vcproj files and maybe even sln files. 170dist-hook: 171 test ! -e "$(distdir)/vsprojects" \ 172 || chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ 173 174EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \ 175 autogen.sh $(SCRIPTS) src/solaris/libstdc++.la 176 177libtool: $(LIBTOOL_DEPS) 178 $(SHELL) ./config.status --recheck 179 180EXTRA_DIST += libtool 181 182CLEANFILES = $(protoc_ouputs) protoc_gen 183 184