Makefile.netware 23 KB

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