]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/apr-util/dbm/NWGNUdbmgdbm
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / apr-util / dbm / NWGNUdbmgdbm
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 GDBM_INC = $(GDBMSDK)/inc
28 GDBM_IMP = libgdbm.imp
29 GDBM_LIB = libgdbm.lib
30 GDBM_NLM = libgdbm
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                         $(GDBM_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_GDBM=1 \
57                         $(EOLIST)
58
59 #
60 # These flags will be added to the link.opt file
61 #
62 XLFLAGS         += \
63                         $(EOLIST)
64
65 ifdef LINK_STATIC
66 XLFLAGS         += \
67                         -l $(GDBMSDK)/lib \
68                         $(EOLIST)
69 else
70 XLFLAGS         += \
71                         -l $(GDBMSDK)/imp \
72                         $(EOLIST)
73 endif
74
75 #
76 # These values will be appended to the correct variables based on the value of
77 # RELEASE
78 #
79 ifeq "$(RELEASE)" "debug"
80 XINCDIRS        += \
81                         $(EOLIST)
82
83 XCFLAGS         += \
84                         $(EOLIST)
85
86 XDEFINES        += \
87                         $(EOLIST)
88
89 XLFLAGS         += \
90                         $(EOLIST)
91 endif
92
93 ifeq "$(RELEASE)" "noopt"
94 XINCDIRS        += \
95                         $(EOLIST)
96
97 XCFLAGS         += \
98                         $(EOLIST)
99
100 XDEFINES        += \
101                         $(EOLIST)
102
103 XLFLAGS         += \
104                         $(EOLIST)
105 endif
106
107 ifeq "$(RELEASE)" "release"
108 XINCDIRS        += \
109                         $(EOLIST)
110
111 XCFLAGS         += \
112                         $(EOLIST)
113
114 XDEFINES        += \
115                         $(EOLIST)
116
117 XLFLAGS         += \
118                         $(EOLIST)
119 endif
120
121 #
122 # These are used by the link target if an NLM is being generated
123 # This is used by the link 'name' directive to name the nlm.  If left blank
124 # TARGET_nlm (see below) will be used.
125 #
126 NLM_NAME        = dbmgdbm
127
128 #
129 # This is used by the link '-desc ' directive.
130 # If left blank, NLM_NAME will be used.
131 #
132 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) GDBM Driver Module
133
134 #
135 # This is used by the '-threadname' directive.  If left blank,
136 # NLM_NAME Thread will be used.
137 #
138 NLM_THREAD_NAME = dbmgdbm
139
140 #
141 # If this is specified, it will override VERSION value in
142 # $(AP_WORK)\build\NWGNUenvironment.inc
143 #
144 NLM_VERSION     =
145
146 #
147 # If this is specified, it will override the default of 64K
148 #
149 NLM_STACK_SIZE  = 8192
150
151
152 #
153 # If this is specified it will be used by the link '-entry' directive
154 #
155 NLM_ENTRY_SYM   =
156
157 #
158 # If this is specified it will be used by the link '-exit' directive
159 #
160 NLM_EXIT_SYM    =
161
162 #
163 # If this is specified it will be used by the link '-check' directive
164 #
165 NLM_CHECK_SYM   =
166
167 #
168 # If these are specified it will be used by the link '-flags' directive
169 #
170 NLM_FLAGS       =
171
172 #
173 # If this is specified it will be linked in with the XDCData option in the def
174 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
175 # by setting APACHE_UNIPROC in the environment
176 #
177 XDCDATA         =
178
179 #
180 # If there is an NLM target, put it here
181 #
182 TARGET_nlm = \
183         $(OBJDIR)\$(NLM_NAME).nlm \
184         $(EOLIST)
185
186 #
187 # If there is an LIB target, put it here
188 #
189 TARGET_lib = \
190         $(EOLIST)
191
192 #
193 # These are the OBJ files needed to create the NLM target above.
194 # Paths must all use the '/' character
195 #
196 FILES_nlm_objs = \
197         $(OBJDIR)/apr_dbm_gdbm.o \
198         $(EOLIST)
199
200 #
201 # These are the LIB files needed to create the NLM target above.
202 # These will be added as a library command in the link.opt file.
203 #
204 FILES_nlm_libs = \
205         $(PRELUDE) \
206         $(EOLIST)
207
208 ifeq ($(LINK_STATIC),1)
209 FILES_nlm_libs += \
210         $(GDBM_LIB) \
211         $(EOLIST)
212 endif
213
214 #
215 # These are the modules that the above NLM target depends on to load.
216 # These will be added as a module command in the link.opt file.
217 #
218 FILES_nlm_modules = \
219         aprlib \
220         libc \
221         $(EOLIST)
222
223 ifneq ($(LINK_STATIC),1)
224 FILES_nlm_modules += \
225         $(GDBM_NLM) \
226         $(EOLIST)
227 endif
228
229 #
230 # If the nlm has a msg file, put it's path here
231 #
232 FILE_nlm_msg =
233
234 #
235 # If the nlm has a hlp file put it's path here
236 #
237 FILE_nlm_hlp =
238
239 #
240 # If this is specified, it will override $(NWOS)\copyright.txt.
241 #
242 FILE_nlm_copyright =
243
244 #
245 # Any additional imports go here
246 #
247 FILES_nlm_Ximports = \
248         @aprlib.imp \
249         @libc.imp \
250         $(EOLIST)
251
252 ifneq ($(LINK_STATIC),1)
253 FILES_nlm_Ximports += \
254         @$(GDBM_IMP) \
255         $(EOLIST)
256 endif
257
258 #
259 # Any symbols exported to here
260 #
261 FILES_nlm_exports = \
262         apr_dbm_type_gdbm \
263         $(EOLIST)
264
265 #
266 # These are the OBJ files needed to create the LIB target above.
267 # Paths must all use the '/' character
268 #
269 FILES_lib_objs = \
270         $(EOLIST)
271
272 #
273 # implement targets and dependancies (leave this section alone)
274 #
275
276 libs :: $(OBJDIR) $(TARGET_lib)
277
278 nlms :: libs $(TARGET_nlm)
279
280 #
281 # Updated this target to create necessary directories and copy files to the
282 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
283 #
284 install :: nlms FORCE
285
286 #
287 # Any specialized rules here
288 #
289
290 #
291 # Include the 'tail' makefile that has targets that depend on variables defined
292 # in this makefile
293 #
294
295 include $(APRBUILD)/NWGNUtail.inc
296
297
298