Makefile.netware 22 KB

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