This commit is contained in:
Ryan Dahl 2010-10-29 23:49:39 +00:00
Родитель 7a48fd8455
Коммит ccdd979a69
5 изменённых файлов: 22 добавлений и 4 удалений

Просмотреть файл

@ -25,6 +25,10 @@ ifeq ($(platform),linux)
LINKFLAGS += -pthread -lrt LINKFLAGS += -pthread -lrt
endif endif
ifeq ($(platform),solaris)
WANT_SOCKET = 1
endif
ifdef WANT_OPENSSL ifdef WANT_OPENSSL
HAVE_OPENSSL = 1 HAVE_OPENSSL = 1
HAVE_CRYPTO = 1 HAVE_CRYPTO = 1
@ -35,6 +39,10 @@ ifdef WANT_OPENSSL
OPENSSL_LINKFLAGS += -lssl -lcrypto OPENSSL_LINKFLAGS += -lssl -lcrypto
endif endif
ifdef WANT_SOCKET
LINKFLAGS += -lsocket -lnsl
endif
ifneq (,$(findstring build/libnode.so,$(MAKEFLAGS))) ifneq (,$(findstring build/libnode.so,$(MAKEFLAGS)))
CFLAGS += -shared -fPIC CFLAGS += -shared -fPIC
#else #else
@ -44,6 +52,7 @@ endif
cflags += -pedantic cflags += -pedantic
debug_CPPDEFINES = -DDEBUG $(CFLAGS) debug_CPPDEFINES = -DDEBUG $(CFLAGS)
debug_CFLAGS = -Wall -O0 -ggdb $(CFLAGS) debug_CFLAGS = -Wall -O0 -ggdb $(CFLAGS)
debug_CXXFLAGS = $(debug_CFLAGS) debug_CXXFLAGS = $(debug_CFLAGS)
@ -384,8 +393,9 @@ docclean:
clean: clean:
-rm -f node node_g $(builddir)/node $(builddir)/node_g -rm -f node node_g $(builddir)/node $(builddir)/node_g
-find $(builddir) -name "*.o" -or -name "*.a" \ -find $(builddir) -name "*.o" | xargs rm -f
-or -name "*.so" -or -name "*.dylib" | xargs rm -f -find $(builddir) -name "*.so" | xargs rm -f
-find $(builddir) -name "*.dylib" | xargs rm -f
-find . -name "*.pyc" | xargs rm -f -find . -name "*.pyc" | xargs rm -f
distclean: docclean distclean: docclean

Просмотреть файл

@ -29,4 +29,5 @@ export srcdir VPATH PREFIX
HAVE_OPENSSL=@HAVE_OPENSSL@ HAVE_OPENSSL=@HAVE_OPENSSL@
WANT_SOCKET=@WANT_SOCKET@

2
configure поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
cd $(dirname "$0") cd `dirname "$0"`
autoconf --output configure.real autoconf --output configure.real
exec ./configure.real "$@" exec ./configure.real "$@"

Просмотреть файл

@ -116,6 +116,13 @@ AC_SEARCH_LIBS([dlopen], [dl dld], [], [
# TODO FIXME: Check for OpenSSL -- expect it to exist for now # TODO FIXME: Check for OpenSSL -- expect it to exist for now
AC_SUBST([HAVE_OPENSSL],[1]) AC_SUBST([HAVE_OPENSSL],[1])
# check for -lsocket on solaris
AC_CHECK_LIB([c], [socket], [WANT_SOCKET=], [WANT_SOCKET=1])
AC_SUBST(WANT_SOCKET)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Embedded dependencies # Embedded dependencies

Просмотреть файл