geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

631 lines
21 KiB

  1. #########################################################################
  2. #
  3. ## Makefile for building libssh2 (NetWare version - gnu make)
  4. ## Use: make [help|all|clean|dev|devclean|dist|distclean|lib|nlm|objclean]
  5. ##
  6. ## Hacked by: Guenter Knauf
  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 your Distribution folder.
  22. ifndef DISTDIR
  23. DISTDIR = libssh2-$(LIBSSH2_VERSION_STR)-bin-nw
  24. endif
  25. DISTARC = $(DISTDIR).zip
  26. # Edit the path below to point to your Development folder.
  27. ifndef DEVLDIR
  28. DEVLDIR = libssh2-$(LIBSSH2_VERSION_STR)-dev-nw
  29. endif
  30. DEVLARC = $(DEVLDIR).zip
  31. # Edit the vars below to change NLM target settings.
  32. TARGET = libssh2
  33. VERSION = $(LIBSSH2_VERSION)
  34. CPRIGHT = Copyright (c) $(LIBSSH2_COPYRIGHT_STR)
  35. WWWURL = https://www.libssh2.org/
  36. DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL)
  37. MTSAFE = YES
  38. STACK = 64000
  39. SCREEN = none
  40. EXPORTS = @$(TARGET).imp
  41. # Edit the var below to point to your lib architecture.
  42. ifndef LIBARCH
  43. LIBARCH = LIBC
  44. endif
  45. # must be equal to DEBUG or NDEBUG
  46. ifndef DB
  47. DB = NDEBUG
  48. # DB = DEBUG
  49. endif
  50. # Optimization: -O<n> or debugging: -g
  51. ifeq ($(DB),NDEBUG)
  52. OPT = -O2
  53. OBJDIR = release
  54. else
  55. OPT = -g
  56. OPT += -DLIBSSH2DEBUG
  57. OBJDIR = debug
  58. endif
  59. # The following lines defines your compiler.
  60. ifdef CWFolder
  61. METROWERKS = $(CWFolder)
  62. endif
  63. ifdef METROWERKS
  64. # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
  65. MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
  66. CC = mwccnlm
  67. else
  68. CC = $(CROSSPREFIX)gcc
  69. endif
  70. # Here you can find a native Win32 binary of the original awk:
  71. # http://www.gknw.net/development/prgtools/awk-20100523.zip
  72. AWK = awk
  73. # If you want to mark the target as MTSAFE you will need a tool for
  74. # generating the xdc data for the linker; here's a minimal tool:
  75. # http://www.gknw.net/development/prgtools/mkxdc.zip
  76. MPKXDC = mkxdc
  77. ZIP = zip -qzr9
  78. # Platform-dependent helper tool macros
  79. ifeq ($(findstring /sh,$(SHELL)),/sh)
  80. DEL = rm -f $1
  81. RMDIR = rm -fr $1
  82. MKDIR = mkdir -p $1
  83. COPY = -cp -afv $1 $2
  84. #COPYR = -cp -afr $1/* $2
  85. COPYR = -rsync -aC $1/* $2
  86. TOUCH = touch $1
  87. CAT = cat
  88. ECHONL = echo ""
  89. DL = '
  90. else
  91. ifeq "$(OS)" "Windows_NT"
  92. DEL = -del 2>NUL /q /f $(subst /,\,$1)
  93. RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
  94. else
  95. DEL = -del 2>NUL $(subst /,\,$1)
  96. RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
  97. endif
  98. MKDIR = -md 2>NUL $(subst /,\,$1)
  99. COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
  100. COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
  101. TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
  102. CAT = type
  103. ECHONL = $(ComSpec) /c echo.
  104. endif
  105. # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
  106. LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
  107. # Include the version info retrieved from libssh2.h
  108. -include $(OBJDIR)/version.inc
  109. # Global flags for all compilers
  110. CFLAGS += $(OPT) -D$(DB) -DNETWARE -nostdinc
  111. #CFLAGS += -DHAVE_CONFIG_H
  112. ifeq ($(CC),mwccnlm)
  113. LD = mwldnlm
  114. LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile
  115. AR = mwldnlm
  116. ARFLAGS = -nostdlib -type library -o
  117. LIBEXT = lib
  118. CFLAGS += -msgstyle gcc -gccinc -inline on -opt nointrinsics -proc 586
  119. CFLAGS += -relax_pointers
  120. #CFLAGS += -w on
  121. ifeq ($(LIBARCH),LIBC)
  122. PRELUDE = $(SDK_LIBC)/imports/libcpre.o
  123. CFLAGS += -align 4
  124. else
  125. # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
  126. # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
  127. PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
  128. # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
  129. CFLAGS += -align 1
  130. endif
  131. else
  132. LD = $(CROSSPREFIX)nlmconv
  133. LDFLAGS = -UT
  134. AR = $(CROSSPREFIX)ar
  135. ARFLAGS = -cq
  136. LIBEXT = a
  137. RANLIB = $(CROSSPREFIX)ranlib
  138. CFLAGS += -m32
  139. CFLAGS += -fno-builtin -fpcc-struct-return
  140. CFLAGS += -fno-strict-aliasing
  141. CFLAGS += -Wall # -pedantic
  142. #CFLAGS += -Wno-pointer-sign
  143. ifeq ($(LIBARCH),LIBC)
  144. PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
  145. else
  146. # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
  147. # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
  148. # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
  149. PRELUDE = $(NDK_ROOT)/pre/prelude.o
  150. CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
  151. endif
  152. endif
  153. LDLIBS =
  154. NDK_ROOT = $(NDKBASE)/ndk
  155. SDK_CLIB = $(NDK_ROOT)/nwsdk
  156. SDK_LIBC = $(NDK_ROOT)/libc
  157. SNPRINTF = $(NDKBASE)/snprintf
  158. INCLUDES = -I. -I../include
  159. ifdef WITH_ZLIB
  160. INCLUDES += -I$(ZLIB_PATH)
  161. ifdef LINK_STATIC
  162. LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
  163. else
  164. MODULES += libz.nlm
  165. IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
  166. endif
  167. endif
  168. INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
  169. LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
  170. LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
  171. IMPORTS += GetProcessSwitchCount RunningProcess
  172. ifeq ($(LIBARCH),LIBC)
  173. INCLUDES += -I$(SDK_LIBC)/include
  174. # INCLUDES += -I$(SDK_LIBC)/include/nks
  175. # INCLUDES += -I$(SDK_LIBC)/include/winsock
  176. CFLAGS += -D_POSIX_SOURCE
  177. else
  178. INCLUDES += -I$(SDK_CLIB)/include/nlm
  179. # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
  180. # INCLUDES += -I$(SDK_CLIB)/include
  181. endif
  182. CFLAGS += $(INCLUDES)
  183. ifeq ($(MTSAFE),YES)
  184. XDCOPT = -n
  185. endif
  186. ifeq ($(MTSAFE),NO)
  187. XDCOPT = -u
  188. endif
  189. ifdef XDCOPT
  190. XDCDATA = $(OBJDIR)/$(TARGET).xdc
  191. endif
  192. vpath %.c . ../src
  193. # only OpenSSL is supported with this build system
  194. CFLAGS += -DLIBSSH2_OPENSSL
  195. include ../Makefile.OpenSSL.inc
  196. # include Makefile.inc to get CSOURCES define
  197. include ../Makefile.inc
  198. OBJECTS := $(patsubst %.c,%.o,$(CSOURCES))
  199. ifeq ($(LIBARCH),CLIB)
  200. # CLIB lacks of snprint() function - here's a replacement:
  201. # https://www.ijs.si/software/snprintf/
  202. OBJECTS += snprintf.o
  203. vpath %.c $(SNPRINTF)
  204. endif
  205. OBJS := $(addprefix $(OBJDIR)/,$(OBJECTS))
  206. OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
  207. all: lib nlm
  208. nlm: prebuild $(TARGET).nlm
  209. lib: prebuild $(TARGET).$(LIBEXT)
  210. prebuild: $(OBJDIR) $(OBJDIR)/version.inc libssh2_config.h
  211. test: all
  212. $(MAKE) -C test
  213. $(OBJDIR)/%.o: %.c
  214. # @echo Compiling $<
  215. $(CC) $(CFLAGS) -c $< -o $@
  216. $(OBJDIR)/version.inc: ../get_ver.awk ../include/libssh2.h $(OBJDIR)
  217. @echo Creating $@
  218. @$(AWK) -f $^ > $@
  219. dist: all $(DISTDIR) $(DISTDIR)/readme.txt
  220. @$(call MKDIR, $(DISTDIR)/bin)
  221. @$(call COPY, ../AUTHORS, $(DISTDIR))
  222. @$(call COPY, ../COPYING, $(DISTDIR))
  223. @$(call COPY, ../INSTALL, $(DISTDIR))
  224. @$(call COPY, ../README, $(DISTDIR))
  225. @$(call COPY, ../RELEASE-NOTES, $(DISTDIR))
  226. @$(call COPY, $(TARGET).nlm, $(DISTDIR)/bin)
  227. @echo Creating $(DISTARC)
  228. @$(ZIP) $(DISTARC) $(DISTDIR)/* < $(DISTDIR)/readme.txt
  229. dev: all $(DEVLDIR) $(DEVLDIR)/readme.txt
  230. @$(call MKDIR, $(DEVLDIR)/bin)
  231. @$(call MKDIR, $(DEVLDIR)/include)
  232. @$(call MKDIR, $(DEVLDIR)/nw)
  233. @$(call COPY, ../AUTHORS, $(DEVLDIR))
  234. @$(call COPY, ../COPYING, $(DEVLDIR))
  235. @$(call COPY, ../INSTALL, $(DEVLDIR))
  236. @$(call COPY, ../README, $(DEVLDIR))
  237. @$(call COPY, ../RELEASE-NOTES, $(DEVLDIR))
  238. @$(call COPY, ../include/*.h, $(DEVLDIR)/include)
  239. @$(call COPY, libssh2_config.h, $(DEVLDIR)/include)
  240. @$(call COPY, $(TARGET).nlm, $(DEVLDIR)/bin)
  241. @$(call COPY, $(TARGET).imp, $(DEVLDIR)/nw)
  242. @$(call COPY, $(TARGET).$(LIBEXT), $(DEVLDIR)/nw)
  243. @echo Creating $(DEVLARC)
  244. @$(ZIP) $(DEVLARC) $(DEVLDIR)/* < $(DEVLDIR)/readme.txt
  245. distclean: clean
  246. $(call RMDIR, $(DISTDIR))
  247. $(call DEL, $(DISTARC))
  248. devclean: clean
  249. $(call RMDIR, $(DEVLDIR))
  250. $(call DEL, $(DEVLARC))
  251. objclean:
  252. $(call RMDIR, $(OBJDIR))
  253. testclean: clean
  254. $(MAKE) -C test clean
  255. clean: objclean
  256. $(call DEL, libssh2_config.h)
  257. $(call DEL, $(TARGET).*)
  258. $(OBJDIR):
  259. @$(call MKDIR, $@)
  260. $(DISTDIR):
  261. @$(call MKDIR, $@)
  262. $(DEVLDIR):
  263. @$(call MKDIR, $@)
  264. $(TARGET).$(LIBEXT): $(OBJS)
  265. @echo Creating $@
  266. @$(call DEL, $@)
  267. @$(AR) $(ARFLAGS) $@ $^
  268. ifdef RANLIB
  269. @$(RANLIB) $@
  270. endif
  271. $(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(TARGET).imp $(OBJL) $(XDCDATA)
  272. @echo Linking $@
  273. @$(call DEL, $@)
  274. @$(LD) $(LDFLAGS) $<
  275. $(OBJDIR)/%.xdc: GNUmakefile
  276. @echo Creating $@
  277. @$(MPKXDC) $(XDCOPT) $@
  278. $(OBJDIR)/%.def: GNUmakefile
  279. @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
  280. @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
  281. @echo $(DL)# All your changes will be lost!!$(DL) >> $@
  282. @echo $(DL)#$(DL) >> $@
  283. @echo $(DL)copyright "$(CPRIGHT)"$(DL) >> $@
  284. @echo $(DL)description "$(DESCR)"$(DL) >> $@
  285. @echo $(DL)version $(VERSION)$(DL) >> $@
  286. ifdef NLMTYPE
  287. @echo $(DL)type $(NLMTYPE)$(DL) >> $@
  288. endif
  289. ifdef STACK
  290. @echo $(DL)stack $(STACK)$(DL) >> $@
  291. endif
  292. ifdef SCREEN
  293. @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
  294. else
  295. @echo $(DL)screenname "DEFAULT"$(DL) >> $@
  296. endif
  297. ifeq ($(DB),DEBUG)
  298. @echo $(DL)debug$(DL) >> $@
  299. endif
  300. @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
  301. ifdef XDCDATA
  302. @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
  303. endif
  304. @echo $(DL)flag_on 64$(DL) >> $@
  305. ifeq ($(LIBARCH),CLIB)
  306. @echo $(DL)start _Prelude$(DL) >> $@
  307. @echo $(DL)exit _Stop$(DL) >> $@
  308. @echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
  309. @echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
  310. @echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
  311. @echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
  312. @echo $(DL)module clib$(DL) >> $@
  313. else
  314. @echo $(DL)pseudopreemption$(DL) >> $@
  315. @echo $(DL)start _LibCPrelude$(DL) >> $@
  316. @echo $(DL)exit _LibCPostlude$(DL) >> $@
  317. @echo $(DL)check _LibCCheckUnload$(DL) >> $@
  318. @echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
  319. @echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
  320. @echo $(DL)module libc$(DL) >> $@
  321. endif
  322. ifdef MODULES
  323. @echo $(DL)module $(MODULES)$(DL) >> $@
  324. endif
  325. ifdef EXPORTS
  326. @echo $(DL)export $(EXPORTS)$(DL) >> $@
  327. endif
  328. ifdef IMPORTS
  329. @echo $(DL)import $(IMPORTS)$(DL) >> $@
  330. endif
  331. ifeq ($(LD),nlmconv)
  332. @echo $(DL)input $(OBJL)$(DL) >> $@
  333. @echo $(DL)input $(PRELUDE)$(DL) >> $@
  334. @echo $(DL)output $(TARGET).nlm$(DL) >> $@
  335. endif
  336. libssh2_config.h: GNUmakefile
  337. @echo Creating $@
  338. @echo $(DL)/* $@ for NetWare target.$(DL) > $@
  339. @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
  340. @echo $(DL)** All your changes will be lost!!$(DL) >> $@
  341. @echo $(DL)*/$(DL) >> $@
  342. @echo $(DL)#define VERSION "$(LIBSSH2_VERSION_STR)"$(DL) >> $@
  343. @echo $(DL)#define PACKAGE_BUGREPORT "https://github.com/libssh2/libssh2/issues"$(DL) >> $@
  344. ifeq ($(LIBARCH),CLIB)
  345. @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
  346. @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
  347. @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
  348. @echo $(DL)#define socklen_t int$(DL) >> $@
  349. @echo $(DL)#define sleep(s) delay(1000 * s)$(DL) >> $@
  350. @echo $(DL)#define strcasecmp stricmp$(DL) >> $@
  351. @echo $(DL)#define strncasecmp strnicmp$(DL) >> $@
  352. else
  353. @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
  354. @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
  355. @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
  356. @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
  357. @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
  358. @echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
  359. @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
  360. @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
  361. @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
  362. @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
  363. @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
  364. @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
  365. @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
  366. @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
  367. @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
  368. @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
  369. @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
  370. @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
  371. @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
  372. @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
  373. @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
  374. @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
  375. ifdef ENABLE_IPV6
  376. @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
  377. endif
  378. endif
  379. @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
  380. @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
  381. @echo $(DL)#define HAVE_CTYPE_H 1$(DL) >> $@
  382. @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
  383. @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
  384. @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
  385. @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
  386. @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
  387. @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
  388. @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
  389. @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
  390. @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
  391. @echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
  392. @echo $(DL)#define HAVE_LL 1$(DL) >> $@
  393. @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
  394. @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
  395. @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
  396. @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
  397. @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
  398. @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
  399. @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
  400. @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
  401. @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
  402. @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
  403. @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
  404. @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
  405. @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
  406. @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
  407. @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
  408. @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
  409. @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
  410. @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
  411. @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
  412. @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
  413. @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
  414. @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
  415. @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
  416. @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
  417. @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
  418. @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
  419. @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
  420. @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
  421. @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
  422. @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
  423. @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
  424. @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
  425. @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
  426. @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
  427. @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
  428. @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
  429. @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
  430. @echo $(DL)#define HAVE_O_NONBLOCK 1$(DL) >> $@
  431. @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
  432. @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
  433. @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
  434. ifdef WITH_ZLIB
  435. @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
  436. @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
  437. @echo $(DL)#define LIBSSH2_HAVE_ZLIB 1$(DL) >> $@
  438. endif
  439. ifdef NW_WINSOCK
  440. @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
  441. else
  442. @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
  443. @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
  444. @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
  445. @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
  446. endif
  447. ifdef OLD_NOVELLSDK
  448. @echo $(DL)#define socklen_t int$(DL) >> $@
  449. endif
  450. @echo $(DL)#define LIBSSH2_DH_GEX_NEW 1$(DL) >> $@
  451. ifeq ($(DB),DEBUG)
  452. @echo $(DL)#define LIBSSH2_DEBUG_CONNECTION 1$(DL) >> $@
  453. @echo $(DL)#define LIBSSH2_DEBUG_ERRORS 1$(DL) >> $@
  454. @echo $(DL)#define LIBSSH2_DEBUG_KEX 1$(DL) >> $@
  455. @echo $(DL)#define LIBSSH2_DEBUG_PUBLICKEY 1$(DL) >> $@
  456. @echo $(DL)#define LIBSSH2_DEBUG_SCP 1$(DL) >> $@
  457. @echo $(DL)#define LIBSSH2_DEBUG_SFTP 1$(DL) >> $@
  458. @echo $(DL)#define LIBSSH2_DEBUG_TRANSPORT 1$(DL) >> $@
  459. @echo $(DL)#define LIBSSH2_DEBUG_USERAUTH 1$(DL) >> $@
  460. endif
  461. libssh2.imp: GNUmakefile
  462. @echo Creating $@
  463. @echo $(DL)# $@ for NetWare target.$(DL) > $@
  464. @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
  465. @echo $(DL)# All your changes will be lost!!$(DL) >> $@
  466. ifeq ($(LIBARCH),CLIB)
  467. @echo $(DL) (CLIB_LIBSSH2)$(DL) >> $@
  468. else
  469. @echo $(DL) (LIBC_LIBSSH2)$(DL) >> $@
  470. endif
  471. @echo $(DL) libssh2_banner_set,$(DL) >> $@
  472. @echo $(DL) libssh2_channel_close,$(DL) >> $@
  473. @echo $(DL) libssh2_channel_direct_tcpip_ex,$(DL) >> $@
  474. @echo $(DL) libssh2_channel_eof,$(DL) >> $@
  475. @echo $(DL) libssh2_channel_flush_ex,$(DL) >> $@
  476. @echo $(DL) libssh2_channel_free,$(DL) >> $@
  477. @echo $(DL) libssh2_channel_get_exit_status,$(DL) >> $@
  478. @echo $(DL) libssh2_channel_open_ex,$(DL) >> $@
  479. @echo $(DL) libssh2_channel_process_startup,$(DL) >> $@
  480. @echo $(DL) libssh2_channel_read_ex,$(DL) >> $@
  481. @echo $(DL) libssh2_channel_request_pty_ex,$(DL) >> $@
  482. @echo $(DL) libssh2_channel_send_eof,$(DL) >> $@
  483. @echo $(DL) libssh2_channel_set_blocking,$(DL) >> $@
  484. @echo $(DL) libssh2_channel_setenv_ex,$(DL) >> $@
  485. @echo $(DL) libssh2_channel_wait_closed,$(DL) >> $@
  486. @echo $(DL) libssh2_channel_wait_eof,$(DL) >> $@
  487. @echo $(DL) libssh2_channel_write_ex,$(DL) >> $@
  488. @echo $(DL) libssh2_exit,$(DL) >> $@
  489. @echo $(DL) libssh2_hostkey_hash,$(DL) >> $@
  490. @echo $(DL) libssh2_init,$(DL) >> $@
  491. @echo $(DL) libssh2_knownhost_add,$(DL) >> $@
  492. @echo $(DL) libssh2_knownhost_check,$(DL) >> $@
  493. @echo $(DL) libssh2_knownhost_checkp,$(DL) >> $@
  494. @echo $(DL) libssh2_knownhost_free,$(DL) >> $@
  495. @echo $(DL) libssh2_knownhost_init,$(DL) >> $@
  496. @echo $(DL) libssh2_knownhost_readfile,$(DL) >> $@
  497. @echo $(DL) libssh2_knownhost_writefile,$(DL) >> $@
  498. @echo $(DL) libssh2_scp_recv,$(DL) >> $@
  499. @echo $(DL) libssh2_scp_recv2,$(DL) >> $@
  500. @echo $(DL) libssh2_scp_send64,$(DL) >> $@
  501. @echo $(DL) libssh2_scp_send_ex,$(DL) >> $@
  502. @echo $(DL) libssh2_session_abstract,$(DL) >> $@
  503. @echo $(DL) libssh2_session_block_directions,$(DL) >> $@
  504. @echo $(DL) libssh2_session_callback_set,$(DL) >> $@
  505. @echo $(DL) libssh2_session_disconnect_ex,$(DL) >> $@
  506. @echo $(DL) libssh2_session_free,$(DL) >> $@
  507. @echo $(DL) libssh2_session_handshake,$(DL) >> $@
  508. @echo $(DL) libssh2_session_hostkey,$(DL) >> $@
  509. @echo $(DL) libssh2_session_init_ex,$(DL) >> $@
  510. @echo $(DL) libssh2_session_last_errno,$(DL) >> $@
  511. @echo $(DL) libssh2_session_last_error,$(DL) >> $@
  512. @echo $(DL) libssh2_session_method_pref,$(DL) >> $@
  513. @echo $(DL) libssh2_session_methods,$(DL) >> $@
  514. @echo $(DL) libssh2_session_set_blocking,$(DL) >> $@
  515. @echo $(DL) libssh2_session_startup,$(DL) >> $@
  516. @echo $(DL) libssh2_sftp_close_handle,$(DL) >> $@
  517. @echo $(DL) libssh2_sftp_fstat_ex,$(DL) >> $@
  518. @echo $(DL) libssh2_sftp_init,$(DL) >> $@
  519. @echo $(DL) libssh2_sftp_last_error,$(DL) >> $@
  520. @echo $(DL) libssh2_sftp_mkdir_ex,$(DL) >> $@
  521. @echo $(DL) libssh2_sftp_open_ex,$(DL) >> $@
  522. @echo $(DL) libssh2_sftp_read,$(DL) >> $@
  523. @echo $(DL) libssh2_sftp_readdir_ex,$(DL) >> $@
  524. @echo $(DL) libssh2_sftp_rename_ex,$(DL) >> $@
  525. @echo $(DL) libssh2_sftp_rmdir_ex,$(DL) >> $@
  526. @echo $(DL) libssh2_sftp_seek,$(DL) >> $@
  527. @echo $(DL) libssh2_sftp_seek64,$(DL) >> $@
  528. @echo $(DL) libssh2_sftp_shutdown,$(DL) >> $@
  529. @echo $(DL) libssh2_sftp_stat_ex,$(DL) >> $@
  530. @echo $(DL) libssh2_sftp_symlink_ex,$(DL) >> $@
  531. @echo $(DL) libssh2_sftp_tell,$(DL) >> $@
  532. @echo $(DL) libssh2_sftp_unlink_ex,$(DL) >> $@
  533. @echo $(DL) libssh2_sftp_write,$(DL) >> $@
  534. @echo $(DL) libssh2_trace,$(DL) >> $@
  535. @echo $(DL) libssh2_userauth_authenticated,$(DL) >> $@
  536. @echo $(DL) libssh2_userauth_keyboard_interactive_ex,$(DL) >> $@
  537. @echo $(DL) libssh2_userauth_list,$(DL) >> $@
  538. @echo $(DL) libssh2_userauth_password_ex,$(DL) >> $@
  539. @echo $(DL) libssh2_userauth_publickey_fromfile_ex,$(DL) >> $@
  540. @echo $(DL) libssh2_version$(DL) >> $@
  541. $(DISTDIR)/readme.txt: GNUmakefile
  542. @echo Creating $@
  543. @echo $(DL)This is a binary distribution for NetWare platform.$(DL) > $@
  544. @echo $(DL)libssh2 version $(LIBSSH2_VERSION_STR)$(DL) >> $@
  545. @echo $(DL)Please download the complete libssh package for$(DL) >> $@
  546. @echo $(DL)any further documentation:$(DL) >> $@
  547. @echo $(DL)$(WWWURL)$(DL) >> $@
  548. $(DEVLDIR)/readme.txt: GNUmakefile
  549. @echo Creating $@
  550. @echo $(DL)This is a development distribution for NetWare platform.$(DL) > $@
  551. @echo $(DL)libssh2 version $(LIBSSH2_VERSION_STR)$(DL) >> $@
  552. @echo $(DL)Please download the complete libssh2 package for$(DL) >> $@
  553. @echo $(DL)any further documentation:$(DL) >> $@
  554. @echo $(DL)$(WWWURL)$(DL) >> $@
  555. help: $(OBJDIR)/version.inc
  556. @echo $(DL)===========================================================$(DL)
  557. ifeq ($(LIBARCH),LIBC)
  558. @echo $(DL)Novell LibC NDK = $(SDK_LIBC)$(DL)
  559. else
  560. @echo $(DL)Novell CLib NDK = $(SDK_CLIB)$(DL)
  561. endif
  562. @echo $(DL)OpenSSL path = $(OPENSSL_PATH)$(DL)
  563. @echo $(DL)Zlib path = $(ZLIB_PATH)$(DL)
  564. @echo $(DL)===========================================================$(DL)
  565. @echo $(DL)libssh $(LIBSSH2_VERSION_STR) - available targets are:$(DL)
  566. @echo $(DL)$(MAKE) all$(DL)
  567. @echo $(DL)$(MAKE) nlm$(DL)
  568. @echo $(DL)$(MAKE) lib$(DL)
  569. @echo $(DL)$(MAKE) clean$(DL)
  570. @echo $(DL)$(MAKE) dev$(DL)
  571. @echo $(DL)$(MAKE) devclean$(DL)
  572. @echo $(DL)$(MAKE) dist$(DL)
  573. @echo $(DL)$(MAKE) distclean$(DL)
  574. @echo $(DL)$(MAKE) objclean$(DL)
  575. @echo $(DL)$(MAKE) test$(DL)
  576. @echo $(DL)===========================================================$(DL)