Support Watt-32 under Win32.
[platform/upstream/c-ares.git] / Makefile.netware
index 1bc0bcd..2e00b09 100644 (file)
@@ -14,14 +14,14 @@ NDKBASE     = c:/novell
 endif
 
 ifndef INSTDIR
-INSTDIR        = ../curl-$(LIBCURL_VERSION_STR)-bin-nw
+INSTDIR        = ../ares-$(LIBCARES_VERSION_STR)-bin-nw
 endif
 
 # Edit the vars below to change NLM target settings.
-TARGETS = adig.nlm ahost.nlm
+TARGETS = adig.nlm ahost.nlm acountry.nlm
 LTARGET = libcares.$(LIBEXT)
 VERSION        = $(LIBCARES_VERSION)
-COPYR  = Copyright (C) 1996 - 2007, Daniel Stenberg, <daniel@haxx.se>
+COPYR  = Copyright (C) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>
 DESCR  = cURL $(subst .def,,$(notdir $@)) $(LIBCARES_VERSION_STR) - http://curl.haxx.se
 MTSAFE = YES
 STACK  = 64000
@@ -63,18 +63,19 @@ else
        CC = gcc
 endif
 # a native win32 awk can be downloaded from here:
-# http://www.gknw.net/development/prgtools/awk-20050424.zip
+# http://www.gknw.net/development/prgtools/awk-20070501.zip
 AWK    = awk
 YACC   = bison -y
 CP     = cp -afv
+MKDIR  = mkdir
 # RM   = rm -f
 # if you want to mark the target as MTSAFE you will need a tool for
 # generating the xdc data for the linker; here's a minimal tool:
-# http://www.gknw.com/development/prgtools/mkxdc.zip
+# http://www.gknw.net/development/prgtools/mkxdc.zip
 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
@@ -161,10 +162,6 @@ nlm: prebuild $(TARGETS)
 
 prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h
 
-dist: all
-       -$(RM) $(OBJLIB) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
-       -$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
-
 install: $(INSTDIR) all
        @$(CP) *.nlm $(INSTDIR)
        @$(CP) ../CHANGES $(INSTDIR)
@@ -190,11 +187,8 @@ endif
        @-$(RM) $@
        @$(LD) $(LDFLAGS) $<
 
-$(INSTDIR):
-       @mkdir $(INSTDIR)
-
-$(OBJDIR):
-       @mkdir $(OBJDIR)
+$(OBJDIR) $(INSTDIR):
+       @$(MKDIR) $@
 
 $(OBJDIR)/%.o: %.c
 #      @echo Compiling $<
@@ -202,7 +196,7 @@ $(OBJDIR)/%.o: %.c
 
 $(OBJDIR)/version.inc: ares_version.h $(OBJDIR)
        @echo Creating $@
-       @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
+       @$(AWK) -f get_ver.awk $< > $@
 
 $(OBJDIR)/%.xdc: Makefile.netware
        @echo Creating $@
@@ -269,8 +263,9 @@ ifdef IMPORTS
        @echo $(DL)import $(IMPORTS)$(DL) >> $@
 endif
 ifeq ($(LD),nlmconv)
-       @echo $(DL)input $(OBJEXE)$(DL) >> $@
        @echo $(DL)input $(PRELUDE)$(DL) >> $@
+       @echo $(DL)input $(OBJEXE)$(DL) >> $@
+       @echo $(DL)input $(@:.def=.o)$(DL) >> $@
        @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
 endif
 
@@ -287,13 +282,19 @@ 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 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) >> $@
@@ -330,6 +331,14 @@ 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) >> $@
@@ -355,6 +364,7 @@ endif
        @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) >> $@
@@ -378,7 +388,6 @@ endif
        @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
        @echo $(DL)#define HAVE_UTIME_H 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) >> $@