2
0

Makefile.netware 24 KB

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