summaryrefslogtreecommitdiff
path: root/lib/Makefile
blob: 8eedad0b259c76be5d399d95c47bb0dd642de541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#! gmake
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY).   #
#######################################################################

include manifest.mn

#######################################################################
# (2) Include "global" configuration information. (OPTIONAL)          #
#######################################################################

include $(CORE_DEPTH)/coreconf/config.mk

#######################################################################
# (3) Include "component" configuration information. (OPTIONAL)       #
#######################################################################



#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
#######################################################################

ifndef USE_SYSTEM_ZLIB
ZLIB_SRCDIR = zlib  # Add the zlib directory to DIRS.
endif

ifndef MOZILLA_CLIENT
ifndef NSS_USE_SYSTEM_SQLITE
SQLITE_SRCDIR = sqlite  # Add the sqlite directory to DIRS.
endif
endif

ifndef MOZILLA_CLIENT
ifeq ($(OS_ARCH),Linux)
SYSINIT_SRCDIR = sysinit  # Add the sysinit directory to DIRS.
endif
endif

ifndef NSS_DISABLE_DBM
DBM_SRCDIR = dbm  # Add the dbm directory to DIRS.
endif

ifeq ($(NSS_BUILD_UTIL_ONLY),1)
SYSINIT_SRCDIR=
endif

ifndef NSS_DISABLE_LIBPKIX
LIBPKIX_SRCDIR = libpkix  # Add the libpkix directory to DIRS.
endif

#######################################################################
# (5) Execute "global" rules. (OPTIONAL)                              #
#######################################################################

include $(CORE_DEPTH)/coreconf/rules.mk

#######################################################################
# (6) Execute "component" rules. (OPTIONAL)                           #
#######################################################################



#######################################################################
# (7) Execute "local" rules. (OPTIONAL).                              #
#######################################################################

ifeq ($(NSS_BUILD_UTIL_ONLY),1)
  UTIL_SRCDIR = util
  FREEBL_SRCDIR =
  SOFTOKEN_SRCDIR =
else
  ifeq ($(NSS_BUILD_SOFTOKEN_ONLY),1)
      UTIL_SRCDIR =
      FREEBL_SRCDIR = freebl
      SOFTOKEN_SRCDIR = softoken
  else
    ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1)
      # Not included when building nss without softoken
      # This build type uses the build results of the prior
      # NSS_BUILD_UTIL_ONLY and NSS_BUILD_SOFTOKEN_ONLY builds
      UTIL_SRCDIR =
      FREEBL_SRCDIR =
      SOFTOKEN_SRCDIR =
    else
      # default is to include all
      UTIL_SRCDIR = util
      FREEBL_SRCDIR = freebl
      SOFTOKEN_SRCDIR = softoken
    endif
  endif
endif