tizen 2.3.1 release
[external/curl.git] / lib / Makefile.netware
index bce429e..2cd754a 100644 (file)
@@ -14,17 +14,22 @@ endif
 
 # Edit the path below to point to the base of your Zlib sources.
 ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.5
+ZLIB_PATH = ../../zlib-1.2.8
 endif
 
 # Edit the path below to point to the base of your OpenSSL package.
 ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8q
+OPENSSL_PATH = ../../openssl-0.9.8zc
 endif
 
 # Edit the path below to point to the base of your LibSSH2 package.
 ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2.7
+LIBSSH2_PATH = ../../libssh2-1.4.3
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../axTLS-1.2.7
 endif
 
 # Edit the path below to point to the base of your libidn package.
@@ -37,6 +42,16 @@ ifndef LIBRTMP_PATH
 LIBRTMP_PATH = ../../librtmp-2.3
 endif
 
+# Edit the path below to point to the base of your nghttp2 package.
+ifndef NGHTTP2_PATH
+NGHTTP2_PATH = ../../nghttp2-0.6.7
+endif
+
+# Edit the path below to point to the base of your fbopenssl package.
+ifndef FBOPENSSL_PATH
+FBOPENSSL_PATH = ../../fbopenssl-0.4
+endif
+
 # Edit the path below to point to the base of your c-ares package.
 ifndef LIBCARES_PATH
 LIBCARES_PATH = ../ares
@@ -54,7 +69,8 @@ DESCR = cURL libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
 MTSAFE = YES
 STACK  = 64000
 SCREEN = none
-EXPORTS        = @libcurl.imp
+EXPORTF        = $(TARGET).imp
+EXPORTS        = @$(EXPORTF)
 
 # Uncomment the next line to enable linking with POSIX semantics.
 # POSIXFL = 1
@@ -90,7 +106,7 @@ else
 endif
 PERL   = perl
 # Here you can find a native Win32 binary of the original awk:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
 AWK    = awk
 CP     = cp -afv
 MKDIR  = mkdir
@@ -140,7 +156,11 @@ AR = ar
 ARFLAGS        = -cq
 LIBEXT = a
 RANLIB = ranlib
-CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
+CFLAGS  += -m32
+CFLAGS += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS += -fpcc-struct-return
+endif
 CFLAGS += -Wall # -pedantic
 ifeq ($(LIBARCH),LIBC)
 ifeq ($(POSIXFL),1)
@@ -172,6 +192,48 @@ CURL_LIB = ../lib
 
 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
 
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+ifeq ($(findstring -srp,$(CFG)),-srp)
+ifeq "$(wildcard $(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl/srp.h)" "$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl/srp.h"
+WITH_SRP = 1
+endif
+endif
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
+WITH_NGHTTP2 = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
 ifdef WITH_ARES
        INCLUDES += -I$(LIBCARES_PATH)
        LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
@@ -195,6 +257,17 @@ ifdef WITH_SSL
        LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
        IMPORTS += GetProcessSwitchCount RunningProcess
        INSTDEP += ca-bundle.crt
+else
+ifdef WITH_AXTLS
+       INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+       LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+       MODULES += libaxtls.nlm
+       IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+       INSTDEP += ca-bundle.crt
+endif
 endif
 ifdef WITH_ZLIB
        INCLUDES += -I$(ZLIB_PATH)
@@ -209,6 +282,10 @@ ifdef WITH_IDN
        INCLUDES += -I$(LIBIDN_PATH)/include
        LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
 endif
+ifdef WITH_NGHTTP2
+       INCLUDES += -I$(NGHTTP2_PATH)/include
+       LDLIBS += $(NGHTTP2_PATH)/lib/libnghttp2.$(LIBEXT)
+endif
 
 ifeq ($(LIBARCH),LIBC)
        INCLUDES += -I$(NDK_LIBC)/include
@@ -248,10 +325,12 @@ endif
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
 
-OBJS   := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES))) $(OBJDIR)/nwos.o
+OBJS   := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(notdir $(CSOURCES)))) $(OBJDIR)/nwos.o
 
 OBJL   = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
 
