aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2004-07-03 19:13:28 +0000
committerGunter Knauf <gk@gknw.de>2004-07-03 19:13:28 +0000
commit5b8816dcb7c2f7d34749834671b2c0cf0a622f3b (patch)
tree6ec75d32748c33de2f8f00e73961799789e449b2 /src
parentfc0df97278a6f9b95897c546d522500080b0de48 (diff)
modified to use new Makefile.inc to build up object list;
added generation of config.h and a prebuild target to create all neded files.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.netware134
1 files changed, 111 insertions, 23 deletions
diff --git a/src/Makefile.netware b/src/Makefile.netware
index 66d7d33da..6241a4e18 100644
--- a/src/Makefile.netware
+++ b/src/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 = curl
VERSION = $(LIBCURL_VERSION)
@@ -63,20 +71,17 @@ CP = cp -afv
MPKXDC = mkxdc
# Global flags for all compilers
-CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
-CFLAGS += -DUSE_MANUAL
+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
CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
CFLAGS += -relax_pointers
#CFLAGS += -w on
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"
@@ -89,8 +94,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
@@ -110,15 +113,16 @@ INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
ifdef ZLIB_PATH
INCLUDES += -I$(ZLIB_PATH)
- CFLAGS += -DHAVE_ZLIB_H -DHAVE_LIBZ
- IMPORTS+ = @$(ZLIB_PATH)/nw/zlib.imp
- MODULES+ = libz.nlm
+ IMPORTS += @$(ZLIB_PATH)/nw/zlib.imp
+ MODULES += libz.nlm
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_LDAP)/clib/inc
@@ -141,18 +145,16 @@ DL = '
#-include $(NDKBASE)/nlmconv/ncpfs.inc
endif
-OBJS = \
- $(OBJDIR)/main.o \
- $(OBJDIR)/hugehelp.o \
- $(OBJDIR)/urlglob.o \
- $(OBJDIR)/writeout.o \
- $(OBJDIR)/getpass.o \
- $(OBJDIR)/homedir.o \
- $(OBJDIR)/timeval.o
+include Makefile.inc
+
+OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES)))
+OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
vpath %.c ../lib
-all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
+all: prebuild $(TARGET).nlm
+
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
$(OBJDIR)/%.o: %.c
# @echo Compiling $<
@@ -170,6 +172,7 @@ install: $(INSTDIR) all
@$(CP) $(TARGET).nlm $(INSTDIR)
clean:
+ -$(RM) config.h hugehelp.c
-$(RM) -r $(OBJDIR)
$(INSTDIR):
@@ -178,7 +181,7 @@ $(INSTDIR):
$(OBJDIR):
@mkdir $(OBJDIR)
-$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
+$(TARGET).nlm: $(OBJS) $(OBJX) $(OBJDIR)/$(TARGET).def $(XDCDATA)
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
@@ -254,12 +257,97 @@ ifdef IMPORTS
endif
ifeq ($(LD),nlmconv)
@echo $(DL)input $(OBJS)$(DL) >> $@
+ @echo $(DL)input $(OBJX)$(DL) >> $@
@echo $(DL)input $(PRELUDE)$(DL) >> $@
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
endif
-hugehelp.c: hugehelp.c.cvs
+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 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_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
+
+hugehelp.c:
@echo Creating $@
- @$(CP) $< $@
+ @$(CP) hugehelp.c.cvs $@