mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
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.
This commit is contained in:
parent
fc0df97278
commit
5b8816dcb7
@ -11,11 +11,19 @@
|
|||||||
ifndef NDKBASE
|
ifndef NDKBASE
|
||||||
NDKBASE = c:/novell
|
NDKBASE = c:/novell
|
||||||
endif
|
endif
|
||||||
INSTDIR = ..\curl-$(LIBCURL_VERSION_STR)-bin-nw
|
|
||||||
|
|
||||||
# Edit the path below to point to the base of your Zlib sources.
|
# Edit the path below to point to the base of your Zlib sources.
|
||||||
#ZLIB_PATH = ../../zlib-1.2.1
|
#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.
|
# Edit the vars below to change NLM target settings.
|
||||||
TARGET = curl
|
TARGET = curl
|
||||||
VERSION = $(LIBCURL_VERSION)
|
VERSION = $(LIBCURL_VERSION)
|
||||||
@ -63,20 +71,17 @@ CP = cp -afv
|
|||||||
MPKXDC = mkxdc
|
MPKXDC = mkxdc
|
||||||
|
|
||||||
# Global flags for all compilers
|
# Global flags for all compilers
|
||||||
CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
|
CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
|
||||||
CFLAGS += -DUSE_MANUAL
|
|
||||||
|
|
||||||
ifeq ($(CC),mwccnlm)
|
ifeq ($(CC),mwccnlm)
|
||||||
LD = mwldnlm
|
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 += -gccinc -inline off -opt nointrinsics -proc 586
|
||||||
CFLAGS += -relax_pointers
|
CFLAGS += -relax_pointers
|
||||||
#CFLAGS += -w on
|
#CFLAGS += -w on
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
||||||
CFLAGS += -align 4
|
CFLAGS += -align 4
|
||||||
CFLAGS += -D_POSIX_SOURCE
|
|
||||||
# CFLAGS += -D__ANSIC__
|
|
||||||
else
|
else
|
||||||
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
|
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
|
||||||
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
|
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
|
||||||
@ -89,8 +94,6 @@ CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
|
|||||||
CFLAGS += -Wall # -pedantic
|
CFLAGS += -Wall # -pedantic
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
||||||
CFLAGS += -D_POSIX_SOURCE
|
|
||||||
# CFLAGS += -D__ANSIC__
|
|
||||||
else
|
else
|
||||||
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
||||||
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
|
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
|
||||||
@ -110,7 +113,6 @@ INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
|
|||||||
|
|
||||||
ifdef ZLIB_PATH
|
ifdef ZLIB_PATH
|
||||||
INCLUDES += -I$(ZLIB_PATH)
|
INCLUDES += -I$(ZLIB_PATH)
|
||||||
CFLAGS += -DHAVE_ZLIB_H -DHAVE_LIBZ
|
|
||||||
IMPORTS += @$(ZLIB_PATH)/nw/zlib.imp
|
IMPORTS += @$(ZLIB_PATH)/nw/zlib.imp
|
||||||
MODULES += libz.nlm
|
MODULES += libz.nlm
|
||||||
endif
|
endif
|
||||||
@ -119,6 +121,8 @@ ifeq ($(LIBARCH),LIBC)
|
|||||||
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
|
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
|
||||||
INCLUDES += -I$(SDK_LIBC)/include/winsock
|
INCLUDES += -I$(SDK_LIBC)/include/winsock
|
||||||
# INCLUDES += -I$(SDK_LDAP)/libc/inc
|
# INCLUDES += -I$(SDK_LDAP)/libc/inc
|
||||||
|
CFLAGS += -D_POSIX_SOURCE
|
||||||
|
# CFLAGS += -D__ANSIC__
|
||||||
else
|
else
|
||||||
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
|
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
|
||||||
# INCLUDES += -I$(SDK_LDAP)/clib/inc
|
# INCLUDES += -I$(SDK_LDAP)/clib/inc
|
||||||
@ -141,18 +145,16 @@ DL = '
|
|||||||
#-include $(NDKBASE)/nlmconv/ncpfs.inc
|
#-include $(NDKBASE)/nlmconv/ncpfs.inc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJS = \
|
include Makefile.inc
|
||||||
$(OBJDIR)/main.o \
|
|
||||||
$(OBJDIR)/hugehelp.o \
|
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES)))
|
||||||
$(OBJDIR)/urlglob.o \
|
OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
|
||||||
$(OBJDIR)/writeout.o \
|
|
||||||
$(OBJDIR)/getpass.o \
|
|
||||||
$(OBJDIR)/homedir.o \
|
|
||||||
$(OBJDIR)/timeval.o
|
|
||||||
|
|
||||||
vpath %.c ../lib
|
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
|
$(OBJDIR)/%.o: %.c
|
||||||
# @echo Compiling $<
|
# @echo Compiling $<
|
||||||
@ -170,6 +172,7 @@ install: $(INSTDIR) all
|
|||||||
@$(CP) $(TARGET).nlm $(INSTDIR)
|
@$(CP) $(TARGET).nlm $(INSTDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
-$(RM) config.h hugehelp.c
|
||||||
-$(RM) -r $(OBJDIR)
|
-$(RM) -r $(OBJDIR)
|
||||||
|
|
||||||
$(INSTDIR):
|
$(INSTDIR):
|
||||||
@ -178,7 +181,7 @@ $(INSTDIR):
|
|||||||
$(OBJDIR):
|
$(OBJDIR):
|
||||||
@mkdir $(OBJDIR)
|
@mkdir $(OBJDIR)
|
||||||
|
|
||||||
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
$(TARGET).nlm: $(OBJS) $(OBJX) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
||||||
@ -254,12 +257,97 @@ ifdef IMPORTS
|
|||||||
endif
|
endif
|
||||||
ifeq ($(LD),nlmconv)
|
ifeq ($(LD),nlmconv)
|
||||||
@echo $(DL)input $(OBJS)$(DL) >> $@
|
@echo $(DL)input $(OBJS)$(DL) >> $@
|
||||||
|
@echo $(DL)input $(OBJX)$(DL) >> $@
|
||||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||||
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
hugehelp.c: hugehelp.c.cvs
|
config.h: Makefile.netware
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@$(CP) $< $@
|
@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) hugehelp.c.cvs $@
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user