summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/Makefile
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-03-09 11:38:29 +0000
committerSteven Barth <steven@midlink.org>2009-03-09 11:38:29 +0000
commit4aa848533e40db16a00d5dd106bcc05621e3f949 (patch)
tree45372497f4a1425927dd468a6f7751dc402aa7df /libs/nixio/Makefile
parent589e680970d44e5bd006844bdeb6ed355c8d345b (diff)
Cicrumvent possible segfaults in axTLS
More compatibility
Diffstat (limited to 'libs/nixio/Makefile')
-rw-r--r--libs/nixio/Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/nixio/Makefile b/libs/nixio/Makefile
index f8d01b781..aca275170 100644
--- a/libs/nixio/Makefile
+++ b/libs/nixio/Makefile
@@ -5,7 +5,8 @@ include ../../build/gccconfig.mk
AXTLS_VERSION = 1.2.1
AXTLS_DIR = axTLS
AXTLS_FILE = $(AXTLS_DIR)-$(AXTLS_VERSION).tar.gz
-NIXIO_TLS ?= axtls
+NIXIO_TLS ?= openssl
+NIXIO_LDFLAGS =
NIXIO_OBJ = src/nixio.o src/socket.o src/sockopt.o src/bind.o src/address.o \
src/poll.o src/io.o src/file.o src/splice.o src/process.o \
@@ -13,15 +14,20 @@ NIXIO_OBJ = src/nixio.o src/socket.o src/sockopt.o src/bind.o src/address.o \
ifeq ($(NIXIO_TLS),axtls)
TLS_CFLAGS = -IaxTLS/{ssl,crypto,config} -include src/openssl-compat.h
- TLS_LDFLAGS =
TLS_DEPENDS = src/openssl-compat.o
NIXIO_OBJ += src/openssl-compat.o src/libaxtls.a
endif
ifeq ($(NIXIO_TLS),openssl)
- TLS_LDFLAGS = -lssl
+ NIXIO_LDFLAGS += -lssl
endif
+
+ifeq ($(OS),SunOS)
+ NIXIO_LDFLAGS += -lsocket -lnsl -lsendfile
+endif
+
+
%.o: %.c
$(COMPILE) $(NIXIO_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<
@@ -38,7 +44,7 @@ src/openssl-compat.o: src/libaxtls.a src/openssl-compat.c
compile: $(NIXIO_OBJ)
- $(LINK) $(SHLIB_FLAGS) $(TLS_LDFLAGS) -o src/nixio.so $(NIXIO_OBJ)
+ $(LINK) $(SHLIB_FLAGS) $(NIXIO_LDFLAGS) -o src/nixio.so $(NIXIO_OBJ)
mkdir -p dist$(LUA_LIBRARYDIR)
cp src/nixio.so dist$(LUA_LIBRARYDIR)/nixio.so
@@ -49,7 +55,7 @@ $(AXTLS_DIR)/.prepared:
touch $@
src/libaxtls.a: $(AXTLS_DIR)/.prepared
- $(MAKE) -C $(AXTLS_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS) $(FPIC) -Wall -pedantic -I../config -I../ssl -I../crypto" LDFLAGS="$(LDFLAGS)" OS="$(OS)" clean all
+ $(MAKE) -C $(AXTLS_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(EXTRA_CFLAGS) $(FPIC) '-Dalloca(size)=__builtin_alloca(size)' -Wall -pedantic -I../config -I../ssl -I../crypto" LDFLAGS="$(LDFLAGS)" OS="$(OS)" clean all
cp -p $(AXTLS_DIR)/_stage/libaxtls.a src
clean: luaclean