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