Makefile.netware 21 KB

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