1#
2# Make sure all needed macro's are defined
3#
4
5#
6# Get the 'head' of the build environment if necessary.  This includes default
7# targets and paths to tools
8#
9
10ifndef EnvironmentDefined
11include $(AP_WORK)/build/NWGNUhead.inc
12endif
13
14#
15# These directories will be at the beginning of the include list, followed by
16# INCDIRS
17#
18XINCDIRS	+= \
19			$(APR)/include \
20			$(APRUTIL)/include \
21			$(AP_WORK)/include \
22			$(NWOS) \
23			$(LDAPSDK)/inc \
24			$(EOLIST)
25
26#
27# These flags will come after CFLAGS
28#
29XCFLAGS		+= \
30			$(EOLIST)
31
32#
33# These defines will come after DEFINES
34#
35XDEFINES	+= \
36			$(EOLIST)
37
38#
39#LDAP client requires the use of Winsock
40#
41ifdef USE_STDSOCKETS
42XDEFINES += -DUSE_WINSOCK \
43			$(EOLIST)
44endif
45
46#
47# These flags will be added to the link.opt file
48#
49XLFLAGS		+= \
50			$(EOLIST)
51
52#
53# These values will be appended to the correct variables based on the value of
54# RELEASE
55#
56ifeq "$(RELEASE)" "debug"
57XINCDIRS	+= \
58			$(EOLIST)
59
60XCFLAGS		+= \
61			$(EOLIST)
62
63XDEFINES	+= \
64			$(EOLIST)
65
66XLFLAGS		+= \
67			$(EOLIST)
68endif
69
70ifeq "$(RELEASE)" "noopt"
71XINCDIRS	+= \
72			$(EOLIST)
73
74XCFLAGS		+= \
75			$(EOLIST)
76
77XDEFINES	+= \
78			$(EOLIST)
79
80XLFLAGS		+= \
81			$(EOLIST)
82endif
83
84ifeq "$(RELEASE)" "release"
85XINCDIRS	+= \
86			$(EOLIST)
87
88XCFLAGS		+= \
89			$(EOLIST)
90
91XDEFINES	+= \
92			$(EOLIST)
93
94XLFLAGS		+= \
95			$(EOLIST)
96endif
97
98#
99# These are used by the link target if an NLM is being generated
100# This is used by the link 'name' directive to name the nlm.  If left blank
101# TARGET_nlm (see below) will be used.
102#
103NLM_NAME	= utilldap
104
105#
106# This is used by the link '-desc ' directive.
107# If left blank, NLM_NAME will be used.
108#
109NLM_DESCRIPTION	= Apache $(VERSION_STR) LDAP Authentication Module
110
111#
112# This is used by the '-threadname' directive.  If left blank,
113# NLM_NAME Thread will be used.
114#
115NLM_THREAD_NAME	= UtilLDAP Module
116
117#
118# If this is specified, it will override VERSION value in
119# $(AP_WORK)/build/NWGNUenvironment.inc
120#
121NLM_VERSION	=
122
123#
124# If this is specified, it will override the default of 64K
125#
126NLM_STACK_SIZE	= 8192
127
128
129#
130# If this is specified it will be used by the link '-entry' directive
131#
132NLM_ENTRY_SYM	=
133
134#
135# If this is specified it will be used by the link '-exit' directive
136#
137NLM_EXIT_SYM	=
138
139#
140# If this is specified it will be used by the link '-check' directive
141#
142NLM_CHECK_SYM	=
143
144#
145# If these are specified it will be used by the link '-flags' directive
146#
147NLM_FLAGS	=
148
149#
150# If this is specified it will be linked in with the XDCData option in the def
151# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
152# by setting APACHE_UNIPROC in the environment
153#
154XDCDATA		=
155
156#
157# If there is an NLM target, put it here
158#
159TARGET_nlm = \
160	$(OBJDIR)/utilldap.nlm \
161	$(EOLIST)
162
163#
164# If there is an LIB target, put it here
165#
166TARGET_lib = \
167	$(EOLIST)
168
169#
170# These are the OBJ files needed to create the NLM target above.
171# Paths must all use the '/' character
172#
173FILES_nlm_objs = \
174	$(OBJDIR)/util_ldap.o \
175	$(OBJDIR)/util_ldap_cache.o \
176	$(OBJDIR)/util_ldap_cache_mgr.o \
177	$(EOLIST)
178
179#
180# These are the LIB files needed to create the NLM target above.
181# These will be added as a library command in the link.opt file.
182#
183FILES_nlm_libs = \
184	$(PRELUDE) \
185	$(EOLIST)
186
187#
188# These are the modules that the above NLM target depends on to load.
189# These will be added as a module command in the link.opt file.
190#
191FILES_nlm_modules = \
192	aprlib \
193	libc \
194	lldapsdk \
195	lldapssl \
196	$(EOLIST)
197
198#
199# If the nlm has a msg file, put it's path here
200#
201FILE_nlm_msg =
202
203#
204# If the nlm has a hlp file put it's path here
205#
206FILE_nlm_hlp =
207
208#
209# If this is specified, it will override $(NWOS)\copyright.txt.
210#
211FILE_nlm_copyright =
212
213#
214# Any additional imports go here
215#
216FILES_nlm_Ximports = \
217	@aprlib.imp \
218	@httpd.imp \
219	@libc.imp \
220	@lldapsdk.imp \
221	@lldapssl.imp \
222	$(EOLIST)
223
224#
225# Any symbols exported to here
226#
227FILES_nlm_exports = \
228	ldap_module \
229	$(EOLIST)
230
231#
232# These are the OBJ files needed to create the LIB target above.
233# Paths must all use the '/' character
234#
235FILES_lib_objs = \
236	$(EOLIST)
237
238#
239# implement targets and dependancies (leave this section alone)
240#
241
242libs :: $(OBJDIR) $(TARGET_lib)
243
244nlms :: libs $(TARGET_nlm)
245
246#
247# Updated this target to create necessary directories and copy files to the
248# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
249#
250install :: nlms FORCE
251	$(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/)
252
253#
254# Any specialized rules here
255#
256
257#
258# Include the 'tail' makefile that has targets that depend on variables defined
259# in this makefile
260#
261
262include $(APBUILD)/NWGNUtail.inc
263
264
265