@ -21,16 +21,22 @@
PLATFORM ?= $( shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"' )
PLATFORM ?= $( shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"' )
HELPER ?=
HELPER ?=
BINEXT ?=
BINEXT ?=
SOLIBNAME = libhttp_parser
SOMAJOR = 2
SOMINOR = 7
SOREV = 1
i f e q ( d a r w i n , $( PLATFORM ) )
i f e q ( d a r w i n , $( PLATFORM ) )
SONAME ?= libhttp_parser.2.7.1.dylib
SOEXT ?= dylib
SOEXT ?= dylib
SONAME ?= $( SOLIBNAME) .$( SOMAJOR) .$( SOMINOR) .$( SOEXT)
LIBNAME ?= $( SOLIBNAME) .$( SOMAJOR) .$( SOMINOR) .$( SOREV) .$( SOEXT)
e l s e i f e q ( w i n e , $( PLATFORM ) )
e l s e i f e q ( w i n e , $( PLATFORM ) )
CC = winegcc
CC = winegcc
BINEXT = .exe.so
BINEXT = .exe.so
HELPER = wine
HELPER = wine
e l s e
e l s e
SONAME ?= libhttp_parser.so.2.7.1
SOEXT ?= so
SOEXT ?= so
SONAME ?= $( SOLIBNAME) .$( SOEXT) .$( SOMAJOR) .$( SOMINOR)
LIBNAME ?= $( SOLIBNAME) .$( SOEXT) .$( SOMAJOR) .$( SOMINOR) .$( SOREV)
e n d i f
e n d i f
CC ?= gcc
CC ?= gcc
@ -102,7 +108,7 @@ libhttp_parser.o: http_parser.c http_parser.h Makefile
$( CC) $( CPPFLAGS_FAST) $( CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
$( CC) $( CPPFLAGS_FAST) $( CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
library : libhttp_parser .o
library : libhttp_parser .o
$( CC) $( LDFLAGS_LIB) -o $( SO NAME) $<
$( CC) $( LDFLAGS_LIB) -o $( LIB NAME) $<
package : http_parser .o
package : http_parser .o
$( AR) rcs libhttp_parser.a http_parser.o
$( AR) rcs libhttp_parser.a http_parser.o
@ -124,13 +130,15 @@ tags: http_parser.c http_parser.h test.c
install : library
install : library
$( INSTALL) -D http_parser.h $( INCLUDEDIR) /http_parser.h
$( INSTALL) -D http_parser.h $( INCLUDEDIR) /http_parser.h
$( INSTALL) -D $( SONAME) $( LIBDIR) /$( SONAME)
$( INSTALL) -D $( LIBNAME) $( LIBDIR) /$( LIBNAME)
ln -s $( LIBDIR) /$( SONAME) $( LIBDIR) /libhttp_parser.$( SOEXT)
ln -s $( LIBDIR) /$( LIBNAME) $( LIBDIR) /$( SONAME)
ln -s $( LIBDIR) /$( LIBNAME) $( LIBDIR) /$( SOLIBNAME) .$( SOEXT)
install-strip : library
install-strip : library
$( INSTALL) -D http_parser.h $( INCLUDEDIR) /http_parser.h
$( INSTALL) -D http_parser.h $( INCLUDEDIR) /http_parser.h
$( INSTALL) -D -s $( SONAME) $( LIBDIR) /$( SONAME)
$( INSTALL) -D -s $( LIBNAME) $( LIBDIR) /$( LIBNAME)
ln -s $( LIBDIR) /$( SONAME) $( LIBDIR) /libhttp_parser.$( SOEXT)
ln -s $( LIBDIR) /$( LIBNAME) $( LIBDIR) /$( SONAME)
ln -s $( LIBDIR) /$( LIBNAME) $( LIBDIR) /$( SOLIBNAME) .$( SOEXT)
uninstall :
uninstall :
rm $( INCLUDEDIR) /http_parser.h
rm $( INCLUDEDIR) /http_parser.h