X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Makefile.netware;h=e1a8a5523ca07bdabb345699e254b7b648d7f494;hb=refs%2Fheads%2Ftizen_6.5_base;hp=e70d98c9929974d05215841f88f69134b7e27ebb;hpb=f1a99137a29b9b0cea340bd73e51ea41c6baa856;p=platform%2Fupstream%2Fc-ares.git diff --git a/Makefile.netware b/Makefile.netware index e70d98c..e1a8a55 100644 --- a/Makefile.netware +++ b/Makefile.netware @@ -1,5 +1,4 @@ ################################################################# -# $Id$ # ## Makefile for building libcares (NetWare version - gnu make) ## Use: make -f Makefile.netware @@ -21,7 +20,7 @@ endif TARGETS = adig.nlm ahost.nlm acountry.nlm LTARGET = libcares.$(LIBEXT) VERSION = $(LIBCARES_VERSION) -COPYR = Copyright (C) 1996 - 2008, Daniel Stenberg, +COPYR = $(LIBCARES_COPYRIGHT_STR) DESCR = cURL $(subst .def,,$(notdir $@)) $(LIBCARES_VERSION_STR) - http://curl.haxx.se MTSAFE = YES STACK = 64000 @@ -35,7 +34,7 @@ ifndef LIBARCH LIBARCH = LIBC endif -# must be equal to NDEBUG or DEBUG, CURLDEBUG +# must be equal to NDEBUG or DEBUG ifndef DB DB = NDEBUG endif @@ -75,7 +74,7 @@ MKDIR = mkdir MPKXDC = mkxdc # Global flags for all compilers -CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc +CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc ifeq ($(CC),mwccnlm) LD = mwldnlm @@ -104,8 +103,12 @@ AR = ar ARFLAGS = -cq LIBEXT = a RANLIB = ranlib -CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing -CFLAGS += -Wall -Wno-format -Wno-uninitialized # -pedantic +CFLAGS += -m32 +CFLAGS += -fno-builtin -fno-strict-aliasing +ifeq ($(findstring gcc,$(CC)),gcc) +CFLAGS += -fpcc-struct-return +endif +CFLAGS += -Wall # -pedantic ifeq ($(LIBARCH),LIBC) PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o else @@ -131,9 +134,7 @@ else # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete # INCLUDES += -I$(SDK_CLIB)/include endif -ifeq ($(DB),CURLDEBUG) -INCLUDES += -I../include -endif + CFLAGS += -I. $(INCLUDES) ifeq ($(MTSAFE),YES) @@ -143,7 +144,7 @@ ifeq ($(MTSAFE),NO) XDCOPT = -u endif -ifeq ($(findstring linux,$(OSTYPE)),linux) +ifeq ($(findstring /sh,$(SHELL)),/sh) DL = ' #-include $(NDKBASE)/nlmconv/ncpfs.inc endif @@ -160,7 +161,7 @@ lib: prebuild $(LTARGET) nlm: prebuild $(TARGETS) -prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h +prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc ares_config.h install: $(INSTDIR) all @$(CP) *.nlm $(INSTDIR) @@ -170,7 +171,7 @@ install: $(INSTDIR) all @$(CP) ../RELEASE-NOTES $(INSTDIR) clean: - -$(RM) $(LTARGET) $(TARGETS) config.h + -$(RM) $(LTARGET) $(TARGETS) ares_config.h -$(RM) -r $(OBJDIR) -$(RM) -r arpa @@ -269,7 +270,7 @@ ifeq ($(LD),nlmconv) @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@ endif -config.h: Makefile.netware +ares_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) >> $@ @@ -282,31 +283,34 @@ config.h: Makefile.netware @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@ ifeq ($(LIBARCH),CLIB) @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@ - @echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@ + @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@ + @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@ @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@ @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@ - @echo $(DL)#define socklen_t int$(DL) >> $@ - @echo $(DL)#define strncasecmp strnicmp$(DL) >> $@ - @echo $(DL)#define strcasecmp stricmp$(DL) >> $@ else @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@ @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@ @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@ @echo $(DL)#define HAVE_GETTIMEOFDAY 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_STDINT_H 1$(DL) >> $@ @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@ @@ -318,6 +322,9 @@ else @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@ @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@ @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@ + @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@ + @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@ + @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@ @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@ @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ @@ -325,31 +332,42 @@ else @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@ @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@ + @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@ @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@ @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@ @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@ - @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@ endif @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ - @echo $(DL)#define HAVE_ARPA_NAMESER_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_FIONBIO 1$(DL) >> $@ + @echo $(DL)#define HAVE_GETENV 1$(DL) >> $@ @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@ @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@ + @echo $(DL)#define HAVE_GETHOSTNAME 1$(DL) >> $@ @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@ @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@ @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@ - @echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@ + @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@ + @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@ + @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ @echo $(DL)#define HAVE_LL 1$(DL) >> $@ @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@ @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@ @echo $(DL)#define HAVE_RECV 1$(DL) >> $@ + @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@ @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@ @echo $(DL)#define HAVE_SEND 1$(DL) >> $@ @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@ @@ -372,9 +390,8 @@ endif @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@ @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@ @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@ + @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@ @echo $(DL)#define RETSIGTYPE void$(DL) >> $@ - @echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@ - @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@ @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@ ifdef NW_WINSOCK @@ -390,13 +407,24 @@ endif @echo $(DL)#else$(DL) >> $@ @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@ @echo $(DL)#endif$(DL) >> $@ -ifdef OLD_NOVELLSDK - @echo $(DL)#define socklen_t int$(DL) >> $@ -endif - -arpa/nameser.h: nameser.h - @echo Fix missing header $@ - @-mkdir arpa - @$(CP) $< arpa +FORCE: ; +ares_build.h: Makefile.netware FORCE + @echo Creating $@ + @echo $(DL)/* $@ intended 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)#ifndef NETWARE$(DL) >> $@ + @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ + @echo $(DL)#endif$(DL) >> $@ + @echo $(DL)#ifndef __CARES_BUILD_H$(DL) >> $@ + @echo $(DL)#define __CARES_BUILD_H$(DL) >> $@ +ifeq ($(LIBARCH),CLIB) + @echo $(DL)#define CARES_TYPEOF_ARES_SOCKLEN_T int$(DL) >> $@ +else + @echo $(DL)#define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int$(DL) >> $@ +endif + @echo $(DL)typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;$(DL) >> $@ + @echo $(DL)#endif /* __CARES_BUILD_H */$(DL) >> $@