]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/apr-util/dbd/NWGNUdbdsqli3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / apr-util / dbd / NWGNUdbdsqli3
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 #include $(APR)\build\NWGNUcustom.inc
18
19 #
20 # build this level's files
21
22 #
23 # Make sure all needed macro's are defined
24 #
25
26 # LINK_STATIC = 1
27
28 # for now defined here - should finally go into build/NWGNUenvironment.inc
29 SQLITE3_INC = $(SQLITE3SDK)/src
30 SQLITE3_IMP = $(SQLITE3SDK)/lsqlite3.imp
31 SQLITE3_LIB = $(SQLITE3SDK)/lsqlite3.lib
32 SQLITE3_NLM = lsqlite3
33
34 #
35 # These directories will be at the beginning of the include list, followed by
36 # INCDIRS
37 #
38 XINCDIRS        += \
39                         $(APR)/include/arch/netware \
40                         $(APR)/include \
41                         $(APU)/include \
42                         $(APU)/include/private \
43                         $(APR) \
44                         $(SQLITE3_INC) \
45                         $(EOLIST)
46
47 #
48 # These flags will come after CFLAGS
49 #
50 XCFLAGS         += \
51                         $(EOLIST)
52
53 #
54 # These defines will come after DEFINES
55 #
56 XDEFINES        += \
57                         -DAPU_DSO_MODULE_BUILD \
58                         -DAPU_HAVE_SQLITE3=1 \
59                         $(EOLIST)
60
61 #
62 # These flags will be added to the link.opt file
63 #
64 XLFLAGS         += \
65                         $(EOLIST)
66
67 ifdef LINK_STATIC
68 XLFLAGS         += \
69                         -l $(SQLITE3SDK) \
70                         $(EOLIST)
71 endif
72
73 #
74 # These values will be appended to the correct variables based on the value of
75 # RELEASE
76 #
77 ifeq "$(RELEASE)" "debug"
78 XINCDIRS        += \
79                         $(EOLIST)
80
81 XCFLAGS         += \
82                         $(EOLIST)
83
84 XDEFINES        += \
85                         $(EOLIST)
86
87 XLFLAGS         += \
88                         $(EOLIST)
89 endif
90
91 ifeq "$(RELEASE)" "noopt"
92 XINCDIRS        += \
93                         $(EOLIST)
94
95 XCFLAGS         += \
96                         $(EOLIST)
97
98 XDEFINES        += \
99                         $(EOLIST)
100
101 XLFLAGS         += \
102                         $(EOLIST)
103 endif
104
105 ifeq "$(RELEASE)" "release"
106 XINCDIRS        += \
107                         $(EOLIST)
108
109 XCFLAGS         += \
110                         $(EOLIST)
111
112 XDEFINES        += \
113                         $(EOLIST)
114
115 XLFLAGS         += \
116                         $(EOLIST)
117 endif
118
119 #
120 # These are used by the link target if an NLM is being generated
121 # This is used by the link 'name' directive to name the nlm.  If left blank
122 # TARGET_nlm (see below) will be used.
123 #
124 NLM_NAME        = dbdsqli3
125
126 #
127 # This is used by the link '-desc ' directive.
128 # If left blank, NLM_NAME will be used.
129 #
130 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBD SQLite3 Driver Module
131
132 #
133 # This is used by the '-threadname' directive.  If left blank,
134 # NLM_NAME Thread will be used.
135 #
136 NLM_THREAD_NAME = dbdsqli3
137
138 #
139 # If this is specified, it will override VERSION value in
140 # $(AP_WORK)\build\NWGNUenvironment.inc
141 #
142 NLM_VERSION     =
143
144 #
145 # If this is specified, it will override the default of 64K
146 #
147 NLM_STACK_SIZE  = 8192
148
149
150 #
151 # If this is specified it will be used by the link '-entry' directive
152 #
153 NLM_ENTRY_SYM   =
154
155 #
156 # If this is specified it will be used by the link '-exit' directive
157 #
158 NLM_EXIT_SYM    =
159
160 #
161 # If this is specified it will be used by the link '-check' directive
162 #
163 NLM_CHECK_SYM   =
164
165 #
166 # If these are specified it will be used by the link '-flags' directive
167 #
168 NLM_FLAGS       =
169
170 #
171 # If this is specified it will be linked in with the XDCData option in the def
172 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
173 # by setting APACHE_UNIPROC in the environment
174 #
175 XDCDATA         =
176
177 #
178 # If there is an NLM target, put it here
179 #
180 TARGET_nlm = \
181         $(OBJDIR)\$(NLM_NAME).nlm \
182         $(EOLIST)
183
184 #
185 # If there is an LIB target, put it here
186 #
187 TARGET_lib = \
188         $(EOLIST)
189
190 #
191 # These are the OBJ files needed to create the NLM target above.
192 # Paths must all use the '/' character
193 #
194 FILES_nlm_objs = \
195         $(OBJDIR)/apr_dbd_sqlite3.o \
196         $(EOLIST)
197
198 #
199 # These are the LIB files needed to create the NLM target above.
200 # These will be added as a library command in the link.opt file.
201 #
202 FILES_nlm_libs = \
203         $(PRELUDE) \
204         $(EOLIST)
205
206 ifeq ($(LINK_STATIC),1)
207 FILES_nlm_libs += \
208         $(SQLITE3_LIB) \
209         $(EOLIST)
210 endif
211
212 #
213 # These are the modules that the above NLM target depends on to load.
214 # These will be added as a module command in the link.opt file.
215 #
216 FILES_nlm_modules = \
217         aprlib \
218         libc \
219         $(EOLIST)
220
221 ifneq ($(LINK_STATIC),1)
222 FILES_nlm_modules += \
223         $(SQLITE3_NLM) \
224         $(EOLIST)
225 endif
226
227 #
228 # If the nlm has a msg file, put it's path here
229 #
230 FILE_nlm_msg =
231
232 #
233 # If the nlm has a hlp file put it's path here
234 #
235 FILE_nlm_hlp =
236
237 #
238 # If this is specified, it will override $(NWOS)\copyright.txt.
239 #
240 FILE_nlm_copyright =
241
242 #
243 # Any additional imports go here
244 #
245 FILES_nlm_Ximports = \
246         @$(APR)/aprlib.imp \
247         @libc.imp \
248         apr_dbd_mutex_lock \
249         apr_dbd_mutex_unlock \
250         $(EOLIST)
251
252 ifneq ($(LINK_STATIC),1)
253 FILES_nlm_Ximports += \
254         @$(SQLITE3_IMP) \
255         $(EOLIST)
256 endif
257
258 #
259 # Any symbols exported to here
260 #
261 FILES_nlm_exports = \
262         apr_dbd_sqlite3_driver \
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