+vpath %.c . vtls
+
 all: lib nlm
 
 nlm: prebuild $(TARGET).nlm
@@ -264,7 +343,7 @@ $(OBJDIR)/%.o: %.c
 #      @echo Compiling $<
        $(CC) $(CFLAGS) -c $< -o $@
 
-$(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR)
+$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
        @echo Creating $@
        @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
 
@@ -284,7 +363,7 @@ clean:
        -$(RM) -r $(OBJDIR)
 
 distclean vclean: clean
-       -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm
+       -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm $(TARGET).imp
        -$(RM) certdata.txt ca-bundle.crt
 
 $(OBJDIR) $(INSTDIR):
@@ -298,7 +377,7 @@ ifdef RANLIB
        @$(RANLIB) $@
 endif
 
-$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(XDCDATA)
+$(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(EXPORTF) $(XDCDATA)
        @echo Linking $@
        @-$(RM) $@
        @$(LD) $(LDFLAGS) $<
@@ -478,6 +557,7 @@ endif
        @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
        @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
+       @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
@@ -563,6 +643,17 @@ ifdef WITH_SSL
        @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
        @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
        @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
+ifdef WITH_SRP
+       @echo $(DL)#define HAVE_SSLEAY_SRP 1$(DL) >> $@
+       @echo $(DL)#define USE_TLS_SRP 1$(DL) >> $@
+endif
+ifdef WITH_SPNEGO
+       @echo $(DL)#define HAVE_SPNEGO 1$(DL) >> $@
+endif
+else
+ifdef WITH_AXTLS
+       @echo $(DL)#define USE_AXTLS 1$(DL) >> $@
+endif
 endif
 ifdef WITH_SSH2
        @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
@@ -575,6 +666,9 @@ endif
 ifdef WITH_RTMP
        @echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@
 endif
+ifdef WITH_NGHTTP2
+       @echo $(DL)#define USE_NGHTTP2 1$(DL) >> $@
+endif
        @echo $(DL)#ifdef __GNUC__$(DL) >> $@
        @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
        @echo $(DL)#else$(DL) >> $@
@@ -586,6 +680,10 @@ else
        @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
 endif
 
+$(EXPORTF): $(CURL_INC)/curl/curl.h $(CURL_INC)/curl/easy.h $(CURL_INC)/curl/multi.h $(CURL_INC)/curl/mprintf.h
+       @echo Creating $@
+       @$(AWK) -f ../packages/NetWare/get_exp.awk $^ > $@
+
 FORCE: ;
 
 info: $(OBJDIR)/version.inc
@@ -601,6 +699,11 @@ ifdef WITH_SSL
 else
        @echo SSL support:     no
 endif
+ifdef WITH_SRP
+       @echo SRP support:     enabled
+else
+       @echo SRP support:     no
+endif
 ifdef WITH_SSH2
        @echo SSH2 support:    enabled (libssh2)
 else
@@ -611,24 +714,22 @@ ifdef WITH_ZLIB
 else
        @echo zlib support:    no
 endif
+ifdef WITH_NGHTTP2
+       @echo http2 support:   enabled
+else
+       @echo http2 support:   no
+endif
 ifdef WITH_ARES
        @echo c-ares support:  enabled
 else
        @echo c-ares support:  no
 endif
 ifdef ENABLE_IPV6
-       @echo ipv6 support:    enabled
+       @echo IPv6 support:    enabled
 else
-       @echo ipv6 support:    no
+       @echo IPv6 support:    no
 endif
 
-$(LIBCARES_PATH)/libcares.$(LIBEXT):
-       $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
-
-ca-bundle.crt: mk-ca-bundle.pl
-       @echo Creating $@
-       @-$(PERL) $< -b -n $@
-
 $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
        @echo Creating $@
        @echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
@@ -667,3 +768,10 @@ endif
        @echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@
        @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@
 
+$(LIBCARES_PATH)/libcares.$(LIBEXT):
+       $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
+
+ca-bundle.crt: mk-ca-bundle.pl
+       @echo Creating $@
+       @-$(PERL) $< -b -n $@
+