From 8d75fe7c927277958d3cf27d43133e1f925973c3 Mon Sep 17 00:00:00 2001 From: Jim Morrison Date: Tue, 31 Jan 2012 10:07:35 -0800 Subject: [PATCH 1/4] Add ignoreable files --- .gitignore | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.gitignore b/.gitignore index d6ff91a..2d8009d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,25 @@ *~ *.o +*.lo +depcomp +*.m4 +Makefile +Makefile.in +libtool +missing +autom4te.cache/ +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +install-sh +.deps/ +lib/includes/spdylay/spdylayver.h +lib/libspdylay.pc +ltmain.sh +stamp-h1 +.deps/ +INSTALL From cd799479fa7d8ec609fd61761a38fd6011ff01ed Mon Sep 17 00:00:00 2001 From: Jim Morrison Date: Tue, 31 Jan 2012 10:09:42 -0800 Subject: [PATCH 2/4] Document mostly obvious build steps --- README.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.rst b/README.rst index e9c80c5..18c024f 100644 --- a/README.rst +++ b/README.rst @@ -38,3 +38,16 @@ get a resource given in the command-line:: Please note that OpenSSL with `NPN `_ support is required in order to build and run ``spdycat``. + +============== +Build from git +============== + +Building from git is easy, but please be sure that at least autoconf 2.68 is +used. + +autoreconf -i +automake +autoconf +./configure +make From a0c457cc6a633bec847d1889484cdb9ea96d3b11 Mon Sep 17 00:00:00 2001 From: Jim Morrison Date: Tue, 31 Jan 2012 10:11:03 -0800 Subject: [PATCH 3/4] Ignore built libraries --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2d8009d..8aa755b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *~ *.o *.lo +*.la depcomp *.m4 Makefile @@ -17,6 +18,7 @@ config.sub configure install-sh .deps/ +.libs lib/includes/spdylay/spdylayver.h lib/libspdylay.pc ltmain.sh From 40db6885b7bfd68a7eb6ba3820e2578c1c39a2a6 Mon Sep 17 00:00:00 2001 From: Jim Morrison Date: Tue, 31 Jan 2012 11:10:09 -0800 Subject: [PATCH 4/4] Automake-zie the examples directory --- Makefile.am | 2 +- configure.ac | 2 ++ examples/.gitignore | 1 + examples/{Makefile => Makefile.am} | 34 ++++++------------------------ 4 files changed, 10 insertions(+), 29 deletions(-) create mode 100644 examples/.gitignore rename examples/{Makefile => Makefile.am} (64%) diff --git a/Makefile.am b/Makefile.am index ad8bb86..75014e2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -SUBDIRS = lib tests +SUBDIRS = lib tests examples ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index c66aa8c..fadf0c9 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ AC_CONFIG_HEADERS([config.h]) dnl Checks for programs AC_PROG_CC +AC_PROG_CXX AM_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_LN_S @@ -86,6 +87,7 @@ AC_CONFIG_FILES([ lib/includes/Makefile lib/includes/spdylay/spdylayver.h tests/Makefile + examples/Makefile ]) AC_OUTPUT diff --git a/examples/.gitignore b/examples/.gitignore new file mode 100644 index 0000000..76f4335 --- /dev/null +++ b/examples/.gitignore @@ -0,0 +1 @@ +spdycat diff --git a/examples/Makefile b/examples/Makefile.am similarity index 64% rename from examples/Makefile rename to examples/Makefile.am index d81e0f5..30db37b 100644 --- a/examples/Makefile +++ b/examples/Makefile.am @@ -20,34 +20,12 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -CC = gcc -CXX = g++ -CFLAGS = -Wall -g -O2 -I../lib/includes -CXXFLAGS = $(CFLAGS) -LDFLAGS = -L../lib/.libs -LIBS = -lspdylay -lssl -lcrypto -PROGRAMS = spdycat -SPDYCAT_OBJS = spdycat.o spdylay_ssl.o util.o uri.o +AM_CFLAGS = -Wall +AM_CPPFLAGS = -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes `pkg-config --cflags libssl` +AM_LDFLAGS = `pkg-config --libs libssl` +LDADD = $(top_builddir)/lib/libspdylay.la -.PHONY: all -all: $(PROGRAMS) +bin_PROGRAMS = spdycat -util.o: util.cc util.h - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $< - -uri.o: uri.cc uri.h - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $< - -spdylay_ssl.o: spdylay_ssl.cc spdylay_ssl.h - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $< - -spdycat.o: spdycat.cc - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $< - -spdycat: $(SPDYCAT_OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $(SPDYCAT_OBJS) -o $@ $(LIBS) - -.PHONY: clean -clean: - rm -f *.o $(PROGRAMS) +spdycat_SOURCES = uri.cc spdylay_ssl.cc util.cc spdycat.cc