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