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 29PGSQL_INC = $(PGSQLSDK)/inc 30PGSQL_IMP = libpq.imp 31PGSQL_LIB = libpq.lib 32PGSQL_NLM = libpq 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 $(PGSQL_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_PGSQL=1 \ 59 -DHAVE_LIBPQ_FE_H \ 60 $(EOLIST) 61 62# 63# These flags will be added to the link.opt file 64# 65XLFLAGS += \ 66 $(EOLIST) 67 68ifdef LINK_STATIC 69XLFLAGS += \ 70 -l $(PGSQLSDK)/lib \ 71 $(EOLIST) 72else 73XLFLAGS += \ 74 -l $(PGSQLSDK)/imp \ 75 $(EOLIST) 76endif 77 78# 79# These values will be appended to the correct variables based on the value of 80# RELEASE 81# 82ifeq "$(RELEASE)" "debug" 83XINCDIRS += \ 84 $(EOLIST) 85 86XCFLAGS += \ 87 $(EOLIST) 88 89XDEFINES += \ 90 $(EOLIST) 91 92XLFLAGS += \ 93 $(EOLIST) 94endif 95 96ifeq "$(RELEASE)" "noopt" 97XINCDIRS += \ 98 $(EOLIST) 99 100XCFLAGS += \ 101 $(EOLIST) 102 103XDEFINES += \ 104 $(EOLIST) 105 106XLFLAGS += \ 107 $(EOLIST) 108endif 109 110ifeq "$(RELEASE)" "release" 111XINCDIRS += \ 112 $(EOLIST) 113 114XCFLAGS += \ 115 $(EOLIST) 116 117XDEFINES += \ 118 $(EOLIST) 119 120XLFLAGS += \ 121 $(EOLIST) 122endif 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# 129NLM_NAME = dbdpgsql 130 131# 132# This is used by the link '-desc ' directive. 133# If left blank, NLM_NAME will be used. 134# 135NLM_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# 141NLM_THREAD_NAME = dbdpgsql 142 143# 144# If this is specified, it will override VERSION value in 145# $(AP_WORK)\build\NWGNUenvironment.inc 146# 147NLM_VERSION = 148 149# 150# If this is specified, it will override the default of 64K 151# 152NLM_STACK_SIZE = 8192 153 154 155# 156# If this is specified it will be used by the link '-entry' directive 157# 158NLM_ENTRY_SYM = 159 160# 161# If this is specified it will be used by the link '-exit' directive 162# 163NLM_EXIT_SYM = 164 165# 166# If this is specified it will be used by the link '-check' directive 167# 168NLM_CHECK_SYM = 169 170# 171# If these are specified it will be used by the link '-flags' directive 172# 173NLM_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# 180XDCDATA = 181 182# 183# If there is an NLM target, put it here 184# 185TARGET_nlm = \ 186 $(OBJDIR)/$(NLM_NAME).nlm \ 187 $(EOLIST) 188 189# 190# If there is an LIB target, put it here 191# 192TARGET_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# 199FILES_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# 207FILES_nlm_libs = \ 208 $(PRELUDE) \ 209 $(EOLIST) 210 211ifeq ($(LINK_STATIC),1) 212FILES_nlm_libs += \ 213 $(PGSQL_LIB) \ 214 $(EOLIST) 215endif 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# 221FILES_nlm_modules = \ 222 aprlib \ 223 libc \ 224 $(EOLIST) 225 226ifneq ($(LINK_STATIC),1) 227FILES_nlm_modules += \ 228 $(PGSQL_NLM) \ 229 $(EOLIST) 230endif 231 232# 233# If the nlm has a msg file, put it's path here 234# 235FILE_nlm_msg = 236 237# 238# If the nlm has a hlp file put it's path here 239# 240FILE_nlm_hlp = 241 242# 243# If this is specified, it will override $(NWOS)\copyright.txt. 244# 245FILE_nlm_copyright = 246 247# 248# Any additional imports go here 249# 250FILES_nlm_Ximports = \ 251 @aprlib.imp \ 252 @libc.imp \ 253 $(EOLIST) 254 255ifneq ($(LINK_STATIC),1) 256FILES_nlm_Ximports += \ 257 @$(PGSQL_IMP) \ 258 $(EOLIST) 259endif 260 261# 262# Any symbols exported to here 263# 264FILES_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# 272FILES_lib_objs = \ 273 $(EOLIST) 274 275# 276# implement targets and dependancies (leave this section alone) 277# 278 279libs :: $(OBJDIR) $(TARGET_lib) 280 281nlms :: 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# 287install :: 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 298include $(APRBUILD)/NWGNUtail.inc 299 300 301 302