2 # Define our macros with defaults if we dont got them already.
5 export APR_WORK = $(CURDIR)
7 ifneq "$(wildcard $(APR_WORK)/include/apr_version.h)" "$(APR_WORK)/include/apr_version.h"
8 $(error APR_WORK does not point to a valid APR source tree)
11 export APU_WORK = $(CURDIR)/../apr-util
13 ifneq "$(wildcard $(APU_WORK)/include/apu_version.h)" "$(APU_WORK)/include/apu_version.h"
14 $(error APU_WORK does not point to a valid APU source tree)
18 # Declare the sub-directories to be built here
34 # Get the 'head' of the build environment. This includes default targets and
38 include $(APR_WORK)/build/NWGNUhead.inc
41 # build this level's files
44 # Make sure all needed macro's are defined
48 # These directories will be at the beginning of the include list, followed by
53 $(APR)/include/arch/NetWare \
54 $(APR)/include/arch/unix \
63 # These flags will come after CFLAGS
69 # These defines will come after DEFINES
75 # These flags will be added to the link.opt file
81 # These values will be appended to the correct variables based on the value of
84 ifeq "$(RELEASE)" "debug"
98 ifeq "$(RELEASE)" "noopt"
112 ifeq "$(RELEASE)" "release"
127 # These are used by the link target if an NLM is being generated
128 # This is used by the link 'name' directive to name the nlm. If left blank
129 # TARGET_nlm (see below) will be used.
134 # This is used by the link '-desc ' directive.
135 # If left blank, NLM_NAME will be used.
137 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) $(VERSION_SKT)
140 # This is used by the '-threadname' directive. If left blank,
141 # NLM_NAME Thread will be used.
145 # If this is specified, it will override VERSION value in
146 # $(APR_WORK)/build/NWGNUenvironment.inc
151 # If this is specified, it will override the default of 64K
156 # If this is specified it will be used by the link '-entry' directive
161 # If this is specified it will be used by the link '-exit' directive
166 # If this is specified it will be used by the link '-check' directive
171 # If this is specified it will be used by the link '-flags' directive
176 # If this is specified it will be linked in with the XDCData option in the def
177 # file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
178 # be disabled by setting APACHE_UNIPROC in the environment
183 # Declare all target files (you must add your files here)
187 # If there is an NLM target, put it here
190 $(OBJDIR)/aprlib.nlm \
194 # If there is an LIB target, put it here
197 $(OBJDIR)/aprlib.lib \
201 # These are the OBJ files needed to create the NLM target above.
202 # Paths must all use the '/' character
205 $(OBJDIR)/libprews.o \
209 # These are the LIB files needed to create the NLM target above.
210 # These will be added as a library command in the link.opt file.
221 # These are the modules that the above NLM target depends on to load.
222 # These will be added as a module command in the link.opt file.
224 FILES_nlm_modules = \
228 # Include the Winsock libraries if Winsock is being used
229 ifndef USE_STDSOCKETS
230 FILES_nlm_modules += ws2_32 \
234 #If the LDAP support is defined then add the auto-load modules
235 ifneq "$(LDAPSDK)" ""
236 FILES_nlm_modules += \
243 # If the nlm has a msg file, put it's path here
248 # If the nlm has a hlp file put it's path here
253 # If this is specified, it will override $(NWOS)\copyright.txt.
258 # Any additional imports go here
260 FILES_nlm_Ximports = \
265 # Include the Winsock imports if Winsock is being used
266 ifndef USE_STDSOCKETS
267 FILES_nlm_Ximports += \
274 #If the LDAP support is defined then add the imports
275 ifneq "$(LDAPSDK)" ""
276 FILES_nlm_Ximports += \
283 # Any symbols exported to here
285 FILES_nlm_exports = \
290 # These are the OBJ files needed to create the LIB target above.
291 # Paths must all use the '/' character
294 $(OBJDIR)/apr_atomic.o \
295 $(OBJDIR)/apr_cpystrn.o \
296 $(OBJDIR)/apr_fnmatch.o \
297 $(OBJDIR)/apr_getpass.o \
298 $(OBJDIR)/apr_hash.o \
299 $(OBJDIR)/apr_pools.o \
300 $(OBJDIR)/apr_random.o \
301 $(OBJDIR)/apr_snprintf.o \
302 $(OBJDIR)/apr_strings.o \
303 $(OBJDIR)/apr_strnatcmp.o \
304 $(OBJDIR)/apr_strtok.o \
305 $(OBJDIR)/apr_tables.o \
307 $(OBJDIR)/charset.o \
312 $(OBJDIR)/errorcodes.o \
314 $(OBJDIR)/fileacc.o \
315 $(OBJDIR)/filedup.o \
316 $(OBJDIR)/filepath.o \
317 $(OBJDIR)/filepath_util.o \
318 $(OBJDIR)/filestat.o \
319 $(OBJDIR)/filesys.o \
323 $(OBJDIR)/groupinfo.o \
324 $(OBJDIR)/inet_pton.o \
325 $(OBJDIR)/inet_ntop.o \
328 $(OBJDIR)/multicast.o \
331 $(OBJDIR)/otherchild.o \
333 $(OBJDIR)/procsup.o \
334 $(OBJDIR)/proc_mutex.o \
336 $(OBJDIR)/readwrite.o \
339 $(OBJDIR)/pollset.o \
341 $(OBJDIR)/sendrecv.o \
343 $(OBJDIR)/sha2_glue.o \
345 $(OBJDIR)/signals.o \
346 $(OBJDIR)/sockaddr.o \
347 $(OBJDIR)/socket_util.o \
348 $(OBJDIR)/sockets.o \
349 $(OBJDIR)/sockopt.o \
351 $(OBJDIR)/tempdir.o \
353 $(OBJDIR)/thread_cond.o \
354 $(OBJDIR)/thread_mutex.o \
355 $(OBJDIR)/thread_rwlock.o \
356 $(OBJDIR)/threadpriv.o \
358 $(OBJDIR)/timestr.o \
359 $(OBJDIR)/userinfo.o \
360 $(OBJDIR)/version.o \
366 # implement targets and dependancies (leave this section alone)
369 libs :: $(OBJDIR) $(TARGET_lib)
371 nlms :: libs $(TARGET_nlm)
374 # Updated this target to create necessary directories and copy files to the
375 # correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
377 install :: nlms $(INSTDIRS) FORCE
378 $(call COPY,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/)
380 -$(call COPY,$(APR)/LICENSE,$(INSTALLBASE)/)
381 -$(call COPY,$(APR)/STATUS,$(INSTALLBASE)/STATUS.apr)
382 -$(call COPY,$(APR)/CHANGES,$(INSTALLBASE)/CHANGES.apr)
383 -$(call COPY,$(APU)/STATUS,$(INSTALLBASE)/STATUS.apu)
384 -$(call COPY,$(APU)/CHANGES,$(INSTALLBASE)/CHANGES.apu)
385 -$(call COPYR,$(APR)/docs,$(INSTALLBASE)/docs/)
389 installdev :: $(INSTDEVDIRS) FORCE
390 $(call COPY,$(APR)/include/*.h,$(INSTALLBASE)/include/)
391 $(call COPY,$(APR)/*.imp,$(INSTALLBASE)/lib/)
392 $(call COPY,$(APR)/misc/netware/*.xdc,$(INSTALLBASE)/lib/)
393 $(call COPY,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/bin/)
394 $(call COPY,$(APRLIB),$(INSTALLBASE)/lib/)
395 $(call COPY,$(APULIB),$(INSTALLBASE)/lib/)
396 $(call COPY,$(APULDAPLIB),$(INSTALLBASE)/lib/)
397 $(call COPY,$(APUXMLLIB),$(INSTALLBASE)/lib/)
404 # Any specialized rules here
407 vpath %.c atomic/netware:strings:tables:passwd:lib:time/unix
408 vpath %.c file_io/unix:locks/netware:misc/netware:misc/unix:threadproc/netware
409 vpath %.c poll/unix:shmem/unix:support/unix:random/unix
410 vpath %.c dso/netware:memory/unix:mmap/unix:user/netware
412 # Use the win32 network_io if Winsock is being used
413 ifndef USE_STDSOCKETS
414 vpath %.c network_io/win32
416 vpath %.c network_io/unix
418 $(OBJDIR)/%.o: file_io/netware/%.c $(OBJDIR)/$(NLM_NAME)_cc.opt
420 @echo $(DL)CC $<$(DL)
421 $(CC) $< -cwd source -o=$@ @$(OBJDIR)/$(NLM_NAME)_cc.opt
424 # Include the 'tail' makefile that has targets that depend on variables defined
428 include $(APRBUILD)/NWGNUtail.inc