NWGNUdbmdb revision 251886
1219089Spjd#
2219089Spjd# Declare the sub-directories to be built here
3219089Spjd#
4219089Spjd
5219089SpjdSUBDIRS = \
6219089Spjd	$(EOLIST)
7219089Spjd
8219089Spjd#
9219089Spjd# Get the 'head' of the build environment.  This includes default targets and
10219089Spjd# paths to tools
11219089Spjd#
12219089Spjd
13219089Spjdifndef EnvironmentDefined
14219089Spjdinclude $(APR_WORK)/build/NWGNUhead.inc
15219089Spjdendif
16219089Spjd
17219089Spjd#
18219089Spjd# build this level's files
19219089Spjd
20219089Spjd#
21219089Spjd# Make sure all needed macro's are defined
22219089Spjd#
23236884Smm
24219089Spjd# LINK_STATIC = 1
25219089Spjd
26219089Spjd# for now defined here - should finally go into build/NWGNUenvironment.inc
27219089SpjdDB_INC = $(DBSDK)/inc
28219089SpjdDB_IMP = libdb47.imp
29219089SpjdDB_LIB = libdb47.lib
30219089SpjdDB_NLM = libdb47
31219089Spjd
32219089Spjd#
33219089Spjd# These directories will be at the beginning of the include list, followed by
34219089Spjd# INCDIRS
35219089Spjd#
36219089SpjdXINCDIRS	+= \
37219089Spjd			$(APR)/include/arch/netware \
38219089Spjd			$(APR)/include \
39219089Spjd			$(APU)/include \
40219089Spjd			$(APU)/include/private \
41219089Spjd			$(APR) \
42219089Spjd			$(DB_INC) \
43219089Spjd			$(EOLIST)
44219089Spjd
45219089Spjd#
46219089Spjd# These flags will come after CFLAGS
47219089Spjd#
48236884SmmXCFLAGS		+= \
49219089Spjd			$(EOLIST)
50219089Spjd
51219089Spjd#
52219089Spjd# These defines will come after DEFINES
53219089Spjd#
54219089SpjdXDEFINES	+= \
55219089Spjd			-DAPU_DSO_MODULE_BUILD \
56219089Spjd			-DAPU_HAVE_DB=1 \
57219089Spjd			-DAPU_HAVE_DB_VERSION=4 \
58219089Spjd			$(EOLIST)
59219089Spjd
60219089Spjd#
61237972Smm# These flags will be added to the link.opt file
62237972Smm#
63237972SmmXLFLAGS		+= \
64237972Smm			$(EOLIST)
65219089Spjd
66237972Smmifdef LINK_STATIC
67237972SmmXLFLAGS		+= \
68237972Smm			-l $(DBSDK)/lib \
69237972Smm			$(EOLIST)
70219089Spjdelse
71219089SpjdXLFLAGS		+= \
72237972Smm			-l $(DBSDK)/imp \
73237972Smm			$(EOLIST)
74237972Smmendif
75237972Smm
76237972Smm#
77237972Smm# These values will be appended to the correct variables based on the value of
78237972Smm# RELEASE
79237972Smm#
80237972Smmifeq "$(RELEASE)" "debug"
81237972SmmXINCDIRS	+= \
82237972Smm			$(EOLIST)
83237972Smm
84237972SmmXCFLAGS		+= \
85237972Smm			$(EOLIST)
86237972Smm
87237972SmmXDEFINES	+= \
88237972Smm			$(EOLIST)
89237972Smm
90237972SmmXLFLAGS		+= \
91237972Smm			$(EOLIST)
92237972Smmendif
93237972Smm
94237972Smmifeq "$(RELEASE)" "noopt"
95237972SmmXINCDIRS	+= \
96237972Smm			$(EOLIST)
97237972Smm
98237972SmmXCFLAGS		+= \
99237972Smm			$(EOLIST)
100237972Smm
101237972SmmXDEFINES	+= \
102219089Spjd			$(EOLIST)
103219089Spjd
104219089SpjdXLFLAGS		+= \
105219089Spjd			$(EOLIST)
106219089Spjdendif
107219089Spjd
108219089Spjdifeq "$(RELEASE)" "release"
109219089SpjdXINCDIRS	+= \
110219089Spjd			$(EOLIST)
111219089Spjd
112219089SpjdXCFLAGS		+= \
113219089Spjd			$(EOLIST)
114219089Spjd
115219089SpjdXDEFINES	+= \
116219089Spjd			$(EOLIST)
117219089Spjd
118219089SpjdXLFLAGS		+= \
119219089Spjd			$(EOLIST)
120219089Spjdendif
121219089Spjd
122219089Spjd#
123219089Spjd# These are used by the link target if an NLM is being generated
124219089Spjd# This is used by the link 'name' directive to name the nlm.  If left blank
125219089Spjd# TARGET_nlm (see below) will be used.
126219089Spjd#
127219089SpjdNLM_NAME	= dbmdb
128219089Spjd
129219089Spjd#
130219089Spjd# This is used by the link '-desc ' directive.
131219089Spjd# If left blank, NLM_NAME will be used.
132219089Spjd#
133219089SpjdNLM_DESCRIPTION	= Apache Portability Runtime Library $(VERSION_STR) DBM Berkeley DB Driver Module
134219089Spjd
135219089Spjd#
136219089Spjd# This is used by the '-threadname' directive.  If left blank,
137219089Spjd# NLM_NAME Thread will be used.
138219089Spjd#
139219089SpjdNLM_THREAD_NAME	= dbmdb
140219089Spjd
141219089Spjd#
142219089Spjd# If this is specified, it will override VERSION value in
143219089Spjd# $(AP_WORK)\build\NWGNUenvironment.inc
144219089Spjd#
145219089SpjdNLM_VERSION	=
146219089Spjd
147219089Spjd#
148219089Spjd# If this is specified, it will override the default of 64K
149219089Spjd#
150219089SpjdNLM_STACK_SIZE	= 8192
151219089Spjd
152219089Spjd
153219089Spjd#
154219089Spjd# If this is specified it will be used by the link '-entry' directive
155219089Spjd#
156219089SpjdNLM_ENTRY_SYM	=
157219089Spjd
158219089Spjd#
159219089Spjd# If this is specified it will be used by the link '-exit' directive
160219089Spjd#
161219089SpjdNLM_EXIT_SYM	=
162219089Spjd
163219089Spjd#
164219089Spjd# If this is specified it will be used by the link '-check' directive
165219089Spjd#
166219089SpjdNLM_CHECK_SYM	=
167219089Spjd
168219089Spjd#
169219089Spjd# If these are specified it will be used by the link '-flags' directive
170219089Spjd#
171219089SpjdNLM_FLAGS	=
172219089Spjd
173219089Spjd#
174219089Spjd# If this is specified it will be linked in with the XDCData option in the def
175219089Spjd# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
176219089Spjd# by setting APACHE_UNIPROC in the environment
177219089Spjd#
178219089SpjdXDCDATA		=
179219089Spjd
180219089Spjd#
181219089Spjd# If there is an NLM target, put it here
182219089Spjd#
183219089SpjdTARGET_nlm = \
184219089Spjd	$(OBJDIR)\$(NLM_NAME).nlm \
185219089Spjd	$(EOLIST)
186219089Spjd
187219089Spjd#
188219089Spjd# If there is an LIB target, put it here
189219089Spjd#
190219089SpjdTARGET_lib = \
191219089Spjd	$(EOLIST)
192219089Spjd
193219089Spjd#
194219089Spjd# These are the OBJ files needed to create the NLM target above.
195219089Spjd# Paths must all use the '/' character
196219089Spjd#
197219089SpjdFILES_nlm_objs = \
198219089Spjd	$(OBJDIR)/apr_dbm_berkeleydb.o \
199219089Spjd	$(EOLIST)
200219089Spjd
201219089Spjd#
202219089Spjd# These are the LIB files needed to create the NLM target above.
203219089Spjd# These will be added as a library command in the link.opt file.
204219089Spjd#
205219089SpjdFILES_nlm_libs = \
206219089Spjd	$(PRELUDE) \
207219089Spjd	$(EOLIST)
208219089Spjd
209219089Spjdifeq ($(LINK_STATIC),1)
210219089SpjdFILES_nlm_libs += \
211219089Spjd	$(DB_LIB) \
212219089Spjd	$(EOLIST)
213219089Spjdendif
214219089Spjd
215219089Spjd#
216219089Spjd# These are the modules that the above NLM target depends on to load.
217219089Spjd# These will be added as a module command in the link.opt file.
218219089Spjd#
219219089SpjdFILES_nlm_modules = \
220219089Spjd	aprlib \
221219089Spjd	libc \
222219089Spjd	$(EOLIST)
223219089Spjd
224219089Spjdifneq ($(LINK_STATIC),1)
225219089SpjdFILES_nlm_modules += \
226219089Spjd	$(DB_NLM) \
227219089Spjd	$(EOLIST)
228219089Spjdendif
229219089Spjd
230219089Spjd#
231219089Spjd# If the nlm has a msg file, put it's path here
232219089Spjd#
233219089SpjdFILE_nlm_msg =
234219089Spjd
235219089Spjd#
236219089Spjd# If the nlm has a hlp file put it's path here
237219089Spjd#
238219089SpjdFILE_nlm_hlp =
239219089Spjd
240219089Spjd#
241219089Spjd# If this is specified, it will override $(NWOS)\copyright.txt.
242219089Spjd#
243219089SpjdFILE_nlm_copyright =
244219089Spjd
245219089Spjd#
246219089Spjd# Any additional imports go here
247219089Spjd#
248219089SpjdFILES_nlm_Ximports = \
249219089Spjd	@aprlib.imp \
250219089Spjd	@libc.imp \
251219089Spjd	$(EOLIST)
252219089Spjd
253219089Spjdifneq ($(LINK_STATIC),1)
254219089SpjdFILES_nlm_Ximports += \
255219089Spjd	@$(DB_IMP) \
256219089Spjd	$(EOLIST)
257219089Spjdendif
258219089Spjd
259219089Spjd#
260219089Spjd# Any symbols exported to here
261219089Spjd#
262219089SpjdFILES_nlm_exports = \
263219089Spjd	apr_dbm_type_db \
264219089Spjd	$(EOLIST)
265219089Spjd
266219089Spjd#
267219089Spjd# These are the OBJ files needed to create the LIB target above.
268219089Spjd# Paths must all use the '/' character
269219089Spjd#
270219089SpjdFILES_lib_objs = \
271219089Spjd	$(EOLIST)
272219089Spjd
273219089Spjd#
274219089Spjd# implement targets and dependancies (leave this section alone)
275219089Spjd#
276219089Spjd
277219089Spjdlibs :: $(OBJDIR) $(TARGET_lib)
278219089Spjd
279219089Spjdnlms :: libs $(TARGET_nlm)
280219089Spjd
281219089Spjd#
282219089Spjd# Updated this target to create necessary directories and copy files to the
283219089Spjd# correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
284219089Spjd#
285219089Spjdinstall :: nlms FORCE
286219089Spjd
287219089Spjd#
288219089Spjd# Any specialized rules here
289219089Spjd#
290219089Spjd
291219089Spjd#
292219089Spjd# Include the 'tail' makefile that has targets that depend on variables defined
293219089Spjd# in this makefile
294219089Spjd#
295219089Spjd
296219089Spjdinclude $(APRBUILD)/NWGNUtail.inc
297219089Spjd
298219089Spjd
299219089Spjd
300219089Spjd