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