1#
2# This Source Code Form is subject to the terms of the Mozilla Public
3# License, v. 2.0. If a copy of the MPL was not distributed with this
4# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
6#######################################################################
7# Master <component>-specific source import/export directories        #
8#######################################################################
9
10#
11# <user_source_tree> master import/export directory prefix
12#
13
14ifndef SOURCE_PREFIX
15    ifndef BUILD_TREE
16	SOURCE_PREFIX = $(CORE_DEPTH)/../dist
17    else
18	SOURCE_PREFIX = $(BUILD_TREE)/dist
19    endif
20endif
21
22#
23# <user_source_tree> cross-platform (xp) master import/export directory
24#
25
26ifndef SOURCE_XP_DIR
27    SOURCE_XP_DIR        = $(SOURCE_PREFIX)
28endif
29
30#
31# <user_source_tree> cross-platform (xp) import/export directories
32#
33
34SOURCE_CLASSES_DIR     = $(SOURCE_XP_DIR)/classes
35SOURCE_CLASSES_DBG_DIR = $(SOURCE_XP_DIR)/classes_DBG
36SOURCE_XPHEADERS_DIR   = $(SOURCE_XP_DIR)/public/$(MODULE)
37SOURCE_XPPRIVATE_DIR   = $(SOURCE_XP_DIR)/private/$(MODULE)
38
39ifdef BUILD_OPT
40    IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DIR)
41else
42    IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR)
43endif
44
45#
46# <user_source_tree> machine-dependent (md) master import/export directory
47#
48
49ifndef SOURCE_MD_DIR
50    SOURCE_MD_DIR        = $(SOURCE_PREFIX)/$(PLATFORM)
51endif
52
53#
54# <user_source_tree> machine-dependent (md) import/export directories
55#
56
57#This is where we install built executables and (for Windows only) DLLs.
58ifndef SOURCE_BIN_DIR
59    SOURCE_BIN_DIR       = $(SOURCE_MD_DIR)/bin
60endif
61
62#This is where we install built libraries (.a, .so, .lib).
63ifndef SOURCE_LIB_DIR
64    SOURCE_LIB_DIR       = $(SOURCE_MD_DIR)/lib
65endif
66
67# This is where NSPR header files are found.
68ifndef SOURCE_MDHEADERS_DIR
69    SOURCE_MDHEADERS_DIR = $(SOURCE_MD_DIR)/include
70endif
71
72#######################################################################
73# Master <component>-specific source release directories and files    #
74#######################################################################
75
76#
77# <user_source_tree> source-side master release directory prefix
78# NOTE:  export control policy enforced for XP and MD files released to
79#        the staging area
80#
81
82ifeq ($(POLICY), domestic)
83    SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/domestic
84else
85    ifeq ($(POLICY), export)
86	SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/export
87    else
88	ifeq ($(POLICY), france)
89	    SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/france
90	else
91#We shouldn't have to put another directory under here, but without it the perl
92#script for releasing doesn't find the directory. It thinks it doesn't exist.
93#So we're adding this no-policy directory so that the script for releasing works
94#in all casese when policy is not set. This doesn't affect where the final jar
95#files land, only where they are placed in the local tree when building the jar
96#files. When there is no policy, the jar files will still land in
97#<dist>/<module>/<date>/<platform> like they used to.
98	    SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/no-policy
99	endif
100    endif
101endif
102
103#
104# <user_source_tree> cross-platform (xp) source-side master release directory
105#
106
107SOURCE_RELEASE_XP_DIR = $(SOURCE_RELEASE_PREFIX)
108
109#
110# <user_source_tree> cross-platform (xp) source-side release directories
111#
112
113SOURCE_RELEASE_CLASSES_DIR     = classes
114SOURCE_RELEASE_CLASSES_DBG_DIR = classes_DBG
115SOURCE_RELEASE_XPHEADERS_DIR   = include
116
117#
118# <user_source_tree> cross-platform (xp) JAR source-side release files
119#
120
121XPCLASS_JAR     = xpclass.jar
122XPCLASS_DBG_JAR = xpclass_dbg.jar
123XPHEADER_JAR    = xpheader.jar
124
125ifdef BUILD_OPT
126    SOURCE_RELEASE_XP_CLASSES_DIR = $(SOURCE_RELEASE_CLASSES_DIR)
127    IMPORT_XPCLASS_JAR = $(XPCLASS_JAR)
128else
129    SOURCE_RELEASE_XP_CLASSES_DIR = $(SOURCE_RELEASE_CLASSES_DBG_DIR)
130    IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR)
131endif
132
133#
134# <user_source_tree> machine-dependent (md) source-side master release directory
135#
136
137SOURCE_RELEASE_MD_DIR = $(PLATFORM)
138
139#
140# <user_source_tree> machine-dependent (md) source-side release directories
141#
142
143SOURCE_RELEASE_BIN_DIR       = $(PLATFORM)/bin
144SOURCE_RELEASE_LIB_DIR       = $(PLATFORM)/lib
145SOURCE_RELEASE_MDHEADERS_DIR = $(PLATFORM)/include
146SOURCE_RELEASE_SPEC_DIR      = $(SOURCE_RELEASE_MD_DIR)
147
148#
149# <user_source_tree> machine-dependent (md) JAR/tar source-side release files
150#
151
152MDBINARY_JAR = mdbinary.jar
153MDHEADER_JAR = mdheader.jar
154
155
156# Where to put the results
157
158ifneq ($(RESULTS_DIR),)
159    RESULTS_DIR = $(RELEASE_TREE)/sectools/results
160endif
161
162MK_SOURCE = included
163