Destroy already created resources if create fails
[apr-util.git] / dbd / NWGNUdbdsqli2
blob38b8dd20f940fa5a96d819cf286e079b70dff8fb
2 # Declare the sub-directories to be built here
5 SUBDIRS = \
6         $(EOLIST)
9 # Get the 'head' of the build environment.  This includes default targets and
10 # paths to tools
13 ifndef EnvironmentDefined
14 include $(APR_WORK)\build\NWGNUhead.inc
15 endif
17 #include $(APR)\build\NWGNUcustom.inc
20 # build this level's files
23 # Make sure all needed macro's are defined
26 # LINK_STATIC = 1
28 # for now defined here - should finally go into build/NWGNUenvironment.inc
29 SQLITE2_INC = $(SQLITE2SDK)/src
30 SQLITE2_IMP = $(SQLITE2SDK)/lsqlite2.imp
31 SQLITE2_LIB = $(SQLITE2SDK)/lsqlite2.lib
32 SQLITE2_NLM = lsqlite2
35 # These directories will be at the beginning of the include list, followed by
36 # INCDIRS
38 XINCDIRS        += \
39                         $(APR)/include/arch/netware \
40                         $(APR)/include \
41                         $(APRUTIL)/include \
42                         $(APRUTIL)/include/private \
43                         $(APR) \
44                         $(SQLITE2_INC) \
45                         $(EOLIST)
48 # These flags will come after CFLAGS
50 XCFLAGS         += \
51                         $(EOLIST)
54 # These defines will come after DEFINES
56 XDEFINES        += \
57                         -DAPU_HAVE_SQLITE2=1 \
58                         $(EOLIST)
61 # These flags will be added to the link.opt file
63 XLFLAGS         += \
64                         $(EOLIST)
66 ifdef LINK_STATIC
67 XLFLAGS         += \
68                         -l $(SQLITE2SDK) \
69                         $(EOLIST)
70 endif
73 # These values will be appended to the correct variables based on the value of
74 # RELEASE
76 ifeq "$(RELEASE)" "debug"
77 XINCDIRS        += \
78                         $(EOLIST)
80 XCFLAGS         += \
81                         $(EOLIST)
83 XDEFINES        += \
84                         $(EOLIST)
86 XLFLAGS         += \
87                         $(EOLIST)
88 endif
90 ifeq "$(RELEASE)" "noopt"
91 XINCDIRS        += \
92                         $(EOLIST)
94 XCFLAGS         += \
95                         $(EOLIST)
97 XDEFINES        += \
98                         $(EOLIST)
100 XLFLAGS         += \
101                         $(EOLIST)
102 endif
104 ifeq "$(RELEASE)" "release"
105 XINCDIRS        += \
106                         $(EOLIST)
108 XCFLAGS         += \
109                         $(EOLIST)
111 XDEFINES        += \
112                         $(EOLIST)
114 XLFLAGS         += \
115                         $(EOLIST)
116 endif
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.
123 NLM_NAME        = dbdsqli2
126 # This is used by the link '-desc ' directive.
127 # If left blank, NLM_NAME will be used.
129 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBD SQLite2 Driver Module
132 # This is used by the '-threadname' directive.  If left blank,
133 # NLM_NAME Thread will be used.
135 NLM_THREAD_NAME = dbdsqli2
138 # If this is specified, it will override VERSION value in
139 # $(AP_WORK)\build\NWGNUenvironment.inc
141 NLM_VERSION     =
144 # If this is specified, it will override the default of 64K
146 NLM_STACK_SIZE  = 8192
150 # If this is specified it will be used by the link '-entry' directive
152 NLM_ENTRY_SYM   = _LibCPrelude
155 # If this is specified it will be used by the link '-exit' directive
157 NLM_EXIT_SYM    = _LibCPostlude
160 # If this is specified it will be used by the link '-check' directive
162 NLM_CHECK_SYM   =
165 # If these are specified it will be used by the link '-flags' directive
167 NLM_FLAGS       = AUTOUNLOAD, PSEUDOPREEMPTION
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
174 XDCDATA         =
177 # If there is an NLM target, put it here
179 TARGET_nlm = \
180         $(OBJDIR)\$(NLM_NAME).nlm \
181         $(EOLIST)
184 # If there is an LIB target, put it here
186 TARGET_lib = \
187         $(EOLIST)
190 # These are the OBJ files needed to create the NLM target above.
191 # Paths must all use the '/' character
193 FILES_nlm_objs = \
194         $(OBJDIR)/apr_dbd_sqlite2.o \
195         $(EOLIST)
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.
201 FILES_nlm_libs = \
202         libcpre.o \
203         $(EOLIST)
205 ifeq ($(LINK_STATIC),1)
206 FILES_nlm_libs += \
207         $(SQLITE2_LIB) \
208         $(EOLIST)
209 endif
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.
215 FILES_nlm_modules = \
216         aprlib \
217         libc \
218         $(EOLIST)
220 ifneq ($(LINK_STATIC),1)
221 FILES_nlm_modules += \
222         $(SQLITE2_NLM) \
223         $(EOLIST)
224 endif
227 # If the nlm has a msg file, put it's path here
229 FILE_nlm_msg =
232 # If the nlm has a hlp file put it's path here
234 FILE_nlm_hlp =
237 # If this is specified, it will override $(NWOS)\copyright.txt.
239 FILE_nlm_copyright =
242 # Any additional imports go here
244 FILES_nlm_Ximports = \
245         @$(APR)/aprlib.imp \
246         @libc.imp \
247         $(EOLIST)
249 ifneq ($(LINK_STATIC),1)
250 FILES_nlm_Ximports += \
251         @$(SQLITE2_IMP) \
252         $(EOLIST)
253 endif
256 # Any symbols exported to here
258 FILES_nlm_exports = \
259         apr_dbd_sqlite2_driver \
260         $(EOLIST)
263 # These are the OBJ files needed to create the LIB target above.
264 # Paths must all use the '/' character
266 FILES_lib_objs = \
267         $(EOLIST)
270 # implement targets and dependancies (leave this section alone)
273 libs :: $(OBJDIR) $(TARGET_lib)
275 nlms :: libs $(TARGET_nlm)
278 # Updated this target to create necessary directories and copy files to the
279 # correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
281 install :: nlms FORCE
284 # Any specialized rules here
288 # Include the 'tail' makefile that has targets that depend on variables defined
289 # in this makefile
292 include $(APR_WORK)\build\NWGNUtail.inc