Makefile.netware 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. #################################################################
  2. # $Id$
  3. #
  4. ## Makefile for building curl.nlm (NetWare version - gnu make)
  5. ## Use: make -f Makefile.netware
  6. ##
  7. ## Comments to: Guenter Knauf http://www.gknw.de/phpbb
  8. #
  9. #################################################################
  10. # Edit the path below to point to the base of your Novell NDK.
  11. ifndef NDKBASE
  12. NDKBASE = c:/novell
  13. endif
  14. # Edit the path below to point to the base of your Zlib sources.
  15. ifndef ZLIB_PATH
  16. ZLIB_PATH = ../../zlib-1.2.3
  17. endif
  18. # Edit the path below to point to the base of your OpenSSL package.
  19. ifndef OPENSSL_PATH
  20. OPENSSL_PATH = ../../openssl-0.9.8k
  21. endif
  22. # Edit the path below to point to the base of your LibSSH2 package.
  23. ifndef LIBSSH2_PATH
  24. LIBSSH2_PATH = ../../libssh2-1.1
  25. endif
  26. # Edit the path below to point to the base of your libidn package.
  27. ifndef LIBIDN_PATH
  28. LIBIDN_PATH = ../../libidn-1.13
  29. endif
  30. ifndef INSTDIR
  31. INSTDIR = ..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw
  32. endif
  33. # Edit the vars below to change NLM target settings.
  34. TARGET = curl
  35. VERSION = $(LIBCURL_VERSION)
  36. COPYR = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
  37. DESCR = cURL $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
  38. MTSAFE = YES
  39. STACK = 64000
  40. SCREEN = $(TARGET) commandline utility
  41. # Comment the line below if you dont want to load protected automatically.
  42. # LDRING = 3
  43. # Uncomment the next line to enable linking with POSIX semantics.
  44. # POSIXFL = 1
  45. # Edit the var below to point to your lib architecture.
  46. ifndef LIBARCH
  47. LIBARCH = LIBC
  48. endif
  49. # must be equal to NDEBUG or DEBUG, CURLDEBUG
  50. ifndef DB
  51. DB = NDEBUG
  52. endif
  53. # Optimization: -O<n> or debugging: -g
  54. ifeq ($(DB),NDEBUG)
  55. OPT = -O2
  56. OBJDIR = release
  57. else
  58. OPT = -g
  59. OBJDIR = debug
  60. endif
  61. # The following lines defines your compiler.
  62. ifdef CWFolder
  63. METROWERKS = $(CWFolder)
  64. endif
  65. ifdef METROWERKS
  66. # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
  67. MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
  68. CC = mwccnlm
  69. else
  70. CC = gcc
  71. endif
  72. PERL = perl
  73. # a native win32 awk can be downloaded from here:
  74. # http://www.gknw.net/development/prgtools/awk-20070501.zip
  75. AWK = awk
  76. CP = cp -afv
  77. MKDIR = mkdir
  78. # RM = rm -f
  79. # if you want to mark the target as MTSAFE you will need a tool for
  80. # generating the xdc data for the linker; here's a minimal tool:
  81. # http://www.gknw.net/development/prgtools/mkxdc.zip
  82. MPKXDC = mkxdc
  83. # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
  84. LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
  85. # Include the version info retrieved from curlver.h
  86. -include $(OBJDIR)/version.inc
  87. # Global flags for all compilers
  88. CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
  89. ifeq ($(CC),mwccnlm)
  90. LD = mwldnlm
  91. LDFLAGS = -nostdlib $(OBJS) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
  92. LIBEXT = lib
  93. CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
  94. CFLAGS += -relax_pointers
  95. #CFLAGS += -w on
  96. ifeq ($(LIBARCH),LIBC)
  97. ifeq ($(POSIXFL),1)
  98. PRELUDE = $(SDK_LIBC)/imports/posixpre.o
  99. else
  100. PRELUDE = $(SDK_LIBC)/imports/libcpre.o
  101. endif
  102. CFLAGS += -align 4
  103. else
  104. # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
  105. # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
  106. PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
  107. # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
  108. CFLAGS += -align 1
  109. endif
  110. else
  111. LD = nlmconv
  112. LDFLAGS = -T
  113. LIBEXT = a
  114. CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
  115. CFLAGS += -Wall # -pedantic
  116. ifeq ($(LIBARCH),LIBC)
  117. ifeq ($(POSIXFL),1)
  118. PRELUDE = $(SDK_LIBC)/imports/posixpre.gcc.o
  119. else
  120. PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
  121. endif
  122. else
  123. # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
  124. # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
  125. # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
  126. PRELUDE = $(NDK_ROOT)/pre/prelude.o
  127. CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
  128. endif
  129. endif
  130. NDK_ROOT = $(NDKBASE)/ndk
  131. SDK_CLIB = $(NDK_ROOT)/nwsdk
  132. SDK_LIBC = $(NDK_ROOT)/libc
  133. SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
  134. CURL_INC = ../include
  135. CURL_LIB = ../lib
  136. ARES_LIB = ../ares
  137. INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
  138. ifdef LINK_STATIC
  139. LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT)
  140. ifdef WITH_ARES
  141. LDLIBS += $(ARES_LIB)/libcares.$(LIBEXT)
  142. endif
  143. else
  144. MODULES = libcurl.nlm
  145. IMPORTS = @$(CURL_LIB)/libcurl.imp
  146. endif
  147. ifdef WITH_SSH2
  148. INCLUDES += -I$(LIBSSH2_PATH)/include
  149. ifdef LINK_STATIC
  150. LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
  151. else
  152. MODULES += libssh2.nlm
  153. IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
  154. endif
  155. endif
  156. ifdef WITH_SSL
  157. INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
  158. LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
  159. LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
  160. IMPORTS += GetProcessSwitchCount RunningProcess
  161. endif
  162. ifdef WITH_ZLIB
  163. INCLUDES += -I$(ZLIB_PATH)
  164. ifdef LINK_STATIC
  165. LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
  166. else
  167. MODULES += libz.nlm
  168. IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
  169. endif
  170. endif
  171. ifdef WITH_IDN
  172. # INCLUDES += -I$(LIBIDN_PATH)/include
  173. LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
  174. endif
  175. ifeq ($(LIBARCH),LIBC)
  176. INCLUDES += -I$(SDK_LIBC)/include
  177. # INCLUDES += -I$(SDK_LIBC)/include/nks
  178. # INCLUDES += -I$(SDK_LIBC)/include/winsock
  179. CFLAGS += -D_POSIX_SOURCE
  180. else
  181. INCLUDES += -I$(SDK_CLIB)/include/nlm
  182. # INCLUDES += -I$(SDK_CLIB)/include
  183. endif
  184. ifndef DISABLE_LDAP
  185. # INCLUDES += -I$(SDK_LDAP)/$(LIBARCH_L)/inc
  186. endif
  187. CFLAGS += $(INCLUDES)
  188. ifeq ($(MTSAFE),YES)
  189. XDCOPT = -n
  190. endif
  191. ifeq ($(MTSAFE),NO)
  192. XDCOPT = -u
  193. endif
  194. ifdef XDCOPT
  195. XDCDATA = $(OBJDIR)/$(TARGET).xdc
  196. endif
  197. ifeq ($(findstring linux,$(OSTYPE)),linux)
  198. DL = '
  199. DS = /
  200. PCT = %
  201. #-include $(NDKBASE)/nlmconv/ncpfs.inc
  202. else
  203. DS = \\
  204. PCT = %%
  205. endif
  206. # Makefile.inc provides the CSOURCES and HHEADERS defines
  207. include Makefile.inc
  208. OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
  209. OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES))) $(OBJX)
  210. vpath %.c $(CURL_LIB)
  211. all: prebuild $(TARGET).nlm
  212. prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
  213. $(OBJDIR)/%.o: %.c
  214. # @echo Compiling $<
  215. $(CC) $(CFLAGS) -c $< -o $@
  216. $(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
  217. @echo Creating $@
  218. @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
  219. install: $(INSTDIR) all
  220. @-$(CP) ../docs/$(TARGET).pdf $(INSTDIR)
  221. @-$(CP) ../docs/$(TARGET).html $(INSTDIR)
  222. @$(CP) $(TARGET).nlm $(INSTDIR)
  223. clean:
  224. ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
  225. -$(RM) hugehelp.c
  226. endif
  227. -$(RM) config.h
  228. -$(RM) -r $(OBJDIR)
  229. distclean: clean
  230. -$(RM) $(TARGET).nlm
  231. $(OBJDIR) $(INSTDIR):
  232. @$(MKDIR) $@
  233. $(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
  234. @echo Linking $@
  235. @-$(RM) $@
  236. @$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
  237. $(OBJDIR)/%.xdc: Makefile.netware
  238. @echo Creating $@
  239. @$(MPKXDC) $(XDCOPT) $@
  240. $(OBJDIR)/%.def: Makefile.netware
  241. @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
  242. @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
  243. @echo $(DL)# All your changes will be lost!!$(DL) >> $@
  244. @echo $(DL)#$(DL) >> $@
  245. @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
  246. @echo $(DL)description "$(DESCR)"$(DL) >> $@
  247. @echo $(DL)version $(VERSION)$(DL) >> $@
  248. ifdef NLMTYPE
  249. @echo $(DL)type $(NLMTYPE)$(DL) >> $@
  250. endif
  251. ifdef STACK
  252. @echo $(DL)stack $(STACK)$(DL) >> $@
  253. endif
  254. ifdef SCREEN
  255. @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
  256. else
  257. @echo $(DL)screenname "DEFAULT"$(DL) >> $@
  258. endif
  259. ifneq ($(DB),NDEBUG)
  260. @echo $(DL)debug$(DL) >> $@
  261. endif
  262. @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
  263. ifdef XDCDATA
  264. @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
  265. endif
  266. ifeq ($(LDRING),0)
  267. @echo $(DL)flag_on 16$(DL) >> $@
  268. endif
  269. ifeq ($(LDRING),3)
  270. @echo $(DL)flag_on 512$(DL) >> $@
  271. endif
  272. ifeq ($(LIBARCH),CLIB)
  273. @echo $(DL)start _Prelude$(DL) >> $@
  274. @echo $(DL)exit _Stop$(DL) >> $@
  275. @echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
  276. @echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
  277. @echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
  278. @echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
  279. @echo $(DL)module clib$(DL) >> $@
  280. ifndef DISABLE_LDAP
  281. @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
  282. @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
  283. # @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
  284. @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
  285. endif
  286. else
  287. ifeq ($(POSIXFL),1)
  288. @echo $(DL)flag_on 4194304$(DL) >> $@
  289. endif
  290. @echo $(DL)flag_on 64$(DL) >> $@
  291. @echo $(DL)pseudopreemption$(DL) >> $@
  292. ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
  293. @echo $(DL)start POSIX_Start$(DL) >> $@
  294. @echo $(DL)exit POSIX_Stop$(DL) >> $@
  295. @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
  296. else
  297. @echo $(DL)start _LibCPrelude$(DL) >> $@
  298. @echo $(DL)exit _LibCPostlude$(DL) >> $@
  299. @echo $(DL)check _LibCCheckUnload$(DL) >> $@
  300. endif
  301. @echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
  302. @echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
  303. @echo $(DL)module libc$(DL) >> $@
  304. ifndef DISABLE_LDAP
  305. @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
  306. @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
  307. # @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
  308. @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
  309. endif
  310. endif
  311. ifdef MODULES
  312. @echo $(DL)module $(MODULES)$(DL) >> $@
  313. endif
  314. ifdef EXPORTS
  315. @echo $(DL)export $(EXPORTS)$(DL) >> $@
  316. endif
  317. ifdef IMPORTS
  318. @echo $(DL)import $(IMPORTS)$(DL) >> $@
  319. endif
  320. ifeq ($(findstring nlmconv,$(LD)),nlmconv)
  321. @echo $(DL)input $(PRELUDE)$(DL) >> $@
  322. @echo $(DL)input $(OBJS)$(DL) >> $@
  323. ifdef LDLIBS
  324. @echo $(DL)input $(LDLIBS)$(DL) >> $@
  325. endif
  326. @echo $(DL)output $(TARGET).nlm$(DL) >> $@
  327. endif
  328. config.h: Makefile.netware
  329. @echo Creating $@
  330. @echo $(DL)/* $@ for NetWare target.$(DL) > $@
  331. @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
  332. @echo $(DL)** All your changes will be lost!!$(DL) >> $@
  333. @echo $(DL)*/$(DL) >> $@
  334. @echo $(DL)#ifndef NETWARE$(DL) >> $@
  335. @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
  336. @echo $(DL)#endif$(DL) >> $@
  337. @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
  338. @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
  339. ifeq ($(LIBARCH),CLIB)
  340. @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
  341. @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
  342. @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
  343. @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
  344. @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
  345. @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
  346. @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
  347. @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
  348. @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
  349. @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
  350. @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
  351. @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
  352. @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
  353. @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
  354. @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
  355. @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
  356. @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
  357. @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
  358. @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
  359. @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
  360. @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
  361. @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
  362. @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
  363. else
  364. @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
  365. @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
  366. @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
  367. @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
  368. @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
  369. @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
  370. @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
  371. @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
  372. @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
  373. @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
  374. @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
  375. @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
  376. @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
  377. @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
  378. @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
  379. @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
  380. @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
  381. @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
  382. @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
  383. @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
  384. @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
  385. @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
  386. @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
  387. @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
  388. @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
  389. @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
  390. @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
  391. @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
  392. @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
  393. @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
  394. @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
  395. @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
  396. @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
  397. @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
  398. @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
  399. @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
  400. @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
  401. @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
  402. @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
  403. @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
  404. @echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
  405. @echo $(DL)#define _LARGEFILE 1$(DL) >> $@
  406. ifdef ENABLE_IPV6
  407. @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
  408. endif
  409. endif
  410. @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
  411. @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
  412. @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
  413. @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
  414. @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
  415. @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
  416. @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
  417. @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
  418. @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
  419. @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
  420. @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
  421. @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
  422. @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
  423. @echo $(DL)#define HAVE_LL 1$(DL) >> $@
  424. @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
  425. @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
  426. @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
  427. @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
  428. @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
  429. @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
  430. @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
  431. @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
  432. @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
  433. @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
  434. @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
  435. @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
  436. @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
  437. @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
  438. @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
  439. @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
  440. @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
  441. @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
  442. @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
  443. @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
  444. @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
  445. @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
  446. @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
  447. @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
  448. @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
  449. @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
  450. @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
  451. @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
  452. @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
  453. @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
  454. @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
  455. @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
  456. @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
  457. @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
  458. ifdef DISABLE_LDAP
  459. @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
  460. else
  461. @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
  462. ifndef DISABLE_LDAPS
  463. @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
  464. endif
  465. @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
  466. @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
  467. endif
  468. ifdef NW_WINSOCK
  469. @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
  470. else
  471. @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
  472. @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
  473. @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
  474. @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
  475. @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
  476. endif
  477. ifdef WITH_ARES
  478. @echo $(DL)#define USE_ARES 1$(DL) >> $@
  479. endif
  480. ifdef WITH_ZLIB
  481. @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
  482. @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
  483. endif
  484. ifdef WITH_SSL
  485. @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
  486. @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
  487. @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
  488. @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
  489. @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
  490. @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
  491. @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
  492. @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
  493. @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
  494. @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
  495. @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
  496. @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
  497. endif
  498. ifdef WITH_SSH2
  499. @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
  500. @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
  501. endif
  502. ifdef WITH_IDN
  503. @echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@
  504. @echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@
  505. endif
  506. @echo $(DL)#ifdef __GNUC__$(DL) >> $@
  507. @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
  508. @echo $(DL)#else$(DL) >> $@
  509. @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
  510. @echo $(DL)#endif$(DL) >> $@
  511. ifdef CABUNDLE
  512. @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
  513. else
  514. @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
  515. endif
  516. hugehelp.c:
  517. @echo Creating $@
  518. @$(CP) hugehelp.c.cvs $@
  519. $(ARES_LIB)/libcares.$(LIBEXT):
  520. $(MAKE) -C $(ARES_LIB) -f Makefile.netware lib