]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/apr-util/dbm/NWGNUdbmdb
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / apr-util / dbm / NWGNUdbmdb
1 #
2 # Declare the sub-directories to be built here
3 #
4
5 SUBDIRS = \
6         $(EOLIST)
7
8 #
9 # Get the 'head' of the build environment.  This includes default targets and
10 # paths to tools
11 #
12
13 ifndef EnvironmentDefined
14 include $(APR_WORK)/build/NWGNUhead.inc
15 endif
16
17 #
18 # build this level's files
19
20 #
21 # Make sure all needed macro's are defined
22 #
23
24 # LINK_STATIC = 1
25
26 # for now defined here - should finally go into build/NWGNUenvironment.inc
27 DB_INC = $(DBSDK)/inc
28 DB_IMP = libdb47.imp
29 DB_LIB = libdb47.lib
30 DB_NLM = libdb47
31
32 #
33 # These directories will be at the beginning of the include list, followed by
34 # INCDIRS
35 #
36 XINCDIRS        += \
37                         $(APR)/include/arch/netware \
38                         $(APR)/include \
39                         $(APU)/include \
40                         $(APU)/include/private \
41                         $(APR) \
42                         $(DB_INC) \
43                         $(EOLIST)
44
45 #
46 # These flags will come after CFLAGS
47 #
48 XCFLAGS         += \
49                         $(EOLIST)
50
51 #
52 # These defines will come after DEFINES
53 #
54 XDEFINES        += \
55                         -DAPU_DSO_MODULE_BUILD \
56                         -DAPU_HAVE_DB=1 \
57                         -DAPU_HAVE_DB_VERSION=4 \
58                         $(EOLIST)
59
60 #
61 # These flags will be added to the link.opt file
62 #
63 XLFLAGS         += \
64                         $(EOLIST)
65
66 ifdef LINK_STATIC
67 XLFLAGS         += \
68                         -l $(DBSDK)/lib \
69                         $(EOLIST)
70 else
71 XLFLAGS         += \
72                         -l $(DBSDK)/imp \
73                         $(EOLIST)
74 endif
75
76 #
77 # These values will be appended to the correct variables based on the value of
78 # RELEASE
79 #
80 ifeq "$(RELEASE)" "debug"
81 XINCDIRS        += \
82                         $(EOLIST)
83
84 XCFLAGS         += \
85                         $(EOLIST)
86
87 XDEFINES        += \
88                         $(EOLIST)
89
90 XLFLAGS         += \
91                         $(EOLIST)
92 endif
93
94 ifeq "$(RELEASE)" "noopt"
95 XINCDIRS        += \
96                         $(EOLIST)
97
98 XCFLAGS         += \
99                         $(EOLIST)
100
101 XDEFINES        += \
102                         $(EOLIST)
103
104 XLFLAGS         += \
105                         $(EOLIST)
106 endif
107
108 ifeq "$(RELEASE)" "release"
109 XINCDIRS        += \
110                         $(EOLIST)
111
112 XCFLAGS         += \
113                         $(EOLIST)
114
115 XDEFINES        += \
116                         $(EOLIST)
117
118 XLFLAGS         += \
119                         $(EOLIST)
120 endif
121
122 #
123 # These are used by the link target if an NLM is being generated
124 # This is used by the link 'name' directive to name the nlm.  If left blank
125 # TARGET_nlm (see below) will be used.
126 #
127 NLM_NAME        = dbmdb
128
129 #
130 # This is used by the link '-desc ' directive.
131 # If left blank, NLM_NAME will be used.
132 #
133 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBM Berkeley DB Driver Module
134
135 #
136 # This is used by the '-threadname' directive.  If left blank,
137 # NLM_NAME Thread will be used.
138 #
139 NLM_THREAD_NAME = dbmdb
140
141 #
142 # If this is specified, it will override VERSION value in
143 # $(AP_WORK)\build\NWGNUenvironment.inc
144 #
145 NLM_VERSION     =
146
147 #
148 # If this is specified, it will override the default of 64K
149 #
150 NLM_STACK_SIZE  = 8192
151
152
153 #
154 # If this is specified it will be used by the link '-entry' directive
155 #
156 NLM_ENTRY_SYM   =
157
158 #
159 # If this is specified it will be used by the link '-exit' directive
160 #
161 NLM_EXIT_SYM    =
162
163 #
164 # If this is specified it will be used by the link '-check' directive
165 #
166 NLM_CHECK_SYM   =
167
168 #
169 # If these are specified it will be used by the link '-flags' directive
170 #
171 NLM_FLAGS       =
172
173 #
174 # If this is specified it will be linked in with the XDCData option in the def
175 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
176 # by setting APACHE_UNIPROC in the environment
177 #
178 XDCDATA         =
179
180 #
181 # If there is an NLM target, put it here
182 #
183 TARGET_nlm = \
184         $(OBJDIR)\$(NLM_NAME).nlm \
185         $(EOLIST)
186
187 #
188 # If there is an LIB target, put it here
189 #
190 TARGET_lib = \
191         $(EOLIST)
192
193 #
194 # These are the OBJ files needed to create the NLM target above.
195 # Paths must all use the '/' character
196 #
197 FILES_nlm_objs = \
198         $(OBJDIR)/apr_dbm_berkeleydb.o \
199         $(EOLIST)
200
201 #
202 # These are the LIB files needed to create the NLM target above.
203 # These will be added as a library command in the link.opt file.
204 #
205 FILES_nlm_libs = \
206         $(PRELUDE) \
207         $(EOLIST)
208
209 ifeq ($(LINK_STATIC),1)
210 FILES_nlm_libs += \
211         $(DB_LIB) \
212         $(EOLIST)
213 endif
214
215 #
216 # These are the modules that the above NLM target depends on to load.
217 # These will be added as a module command in the link.opt file.
218 #
219 FILES_nlm_modules = \
220         aprlib \
221         libc \
222         $(EOLIST)
223
224 ifneq ($(LINK_STATIC),1)
225 FILES_nlm_modules += \
226         $(DB_NLM) \
227         $(EOLIST)
228 endif
229
230 #
231 # If the nlm has a msg file, put it's path here
232 #
233 FILE_nlm_msg =
234
235 #
236 # If the nlm has a hlp file put it's path here
237 #
238 FILE_nlm_hlp =
239
240 #
241 # If this is specified, it will override $(NWOS)\copyright.txt.
242 #
243 FILE_nlm_copyright =
244
245 #
246 # Any additional imports go here
247 #
248 FILES_nlm_Ximports = \
249         @aprlib.imp \
250         @libc.imp \
251         $(EOLIST)
252
253 ifneq ($(LINK_STATIC),1)
254 FILES_nlm_Ximports += \
255         @$(DB_IMP) \
256         $(EOLIST)
257 endif
258
259 #
260 # Any symbols exported to here
261 #
262 FILES_nlm_exports = \
263         apr_dbm_type_db \
264         $(EOLIST)
265
266 #
267 # These are the OBJ files needed to create the LIB target above.
268 # Paths must all use the '/' character
269 #
270 FILES_lib_objs = \
271         $(EOLIST)
272
273 #
274 # implement targets and dependancies (leave this section alone)
275 #
276
277 libs :: $(OBJDIR) $(TARGET_lib)
278
279 nlms :: libs $(TARGET_nlm)
280
281 #
282 # Updated this target to create necessary directories and copy files to the
283 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
284 #
285 install :: nlms FORCE
286
287 #
288 # Any specialized rules here
289 #
290
291 #
292 # Include the 'tail' makefile that has targets that depend on variables defined
293 # in this makefile
294 #
295
296 include $(APRBUILD)/NWGNUtail.inc
297
298
299