Skip to content

Commit

Permalink
Build HTTP parser as separate library
Browse files Browse the repository at this point in the history
Change-Id: Ib3dc4d19cb0f40e0052fa9678c4d2278152508ad
Reviewed-on: http://review.couchbase.org/13894
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information
avsej authored and ingenthr committed Mar 14, 2012
1 parent 60d8f28 commit ceb228c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ACLOCAL_AMFLAGS = -I m4 --force

lib_LTLIBRARIES = libcouchbase.la
noinst_LTLIBRARIES =
noinst_LTLIBRARIES = libhttpparser.la
if BUILD_TOOLS
bin_PROGRAMS = tools/cbc
endif
Expand All @@ -45,6 +45,10 @@ pkginclude_HEADERS = \
include/libcouchbase/visibility.h \
include/libcouchbase/winsock_io_opts.h

libhttpparser_la_SOURCES = \
contrib/http_parser/http_parser.c \
contrib/http_parser/http_parser.h

libcouchbase_la_SOURCES = \
include/memcached/protocol_binary.h \
include/memcached/vbucket.h \
Expand Down Expand Up @@ -91,7 +95,8 @@ endif

libcouchbase_la_LDFLAGS= -version-info $(LIBCOUCHBASE_API_CURRENT):$(LIBCOUCHBASE_API_REVISION):$(LIBCOUCHBASE_API_AGE) -no-undefined
libcouchbase_la_CPPFLAGS=$(AM_CPPFLAGS) $(CPPFLAGS) -DLIBCOUCHBASE_INTERNAL=1
libcouchbase_la_LIBADD=-lvbucket $(LIBSASL)
libcouchbase_la_DEPENDENCIES=libhttpparser.la
libcouchbase_la_LIBADD=libhttpparser.la -lvbucket $(LIBSASL)

if LIBCOUCHBASE_ENABLE_TRACE
libcouchbase_la_SOURCES += \
Expand Down
4 changes: 2 additions & 2 deletions NMakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
INSTALL=..\deps
CC_NODEBUG = cl.exe /O2 /DNDEBUG /MD /LD
CC_DEBUG = cl.exe /Od /D_DEBUG /RTC1 /Z7 /LDd /W3 /MDd
CFLAGS = /Iinclude /Iwin32 /I$(INSTALL)\include /Isrc /I. /nologo /W3 /EHsc /DWIN32 /FD /c -D_CRT_SECURE_NO_WARNINGS -DLIBCOUCHBASE_INTERNAL=1
CFLAGS = /Iinclude /Iwin32 /Icontrib /I$(INSTALL)\include /Isrc /I. /nologo /W3 /EHsc /DWIN32 /FD /c -D_CRT_SECURE_NO_WARNINGS -DLIBCOUCHBASE_INTERNAL=1
DLLLDFLAGS = /dll /incremental:no /opt:ref,icf /version:1.1
LDFLAGS = /nologo /LIBPATH:$(INSTALL)\lib
LD = link.exe
Expand All @@ -37,7 +37,7 @@ libcouchbase_SOURCES = src\arithmetic.c src\base64.c src\behavior.c \
src\store.c src\strerror.c src\synchandler.c src\tap.c \
src\timeout.c src\timings.c src\touch.c src\utilities.c \
src\wait.c src\gethrtime.c src\plugin-win32.c src\isasl.c \
src\compat.c
src\compat.c contrib\http_parser\http_parser.c

# Unfortunately nmake is a bit limited in its substitute functions.
# Work around that by using dobj to represent debug object files ;)
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes

COUCHBASE_GENERIC_COMPILER(c99)
AM_CPPFLAGS="$AM_CPPFLAGS -I\${top_srcdir}/src"
AM_CPPFLAGS="$AM_CPPFLAGS -I\${top_srcdir}/src -I\${top_srcdir}/contrib"
CHANGESET=GIT_CHANGESET
AC_SUBST(CHANGESET)

Expand Down

0 comments on commit ceb228c

Please sign in to comment.