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