components.mk 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. #
  2. # BEGIN COPYRIGHT BLOCK
  3. # This Program is free software; you can redistribute it and/or modify it under
  4. # the terms of the GNU General Public License as published by the Free Software
  5. # Foundation; version 2 of the License.
  6. #
  7. # This Program is distributed in the hope that it will be useful, but WITHOUT
  8. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License along with
  12. # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  13. # Place, Suite 330, Boston, MA 02111-1307 USA.
  14. #
  15. # In addition, as a special exception, Red Hat, Inc. gives You the additional
  16. # right to link the code of this Program with code not covered under the GNU
  17. # General Public License ("Non-GPL Code") and to distribute linked combinations
  18. # including the two, subject to the limitations in this paragraph. Non-GPL Code
  19. # permitted under this exception must only link to the code of this Program
  20. # through those well defined interfaces identified in the file named EXCEPTION
  21. # found in the source code files (the "Approved Interfaces"). The files of
  22. # Non-GPL Code may instantiate templates or use macros or inline functions from
  23. # the Approved Interfaces without causing the resulting work to be covered by
  24. # the GNU General Public License. Only Red Hat, Inc. may make changes or
  25. # additions to the list of Approved Interfaces. You must obey the GNU General
  26. # Public License in all respects for all of the Program code and other code used
  27. # in conjunction with the Program except the Non-GPL Code covered by this
  28. # exception. If you modify this file, you may extend this exception to your
  29. # version of the file, but you are not obligated to do so. If you do not wish to
  30. # provide this exception without modification, you must delete this exception
  31. # statement from your version and license this file solely under the GPL without
  32. # exception.
  33. #
  34. #
  35. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  36. # Copyright (C) 2005 Red Hat, Inc.
  37. # All rights reserved.
  38. # END COPYRIGHT BLOCK
  39. #
  40. # this file contains definitions for component macros used during the build
  41. # process. Things like the component location in the build tree, etc.
  42. # this file should be included by nsconfig.mk after it figures out all
  43. # of the OS, architecture, security, and other platform and build related
  44. # macros. This file also contains the instructions for making the component
  45. # up to date e.g. copying the files from their repository to an area where
  46. # the build process has access to it. For some components and OS's, this may
  47. # be as simple as creating a symbolic link to the repository
  48. # Each component should define a COMPONENT_DEP macro which can be used in
  49. # other makefiles for dependency checking e.g.
  50. # target: $(COMPONENT1_DEP) $(COMPONENT2_DEP) ...
  51. # This macro should evaluate to the name of a single file which must be
  52. # present for the package to be complete e.g. some library or include
  53. # file name
  54. # Each component then should define a target for that dependency which will
  55. # bring the component up to date if that target does not exist e.g.
  56. # $(COMPONENT1_DEP):
  57. # use ftp or symlinks or ??? to get the necessary files to the build
  58. # area
  59. # Each component should define a COMPONENT_LINK macro which can be used to
  60. # link the component's libraries with the target. For NT, this will typically
  61. # be something like
  62. # /LIBPATH:path_to_library lib1 lib2 lib3 /LIBPATH:more_libs lib4 lib5 ...
  63. # On Unix, this will be something like
  64. # -Lpath_to_library -l1 -l2 -l3 -Lmore_libs -l4 -l5 ...
  65. # Each component should define a COMPONENT_INCLUDE macro which can be used
  66. # to compile using the component's header files e.g.
  67. # -Ipath_to_include_files -Ipath_to_more_include_files
  68. # Once this file is working, I will DELETE compvers.sh and ns_ftp.sh
  69. # from the tree, so help me god.
  70. # this macro contains a list of source files and directories to copy to
  71. # the directory where DLLs/SOs go at runtime; each component will add the files/dirs to
  72. # this macro that it needs to package; not all components will have
  73. # files which need packaging
  74. # if you need some other behavior, see PACKAGE_SRC_DEST below
  75. LIBS_TO_PKG =
  76. # this macro contains a list of source files and directories to copy to
  77. # the directory where DLLs/SOs go at runtime; each component will add the files/dirs to
  78. # this macro that it needs to package; this is for DLLs/SOs for the shared/bin
  79. # directory where the ldap c sdk command line tools, some security tools, and
  80. # the i18n conversion tools live
  81. LIBS_TO_PKG_SHARED =
  82. # this macro contains a list of source files and directories to copy to
  83. # the shared tools directory - things like the ldap c sdk command line
  84. # tools, shared security tools, etc.
  85. BINS_TO_PKG_SHARED =
  86. # this macro contains a list of shared libraries/dlls needed during
  87. # setup to run the setup pre-install program on unix (ns-config) or
  88. # the slapd plugin on NT (DSINST_PreInstall)
  89. PACKAGE_SETUP_LIBS =
  90. # this macro contains a list of libraries/dlls to copy to the clients
  91. # library directory
  92. LIBS_TO_PKG_CLIENTS =
  93. # this macro contains a list of source files and directories to copy to
  94. # the release/java directory; usually a list of jar files
  95. PACKAGE_UNDER_JAVA =
  96. # this macro contains a list of pairs of source and dest files and directories
  97. # the source is where to find the item in the build tree, and the dest is
  98. # the place in the release to put the item, relative to the server root e.g.
  99. # nls locale files are in libnls31/locale, but for packaging they need to
  100. # go into lib/nls, not just lib; the destination should be a directory name;
  101. # separate the src from the dest with a single space
  102. PACKAGE_SRC_DEST =
  103. # these defs are useful for doing pattern search/replace
  104. COMMA := ,
  105. NULLSTRING :=
  106. SPACE := $(NULLSTRING) # the space is between the ) and the #
  107. ifeq ($(ARCH), WINNT)
  108. EXE_SUFFIX = .exe
  109. else # unix - windows has no lib name prefix, except for nspr
  110. LIB_PREFIX = lib
  111. endif
  112. ifeq ($(INTERNAL_BUILD), 1)
  113. include $(BUILD_ROOT)/internal_buildpaths.mk
  114. else
  115. include $(BUILD_ROOT)/buildpaths.mk
  116. endif
  117. # NSPR20 Library
  118. NSPR_LIBNAMES = plc4 plds4
  119. ifeq ($(ARCH), SOLARIS)
  120. ifeq ($(NSPR_RELDATE), v4.2.2)
  121. # no need after v4.4.1
  122. NSPR_LIBNAMES += ultrasparc4
  123. # just need ultrasparc for now
  124. LIBS_TO_PKG += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(NSPR_LIBPATH)/lib,ultrasparc4))
  125. endif
  126. endif
  127. NSPR_LIBNAMES += nspr4
  128. ifdef NSPR_SOURCE_ROOT
  129. NSPR_LIBPATH = $(NSPR_SOURCE_ROOT)/dist/$(MOZ_OBJDIR_NAME)/lib
  130. NSPR_INCDIR = $(NSPR_SOURCE_ROOT)/dist/$(MOZ_OBJDIR_NAME)/include
  131. else
  132. NSPR_LIBPATH = $(NSPR_BUILD_DIR)/lib
  133. NSPR_INCDIR = $(NSPR_BUILD_DIR)/include
  134. endif
  135. NSPR_INCLUDE = -I$(NSPR_INCDIR)
  136. NSPR_LIBS_TO_PKG = $(addsuffix .$(DLL_SUFFIX),$(addprefix $(NSPR_LIBPATH)/lib,$(NSPR_LIBNAMES)))
  137. LIBS_TO_PKG += $(NSPR_LIBS_TO_PKG)
  138. LIBS_TO_PKG_SHARED += $(NSPR_LIBS_TO_PKG) # needed for cmd line tools
  139. ifeq ($(USE_SETUPSDK), 1)
  140. PACKAGE_SETUP_LIBS += $(NSPR_LIBS_TO_PKG)
  141. endif
  142. ifeq ($(USE_DSGW), 1)
  143. LIBS_TO_PKG_CLIENTS += $(NSPR_LIBS_TO_PKG) # for dsgw
  144. endif
  145. ifeq ($(ARCH), WINNT)
  146. NSPRDLL_NAME = $(addprefix lib, $(NSPR_LIBNAMES))
  147. NSPROBJNAME = $(addsuffix .lib, $(NSPRDLL_NAME))
  148. NSPRLINK = /LIBPATH:$(NSPR_LIBPATH) $(NSPROBJNAME)
  149. LIBNSPRDLL_NAMES = $(addsuffix .dll, $(addprefix $(NSPR_LIBPATH)/, \
  150. $(addprefix lib, $(NSPR_LIBNAMES))))
  151. else
  152. NSPR_SOLIBS = $(addsuffix .$(DLL_SUFFIX), $(addprefix $(LIB_PREFIX), $(NSPR_LIBNAMES)))
  153. NSPROBJNAME = $(addsuffix .a, $(addprefix $(LIB_PREFIX), $(NSPR_LIBNAMES))
  154. LIBNSPR = $(addprefix $(NSPR_LIBPATH)/, $(NSPR_SOLIBS))
  155. NSPRLINK = -L$(NSPR_LIBPATH) $(addprefix -l, $(NSPR_LIBNAMES))
  156. endif
  157. ### DBM #############################
  158. ifdef DBM_SOURCE_ROOT
  159. DBM_LIBPATH = $(DBM_SOURCE_ROOT)/dist/$(MOZ_OBJDIR_NAME)/lib
  160. DBM_INCDIR = $(DBM_SOURCE_ROOT)/dist/public/dbm
  161. else
  162. DBM_LIBPATH = $(DBM_BUILD_DIR)/lib
  163. DBM_INCDIR = $(DBM_BUILD_DIR)/include
  164. endif
  165. DBM_INCLUDE = -I$(DBM_INCDIR)
  166. DBM_LIBNAMES = dbm
  167. ifeq ($(ARCH), WINNT)
  168. DBMOBJNAME = $(addsuffix .lib, $(DBM_LIBNAMES))
  169. LIBDBM = $(addprefix $(DBM_LIBPATH)/, $(DBMOBJNAME))
  170. DBMLINK = /LIBPATH:$(DBM_LIBPATH) $(DBMOBJNAME)
  171. else
  172. DBM_SOLIBS = $(addsuffix .$(DLL_SUFFIX), $(addprefix $(LIB_PREFIX), $(DBM_LIBNAMES)))
  173. DBMROBJNAME = $(addsuffix .a, $(addprefix $(LIB_PREFIX), $(DBM_LIBNAMES)))
  174. LIBDBM = $(addprefix $(DBM_LIBPATH)/, $(DBMROBJNAME))
  175. DBMLINK = -L$(DBM_LIBPATH) $(addprefix -l, $(DBM_LIBNAMES))
  176. endif
  177. ### DBM END #############################
  178. ### SECURITY #############################
  179. ifdef SECURITY_SOURCE_ROOT
  180. SECURITY_LIBPATH = $(SECURITY_SOURCE_ROOT)/dist/$(MOZ_OBJDIR_NAME)/lib
  181. SECURITY_BINPATH = $(SECURITY_SOURCE_ROOT)/dist/$(MOZ_OBJDIR_NAME)/bin
  182. SECURITY_INCDIR = $(SECURITY_SOURCE_ROOT)/dist/public/nss
  183. else
  184. SECURITY_LIBPATH = $(SECURITY_BUILD_DIR)/lib
  185. SECURITY_BINPATH = $(SECURITY_BUILD_DIR)/bin
  186. SECURITY_INCDIR = $(SECURITY_BUILD_DIR)/include
  187. endif
  188. SECURITY_INCLUDE = -I$(SECURITY_INCDIR)
  189. # add crlutil and ocspclnt when we support CRL and OCSP cert checking in DS
  190. SECURITY_BINNAMES = certutil derdump pp pk12util ssltap modutil shlibsign
  191. SECURITY_LIBNAMES = ssl3 nss3 softokn3
  192. # these libs have a corresponding .chk file
  193. SECURITY_NEED_CHK = softokn3
  194. SECURITY_LIBNAMES.pkg = $(SECURITY_LIBNAMES) smime3
  195. # these are only needed on 32 bit Solaris and HP-UX
  196. ifneq ($(USE_64), 1)
  197. ifeq ($(ARCH), SOLARIS)
  198. SECURITY_LIBNAMES.pkg += freebl_hybrid_3 freebl_pure32_3
  199. # these libs have a corresponding .chk file
  200. SECURITY_NEED_CHK += freebl_hybrid_3 freebl_pure32_3
  201. endif
  202. ifeq ($(ARCH), HPUX)
  203. SECURITY_LIBNAMES.pkg += freebl_hybrid_3 freebl_pure32_3
  204. # these libs have a corresponding .chk file
  205. SECURITY_NEED_CHK += freebl_hybrid_3 freebl_pure32_3
  206. endif
  207. endif # USE_64
  208. SECURITY_TOOLS = $(addsuffix $(EXE_SUFFIX),$(SECURITY_BINNAMES))
  209. SECURITY_TOOLS_FULLPATH = $(addprefix $(SECURITY_BINPATH)/, $(SECURITY_TOOLS))
  210. SECURITY_LIBS_TO_PKG = $(addsuffix .$(DLL_SUFFIX),$(addprefix $(SECURITY_LIBPATH)/$(LIB_PREFIX),$(SECURITY_LIBNAMES.pkg)))
  211. SECURITY_LIBS_TO_PKG += $(addsuffix .chk,$(addprefix $(SECURITY_LIBPATH)/$(LIB_PREFIX),$(SECURITY_NEED_CHK)))
  212. LIBS_TO_PKG += $(SECURITY_LIBS_TO_PKG)
  213. LIBS_TO_PKG_SHARED += $(SECURITY_LIBS_TO_PKG) # for cmd line tools
  214. ifeq ($(USE_SETUPSDK), 1)
  215. PACKAGE_SETUP_LIBS += $(SECURITY_LIBS_TO_PKG)
  216. endif
  217. ifeq ($(USE_DSGW), 1)
  218. LIBS_TO_PKG_CLIENTS += $(SECURITY_LIBS_TO_PKG) # for dsgw
  219. endif
  220. ifeq ($(ARCH), WINNT)
  221. SECURITYOBJNAME = $(addsuffix .$(LIB_SUFFIX), $(SECURITY_LIBNAMES))
  222. LIBSECURITY = $(addprefix $(SECURITY_LIBPATH)/, $(SECURITYOBJNAME))
  223. SECURITYLINK = /LIBPATH:$(SECURITY_LIBPATH) $(SECURITYOBJNAME)
  224. else
  225. SECURITYOBJNAME = $(addsuffix .$(DLL_SUFFIX), $(addprefix $(LIB_PREFIX), $(SECURITY_LIBNAMES)))
  226. LIBSECURITY = $(addprefix $(SECURITY_LIBPATH)/, $(SECURITYOBJNAME))
  227. SECURITYLINK = -L$(SECURITY_LIBPATH) $(addprefix -l, $(SECURITY_LIBNAMES))
  228. endif
  229. # we need to package the root cert file in the alias directory
  230. PACKAGE_SRC_DEST += $(SECURITY_LIBPATH)/$(LIB_PREFIX)nssckbi.$(DLL_SUFFIX) alias
  231. # need to package the sec tools in shared/bin
  232. BINS_TO_PKG_SHARED += $(SECURITY_TOOLS_FULLPATH)
  233. ### SECURITY END #############################
  234. ### SVRCORE #############################
  235. ifdef SVRCORE_SOURCE_ROOT
  236. SVRCORE_LIBPATH = $(SVRCORE_SOURCE_ROOT)/dist/$(MOZ_OBJDIR_NAME)/lib
  237. SVRCORE_INCDIR = $(SVRCORE_SOURCE_ROOT)/dist/public/svrcore
  238. else
  239. SVRCORE_LIBPATH = $(SVRCORE_BUILD_DIR)/lib
  240. SVRCORE_INCDIR = $(SVRCORE_BUILD_DIR)/include
  241. endif
  242. SVRCORE_INCLUDE = -I$(SVRCORE_INCDIR)
  243. SVRCORE_LIBNAMES = svrcore
  244. ifeq ($(ARCH), WINNT)
  245. SVRCOREOBJNAME = $(addsuffix .lib, $(SVRCORE_LIBNAMES))
  246. LIBSVRCORE = $(addprefix $(SVRCORE_LIBPATH)/, $(SVRCOREOBJNAME))
  247. SVRCORELINK = /LIBPATH:$(SVRCORE_LIBPATH) $(SVRCOREOBJNAME)
  248. else
  249. SVRCOREOBJNAME = $(addsuffix .a, $(addprefix $(LIB_PREFIX), $(SVRCORE_LIBNAMES)))
  250. LIBSVRCORE = $(addprefix $(SVRCORE_LIBPATH)/, $(SVRCOREOBJNAME))
  251. SVRCORELINK = -L$(SVRCORE_LIBPATH) $(addprefix -l, $(SVRCORE_LIBNAMES))
  252. endif
  253. ### SVRCORE END #############################
  254. ####################################################
  255. # LDAP SDK
  256. ###################################################
  257. ifdef LDAPSDK_SOURCE_ROOT
  258. LDAPSDK_LIBPATH = $(LDAPSDK_SOURCE_ROOT)/dist/lib
  259. LDAPSDK_INCDIR = $(LDAPSDK_SOURCE_ROOT)/dist/public/ldap
  260. LDAPSDK_BINPATH = $(LDAPSDK_SOURCE_ROOT)/dist/bin
  261. else
  262. LDAPSDK_LIBPATH = $(LDAP_ROOT)/lib
  263. LDAPSDK_INCDIR = $(LDAP_ROOT)/include
  264. LDAPSDK_BINPATH = $(LDAP_ROOT)/tools
  265. endif
  266. LDAPSDK_INCLUDE = -I$(LDAPSDK_INCDIR)
  267. # package the command line programs
  268. LDAPSDK_TOOLS = $(wildcard $(LDAPSDK_BINPATH)/ldap*$(EXE_SUFFIX))
  269. BINS_TO_PKG_SHARED += $(LDAPSDK_TOOLS)
  270. # package the include files - needed for the plugin API
  271. LDAPSDK_INCLUDE_FILES = $(wildcard $(LDAPSDK_INCDIR)/*.h)
  272. PACKAGE_SRC_DEST += $(subst $(SPACE),$(SPACE)plugins/slapd/slapi/include$(SPACE),$(LDAPSDK_INCLUDE_FILES))
  273. PACKAGE_SRC_DEST += plugins/slapd/slapi/include
  274. ifeq ($(ARCH), WINNT)
  275. LDAP_LIBNAMES = ldapssl32v$(LDAP_SUF) ldap32v$(LDAP_SUF) ldappr32v$(LDAP_SUF)
  276. LDAPDLL_NAME = $(addprefix ns, $(LDAP_LIBNAMES))
  277. LDAPOBJNAME = $(addsuffix .$(LIB_SUFFIX), $(LDAPDLL_NAME))
  278. LDAPLINK = /LIBPATH:$(LDAPSDK_LIBPATH) $(LDAPOBJNAME)
  279. LDAP_NOSSL_LINK = /LIBPATH:$(LDAPSDK_LIBPATH) nsldap32v$(LDAP_SUF).$(LIB_SUFFIX)
  280. LIBLDAPDLL_NAMES = $(addsuffix .dll, $(addprefix $(LDAP_LIBPATH)/, $(LDAPDLL_NAME)))
  281. LIBS_TO_PKG += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(LDAPSDK_LIBPATH)/,$(LDAPDLL_NAME)))
  282. LIBS_TO_PKG_SHARED += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(LDAPSDK_LIBPATH)/,$(LDAPDLL_NAME)))
  283. ifeq ($(USE_SETUPSDK), 1)
  284. PACKAGE_SETUP_LIBS += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(LDAPSDK_LIBPATH)/,$(LDAPDLL_NAME)))
  285. endif
  286. ifeq ($(USE_DSGW), 1)
  287. LIBS_TO_PKG_CLIENTS += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(LDAPSDK_LIBPATH)/,$(LDAPDLL_NAME)))
  288. endif
  289. else # not WINNT
  290. LDAP_SOLIB_NAMES = ssldap$(LDAP_SUF)$(LDAP_DLL_PRESUF) ldap$(LDAP_SUF)$(LDAP_DLL_PRESUF) prldap$(LDAP_SUF)$(LDAP_DLL_PRESUF)
  291. ifndef LDAP_NO_LIBLCACHE
  292. LDAP_SOLIB_NAMES += lcache30$(LDAP_DLL_PRESUF)
  293. endif
  294. LDAP_DOTALIB_NAMES =
  295. LDAP_LIBNAMES = $(LDAP_DOTALIB_NAMES) $(LDAP_SOLIB_NAMES)
  296. LDAP_SOLIBS = $(addsuffix .$(LDAP_DLL_SUFFIX), $(addprefix $(LIB_PREFIX), $(LDAP_SOLIB_NAMES)))
  297. LDAPOBJNAME = $(addsuffix .$(LIB_SUFFIX), $(addprefix $(LIB_PREFIX), $(LDAP_DOTALIB_NAMES))) \
  298. $(LDAP_SOLIBS)
  299. LDAPLINK = -L$(LDAPSDK_LIBPATH) $(addprefix -l,$(LDAP_SOLIB_NAMES))
  300. LDAP_NOSSL_LINK = -L$(LDAPSDK_LIBPATH) -lldap$(LDAP_SUF)$(LDAP_DLL_PRESUF)
  301. LIBS_TO_PKG += $(addprefix $(LDAPSDK_LIBPATH)/,$(LDAP_SOLIBS))
  302. LIBS_TO_PKG_SHARED += $(addprefix $(LDAPSDK_LIBPATH)/,$(LDAP_SOLIBS))
  303. ifeq ($(USE_SETUPSDK), 1)
  304. PACKAGE_SETUP_LIBS += $(addprefix $(LDAPSDK_LIBPATH)/,$(LDAP_SOLIBS))
  305. endif
  306. ifeq ($(USE_DSGW), 1)
  307. LIBS_TO_PKG_CLIENTS += $(addprefix $(LDAPSDK_LIBPATH)/,$(LDAP_SOLIBS))
  308. endif
  309. endif
  310. LDAP_LIBPATH = $(LDAPSDK_LIBPATH)
  311. LDAP_INCLUDE = $(LDAPSDK_INCDIR)
  312. LDAP_TOOLDIR = $(LDAPSDK_BINPATH)
  313. LIBLDAP = $(addprefix $(LDAP_LIBPATH)/, $(LDAPOBJNAME))
  314. ### SASL package ##########################################
  315. ifdef SASL_SOURCE_ROOT
  316. SASL_LIBPATH = $(SASL_SOURCE_ROOT)/lib
  317. SASL_BINPATH = $(SASL_SOURCE_ROOT)/bin
  318. SASL_INCDIR = $(SASL_SOURCE_ROOT)/include
  319. else
  320. SASL_LIBPATH = $(SASL_BUILD_DIR)/lib
  321. SASL_BINPATH = $(SASL_BUILD_DIR)/bin
  322. SASL_INCDIR = $(SASL_BUILD_DIR)/include
  323. endif
  324. SASL_INCLUDE = $(SASL_INCDIR)
  325. ifeq ($(ARCH), WINNT)
  326. SASL_LIB_ROOT_NAME = sasl
  327. SASL_LINK = /LIBPATH:$(SASL_LIBPATH) lib$(SASL_LIB_ROOT_NAME).lib
  328. SASL_LIBS = lib$(SASL_LIB_ROOT_NAME).lib,lib$(SASL_LIB_ROOT_NAME).dll,saslDIGESTMD5.dll
  329. else
  330. # for cyrus it's sasl2
  331. SASL_LIB_ROOT_NAME = sasl2
  332. SASL_LIBS = lib$(SASL_LIB_ROOT_NAME).a
  333. ifeq ($(ARCH), Linux)
  334. GSSAPI_LIBS=-L/usr/kerberos/lib -lgssapi_krb5
  335. endif
  336. ifeq ($(ARCH), SOLARIS)
  337. GSSAPI_LIBS=-lgss
  338. endif
  339. ifeq ($(ARCH), HPUX)
  340. GSSAPI_LIBS=-lgss
  341. ifeq ($(USE_64),1)
  342. GSSAPI_LIBS=-L/usr/lib/pa20_64 -lgss
  343. endif
  344. endif
  345. SASL_LINK = -L$(SASL_LIBPATH) -l$(SASL_LIB_ROOT_NAME) $(GSSAPI_LIBS)
  346. endif
  347. ###########################################################
  348. ### Net-SNMP package ######################################
  349. ifdef NETSNMP_SOURCE_ROOT
  350. NETSNMP_LIBPATH = $(NETSNMP_SOURCE_ROOT)/built/lib
  351. NETSNMP_INCDIR = $(NETSNMP_SOURCE_ROOT)/built/include
  352. NETSNMP_BINDIR = $(NETSNMP_SOURCE_ROOT)/built/bin
  353. else
  354. NETSNMP_LIBPATH = $(NETSNMP_BUILD_DIR)/lib
  355. NETSNMP_INCDIR = $(NETSNMP_BUILD_DIR)/include
  356. NETSNMP_BINDIR = $(NETSNMP_BUILD_DIR)/bin
  357. endif
  358. NETSNMP_INCLUDE = -I$(NETSNMP_INCDIR)
  359. NETSNMP_LIBNAMES = netsnmp netsnmpagent netsnmpmibs netsnmphelpers
  360. NETSNMP_LINK = -L$(NETSNMP_LIBPATH) $(addprefix -l, $(NETSNMP_LIBNAMES))
  361. ifneq ($(ARCH), WINNT)
  362. ifeq ($(ARCH), HPUX)
  363. NETSNMP_SOLIBS = $(addsuffix .$(DLL_SUFFIX).7, $(addprefix $(LIB_PREFIX), $(NETSNMP_LIBNAMES)))
  364. else
  365. NETSNMP_SOLIBS = $(addsuffix .$(DLL_SUFFIX).5, $(addprefix $(LIB_PREFIX), $(NETSNMP_LIBNAMES)))
  366. endif
  367. LIBS_TO_PKG += $(addprefix $(NETSNMP_LIBPATH)/,$(NETSNMP_SOLIBS))
  368. endif
  369. ###########################################################
  370. ### ICU package ##########################################
  371. ICU_LIB_VERSION = 24
  372. ifdef ICU_SOURCE_ROOT
  373. ICU_LIBPATH = $(ICU_SOURCE_ROOT)/built/lib
  374. ICU_BINPATH = $(ICU_SOURCE_ROOT)/built/bin
  375. ICU_INCPATH = $(ICU_SOURCE_ROOT)/built/include
  376. else
  377. ICU_LIBPATH = $(ICU_BUILD_DIR)/lib
  378. ICU_BINPATH = $(ICU_BUILD_DIR)/bin
  379. ICU_INCPATH = $(ICU_BUILD_DIR)/include
  380. endif
  381. ICU_INCLUDE = -I$(ICU_INCPATH)
  382. ifeq ($(ARCH), WINNT)
  383. ifeq ($(BUILD_DEBUG), optimize)
  384. ICU_LIB_SUF=
  385. else
  386. ICU_LIB_SUF=d
  387. endif
  388. ICU_LIBNAMES = icuin$(ICU_LIB_SUF) icuuc$(ICU_LIB_SUF) icudata
  389. ICU_DLLNAMES = icuin$(ICU_LIB_VERSION)$(ICU_LIB_SUF) icuuc$(ICU_LIB_VERSION)$(ICU_LIB_SUF) icudt$(ICU_LIB_VERSION)l
  390. ICULINK = /LIBPATH:$(ICU_LIBPATH) $(addsuffix .$(LIB_SUFFIX),$(ICU_LIBNAMES))
  391. LIBS_TO_PKG += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(ICU_BINPATH)/,$(ICU_DLLNAMES)))
  392. LIBS_TO_PKG_SHARED += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(ICU_BINPATH)/,$(ICU_DLLNAMES)))
  393. ifeq ($(USE_DSGW), 1)
  394. LIBS_TO_PKG_CLIENTS += $(addsuffix .$(DLL_SUFFIX),$(addprefix $(ICU_BINPATH)/,$(ICU_DLLNAMES)))
  395. endif
  396. else
  397. ICU_LIBNAMES = icui18n icuuc icudata
  398. ICULINK = -L$(ICU_LIBPATH) $(addprefix -l, $(ICU_LIBNAMES))
  399. LIBS_TO_PKG += $(addsuffix .$(ICU_LIB_VERSION),$(addsuffix .$(DLL_SUFFIX),$(addprefix $(ICU_LIBPATH)/,$(addprefix lib,$(ICU_LIBNAMES)))))
  400. LIBS_TO_PKG_SHARED += $(addsuffix .$(ICU_LIB_VERSION),$(addsuffix .$(DLL_SUFFIX),$(addprefix $(ICU_LIBPATH)/,$(addprefix lib,$(ICU_LIBNAMES)))))
  401. ifeq ($(USE_DSGW), 1)
  402. LIBS_TO_PKG_CLIENTS += $(addsuffix .$(ICU_LIB_VERSION),$(addsuffix .$(DLL_SUFFIX),$(addprefix $(ICU_LIBPATH)/,$(addprefix lib,$(ICU_LIBNAMES)))))
  403. endif
  404. #LIBS_TO_PKG = $(addsuffix $(addprefix lib,$(ICU_LIBNAMES))
  405. endif
  406. BINS_TO_PKG_SHARED += $(ICU_BINPATH)/uconv$(EXE_SUFFIX)
  407. ###########################################################
  408. ### DB component (Berkeley DB) ############################
  409. DB_LIBNAME=lib$(DB_MAJOR_MINOR)
  410. ifdef DB_SOURCE_ROOT
  411. DB_INCLUDE =$(DB_SOURCE_ROOT)/built
  412. DB_LIBPATH =$(DB_SOURCE_ROOT)/built/.libs
  413. DB_BINPATH =$(DB_SOURCE_ROOT)/built
  414. else
  415. DB_INCLUDE =$(db_path_config)/include
  416. DB_LIBPATH =$(db_path_config)/lib
  417. DB_BINPATH =$(db_path_config)/bin
  418. endif
  419. ifeq ($(ARCH), WINNT)
  420. db_import_lib_suffix =$(LIB_SUFFIX)
  421. DB_LIB =$(DB_LIBPATH)/$(DB_LIBNAME).$(db_import_lib_suffix)
  422. DB_STATIC_LIB =$(DB_LIBPATH)/$(DB_LIBNAME).$(LIB_SUFFIX)
  423. else # not WINNT
  424. db_import_lib_suffix =$(DLL_SUFFIX)
  425. DB_LIB =-L$(DB_LIBPATH) -l$(DB_MAJOR_MINOR)
  426. # XXXsspitzer: we need the spinlock symbols staticly linked in to libdb
  427. DB_STATIC_LIB =-L$(DB_LIBPATH) -ldbs
  428. endif # not WINNT
  429. # libdb only needs to be in the server directory since only the server uses it
  430. PACKAGE_SRC_DEST += $(wildcard $(DB_LIBPATH)/*.$(DLL_SUFFIX)) bin/slapd/server
  431. ### DB component (Berkeley DB) ############################
  432. # must define dependencies last because they depend on the definitions above
  433. ifeq ($(INTERNAL_BUILD), 1)
  434. include $(BUILD_ROOT)/internal_comp_deps.mk
  435. endif