aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Makefile.netware188
1 files changed, 120 insertions, 68 deletions
diff --git a/lib/Makefile.netware b/lib/Makefile.netware
index 4d8381643..e0c763ab1 100644
--- a/lib/Makefile.netware
+++ b/lib/Makefile.netware
@@ -11,11 +11,19 @@
ifndef NDKBASE
NDKBASE = c:/novell
endif
-INSTDIR = ..\curl-$(LIBCURL_VERSION_STR)-bin-nw
# Edit the path below to point to the base of your Zlib sources.
#ZLIB_PATH = ../../zlib-1.2.1
+# Edit the path below to point to the base of your OpenSSL package.
+ifndef OPENSSL_PATH
+OPENSSL_PATH = ../../openssl-0.9.7d
+endif
+
+ifndef INSTDIR
+INSTDIR = ../curl-$(LIBCURL_VERSION_STR)-bin-nw
+endif
+
# Edit the vars below to change NLM target settings.
TARGET = libcurl
VERSION = $(LIBCURL_VERSION)
@@ -53,6 +61,7 @@ ifdef METROWERKS
else
CC = gcc
endif
+YACC = bison -y
CP = cp -afv
# RM = rm -f
# if you want to mark the target as MTSAFE you will need a tool for
@@ -61,11 +70,11 @@ CP = cp -afv
MPKXDC = mkxdc
# Global flags for all compilers
-CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
+CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
ifeq ($(CC),mwccnlm)
LD = mwldnlm
-LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
+LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(TARGET).nlm -commandfile
AR = mwldnlm
ARFLAGS = -type library -w nocmdline $(OBJDIR)/*.o -o
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
@@ -74,8 +83,6 @@ CFLAGS += -relax_pointers
ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4
- CFLAGS += -D_POSIX_SOURCE
-# CFLAGS += -D__ANSIC__
else
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
@@ -90,8 +97,6 @@ CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
CFLAGS += -Wall # -pedantic
ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
- CFLAGS += -D_POSIX_SOURCE
-# CFLAGS += -D__ANSIC__
else
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
@@ -107,17 +112,26 @@ SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
INCLUDES = -I. -I../include
+ifdef WITH_ARES
+ INCLUDES += -I../ares
+ LFLAGS += -L../ares -lcares
+endif
ifdef ZLIB_PATH
INCLUDES += -I$(ZLIB_PATH)
- CFLAGS += -DHAVE_ZLIB_H -DHAVE_LIBZ
IMPORTS = @$(ZLIB_PATH)/nw/zlib.imp
MODULES = libz.nlm
endif
+ifdef SSL
+ INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_libc -I$(OPENSSL_PATH)/outinc_nw_libc/openssl
+ LFLAGS += -L$(OPENSSL_PATH)/out_nw_libc -crypto -lssl
+endif
ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
INCLUDES += -I$(SDK_LIBC)/include/winsock
# INCLUDES += -I$(SDK_LDAP)/libc/inc
+ CFLAGS += -D_POSIX_SOURCE
+ # CFLAGS += -D__ANSIC__
else
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
@@ -141,66 +155,19 @@ DL = '
#-include $(NDKBASE)/nlmconv/ncpfs.inc
endif
-OBJS = \
- $(OBJDIR)/file.o \
- $(OBJDIR)/timeval.o \
- $(OBJDIR)/base64.o \
- $(OBJDIR)/hostip.o \
- $(OBJDIR)/progress.o \
- $(OBJDIR)/formdata.o \
- $(OBJDIR)/cookie.o \
- $(OBJDIR)/http.o \
- $(OBJDIR)/sendf.o \
- $(OBJDIR)/ftp.o \
- $(OBJDIR)/url.o \
- $(OBJDIR)/dict.o \
- $(OBJDIR)/if2ip.o \
- $(OBJDIR)/speedcheck.o \
- $(OBJDIR)/getdate.o \
- $(OBJDIR)/transfer.o \
- $(OBJDIR)/ldap.o \
- $(OBJDIR)/ssluse.o \
- $(OBJDIR)/version.o \
- $(OBJDIR)/getenv.o \
- $(OBJDIR)/escape.o \
- $(OBJDIR)/mprintf.o \
- $(OBJDIR)/telnet.o \
- $(OBJDIR)/netrc.o \
- $(OBJDIR)/getinfo.o \
- $(OBJDIR)/strequal.o \
- $(OBJDIR)/easy.o \
- $(OBJDIR)/security.o \
- $(OBJDIR)/krb4.o \
- $(OBJDIR)/memdebug.o \
- $(OBJDIR)/http_chunks.o \
- $(OBJDIR)/strtok.o \
- $(OBJDIR)/connect.o \
- $(OBJDIR)/hash.o \
- $(OBJDIR)/llist.o \
- $(OBJDIR)/multi.o \
- $(OBJDIR)/share.o \
- $(OBJDIR)/content_encoding.o \
- $(OBJDIR)/http_digest.o \
- $(OBJDIR)/http_negotiate.o \
- $(OBJDIR)/http_ntlm.o \
- $(OBJDIR)/md5.o \
- $(OBJDIR)/strtoofft.o \
- $(OBJDIR)/strerror.o \
- $(OBJDIR)/hostares.o \
- $(OBJDIR)/hostasyn.o \
- $(OBJDIR)/hostip4.o \
- $(OBJDIR)/hostip6.o \
- $(OBJDIR)/hostsyn.o \
- $(OBJDIR)/hostthre.o \
- $(OBJDIR)/inet_ntop.o \
+include Makefile.inc
+
+OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES)))
OBJL = $(OBJS) $(OBJDIR)/nwlib.o
-nlm: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
+all: lib nlm
-lib: $(OBJDIR) $(OBJDIR)/$(TARGET).lib
+nlm: prebuild $(TARGET).nlm
-all: lib nlm
+lib: prebuild $(TARGET).lib
+
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h ca-bundle.h getdate.c
$(OBJDIR)/%.o: %.c
# @echo Compiling $<
@@ -216,12 +183,14 @@ dist: all
install: $(INSTDIR) all
@$(CP) $(TARGET).nlm $(INSTDIR)
+ @$(CP) $(TARGET).lib $(INSTDIR)
@$(CP) ../CHANGES $(INSTDIR)
@$(CP) ../COPYING $(INSTDIR)
@$(CP) ../README $(INSTDIR)
@$(CP) ../RELEASE-NOTES $(INSTDIR)
clean:
+ -$(RM) config.h ca-bundle.h y.tab.c getdate.c
-$(RM) -r $(OBJDIR)
$(INSTDIR):
@@ -230,12 +199,12 @@ $(INSTDIR):
$(OBJDIR):
@mkdir $(OBJDIR)
-$(OBJDIR)/$(TARGET).lib: $(OBJS)
+$(TARGET).lib: $(OBJS)
@echo Creating $@
@-$(RM) $@
@$(AR) $(ARFLAGS) $@ $^
-$(OBJDIR)/$(TARGET).nlm: $(OBJL) $(OBJDIR)/$(TARGET).def $(XDCDATA)
+$(TARGET).nlm: $(OBJL) $(OBJDIR)/$(TARGET).def $(XDCDATA)
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
@@ -304,11 +273,94 @@ ifdef IMPORTS
@echo $(DL)import $(IMPORTS)$(DL) >> $@
endif
ifeq ($(LD),nlmconv)
- @echo $(DL)input $(OBJS)$(DL) >> $@
+ @echo $(DL)input $(OBJL)$(DL) >> $@
@echo $(DL)input $(PRELUDE)$(DL) >> $@
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
endif
+config.h: Makefile.netware
+ @echo Creating $@
+ @echo $(DL)/* $@ for NetWare target.$(DL) > $@
+ @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
+ @echo $(DL)** All your changes will be lost!!$(DL) >> $@
+ @echo $(DL)*/$(DL) >> $@
+ @echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
+ @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
+ @echo $(DL)#define PACKAGE_BUGREPORT "curl-bug@haxx.se"$(DL) >> $@
+ @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
+ @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
+ @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
+ @echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
+ @echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
+ @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
+ @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
+ @echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
+ @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
+ @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
+ifdef NW_WINSOCK
+ @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
+else
+ @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
+endif
+ifdef WITH_ARES
+ @echo $(DL)#define USE_ARES 1$(DL) >> $@
+endif
+ifdef ZLIB_PATH
+ @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
+endif
+ifdef SSL
+ @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
+ @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
+endif
+ifdef OLD_NOVELLSDK
+ @echo $(DL)#define socklen_t int$(DL) >> $@
+endif
+
ca-bundle.h: Makefile.netware
@echo Creating $@
@echo $(DL)/* Do not edit this file - it is created by make!$(DL) > $@
@@ -316,10 +368,10 @@ ca-bundle.h: Makefile.netware
@echo $(DL)*/$(DL) >> $@
@echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
-getdate.c: getdate.c.cvs
+getdate.c:
@echo Creating $@
@-$(RM) getdate.y
- @$(CP) $< $@
+ @$(CP) getdate.c.cvs $@
url.c: ca-bundle.h