1# 2# Declare the sub-directories to be built here 3# 4 5SUBDIRS = \ 6 $(EOLIST) 7 8# 9# Get the 'head' of the build environment. This includes default targets and 10# paths to tools 11# 12 13ifndef EnvironmentDefined 14include $(APR_WORK)/build/NWGNUhead.inc 15endif 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 29SQLITE2_INC = $(SQLITE2SDK)/src 30SQLITE2_IMP = $(SQLITE2SDK)/lsqlite2.imp 31SQLITE2_LIB = $(SQLITE2SDK)/lsqlite2.lib 32SQLITE2_NLM = lsqlite2 33 34# 35# These directories will be at the beginning of the include list, followed by 36# INCDIRS 37# 38XINCDIRS += \ 39 $(APR)/include/arch/netware \ 40 $(APR)/include \ 41 $(APU)/include \ 42 $(APU)/include/private \ 43 $(APR) \ 44 $(SQLITE2_INC) \ 45 $(EOLIST) 46 47# 48# These flags will come after CFLAGS 49# 50XCFLAGS += \ 51 $(EOLIST) 52 53# 54# These defines will come after DEFINES 55# 56XDEFINES += \ 57 -DAPU_DSO_MODULE_BUILD \ 58 -DAPU_HAVE_SQLITE2=1 \ 59 $(EOLIST) 60 61# 62# These flags will be added to the link.opt file 63# 64XLFLAGS += \ 65 $(EOLIST) 66 67ifdef LINK_STATIC 68XLFLAGS += \ 69 -l $(SQLITE2SDK) \ 70 $(EOLIST) 71endif 72 73# 74# These values will be appended to the correct variables based on the value of 75# RELEASE 76# 77ifeq "$(RELEASE)" "debug" 78XINCDIRS += \ 79 $(EOLIST) 80 81XCFLAGS += \ 82 $(EOLIST) 83 84XDEFINES += \ 85 $(EOLIST) 86 87XLFLAGS += \ 88 $(EOLIST) 89endif 90 91ifeq "$(RELEASE)" "noopt" 92XINCDIRS += \ 93 $(EOLIST) 94 95XCFLAGS += \ 96 $(EOLIST) 97 98XDEFINES += \ 99 $(EOLIST) 100 101XLFLAGS += \ 102 $(EOLIST) 103endif 104 105ifeq "$(RELEASE)" "release" 106XINCDIRS += \ 107 $(EOLIST) 108 109XCFLAGS += \ 110 $(EOLIST) 111 112XDEFINES += \ 113 $(EOLIST) 114 115XLFLAGS += \ 116 $(EOLIST) 117endif 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# 124NLM_NAME = dbdsqli2 125 126# 127# This is used by the link '-desc ' directive. 128# If left blank, NLM_NAME will be used. 129# 130NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) DBD SQLite2 Driver Module 131 132# 133# This is used by the '-threadname' directive. If left blank, 134# NLM_NAME Thread will be used. 135# 136NLM_THREAD_NAME = dbdsqli2 137 138# 139# If this is specified, it will override VERSION value in 140# $(AP_WORK)\build\NWGNUenvironment.inc 141# 142NLM_VERSION = 143 144# 145# If this is specified, it will override the default of 64K 146# 147NLM_STACK_SIZE = 8192 148 149 150# 151# If this is specified it will be used by the link '-entry' directive 152# 153NLM_ENTRY_SYM = 154 155# 156# If this is specified it will be used by the link '-exit' directive 157# 158NLM_EXIT_SYM = 159 160# 161# If this is specified it will be used by the link '-check' directive 162# 163NLM_CHECK_SYM = 164 165# 166# If these are specified it will be used by the link '-flags' directive 167# 168NLM_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# 175XDCDATA = 176 177# 178# If there is an NLM target, put it here 179# 180TARGET_nlm = \ 181 $(OBJDIR)\$(NLM_NAME).nlm \ 182 $(EOLIST) 183 184# 185# If there is an LIB target, put it here 186# 187TARGET_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# 194FILES_nlm_objs = \ 195 $(OBJDIR)/apr_dbd_sqlite2.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# 202FILES_nlm_libs = \ 203 $(PRELUDE) \ 204 $(EOLIST) 205 206ifeq ($(LINK_STATIC),1) 207FILES_nlm_libs += \ 208 $(SQLITE2_LIB) \ 209 $(EOLIST) 210endif 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# 216FILES_nlm_modules = \ 217 aprlib \ 218 libc \ 219 $(EOLIST) 220 221ifneq ($(LINK_STATIC),1) 222FILES_nlm_modules += \ 223 $(SQLITE2_NLM) \ 224 $(EOLIST) 225endif 226 227# 228# If the nlm has a msg file, put it's path here 229# 230FILE_nlm_msg = 231 232# 233# If the nlm has a hlp file put it's path here 234# 235FILE_nlm_hlp = 236 237# 238# If this is specified, it will override $(NWOS)\copyright.txt. 239# 240FILE_nlm_copyright = 241 242# 243# Any additional imports go here 244# 245FILES_nlm_Ximports = \ 246 @$(APR)/aprlib.imp \ 247 @libc.imp \ 248 $(EOLIST) 249 250ifneq ($(LINK_STATIC),1) 251FILES_nlm_Ximports += \ 252 @$(SQLITE2_IMP) \ 253 $(EOLIST) 254endif 255 256# 257# Any symbols exported to here 258# 259FILES_nlm_exports = \ 260 apr_dbd_sqlite2_driver \ 261 $(EOLIST) 262 263# 264# These are the OBJ files needed to create the LIB target above. 265# Paths must all use the '/' character 266# 267FILES_lib_objs = \ 268 $(EOLIST) 269 270# 271# implement targets and dependancies (leave this section alone) 272# 273 274libs :: $(OBJDIR) $(TARGET_lib) 275 276nlms :: libs $(TARGET_nlm) 277 278# 279# Updated this target to create necessary directories and copy files to the 280# correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples) 281# 282install :: nlms FORCE 283 284# 285# Any specialized rules here 286# 287 288# 289# Include the 'tail' makefile that has targets that depend on variables defined 290# in this makefile 291# 292 293include $(APRBUILD)/NWGNUtail.inc 294 295 296 297