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/private \
54 $(APR)/include/arch/NetWare \
55 $(APR)/include/arch/unix \
64 # These flags will come after CFLAGS
70 # These defines will come after DEFINES
76 # These flags will be added to the link.opt file
82 # These values will be appended to the correct variables based on the value of
85 ifeq "$(RELEASE)" "debug"
99 ifeq "$(RELEASE)" "noopt"
113 ifeq "$(RELEASE)" "release"
128 # These are used by the link target if an NLM is being generated
129 # This is used by the link 'name' directive to name the nlm. If left blank
130 # TARGET_nlm (see below) will be used.
135 # This is used by the link '-desc ' directive.
136 # If left blank, NLM_NAME will be used.
138 NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) $(VERSION_SKT)
141 # This is used by the '-threadname' directive. If left blank,
142 # NLM_NAME Thread will be used.
146 # If this is specified, it will override VERSION value in
147 # $(APR_WORK)/build/NWGNUenvironment.inc
152 # If this is specified, it will override the default of 64K
157 # If this is specified it will be used by the link '-entry' directive
162 # If this is specified it will be used by the link '-exit' directive
167 # If this is specified it will be used by the link '-check' directive
172 # If this is specified it will be used by the link '-flags' directive
177 # If this is specified it will be linked in with the XDCData option in the def
178 # file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
179 # be disabled by setting APACHE_UNIPROC in the environment
184 # Declare all target files (you must add your files here)
188 # If there is an NLM target, put it here
191 $(OBJDIR)/aprlib.nlm \
195 # If there is an LIB target, put it here
198 $(OBJDIR)/aprlib.lib \
202 # These are the OBJ files needed to create the NLM target above.
203 # Paths must all use the '/' character
206 $(OBJDIR)/libprews.o \
210 # These are the LIB files needed to create the NLM target above.
211 # These will be added as a library command in the link.opt file.
222 # These are the modules that the above NLM target depends on to load.
223 # These will be added as a module command in the link.opt file.
225 FILES_nlm_modules = \
229 # Include the Winsock libraries if Winsock is being used
230 ifndef USE_STDSOCKETS
231 FILES_nlm_modules += ws2_32 \
235 #If the LDAP support is defined then add the auto-load modules
236 ifneq "$(LDAPSDK)" ""
237 FILES_nlm_modules += \
244 # If the nlm has a msg file, put it's path here
249 # If the nlm has a hlp file put it's path here
254 # If this is specified, it will override $(NWOS)\copyright.txt.
259 # Any additional imports go here
261 FILES_nlm_Ximports = \
266 # Include the Winsock imports if Winsock is being used
267 ifndef USE_STDSOCKETS
268 FILES_nlm_Ximports += \
275 #If the LDAP support is defined then add the imports
276 ifneq "$(LDAPSDK)" ""
277 FILES_nlm_Ximports += \
284 # Any symbols exported to here
286 FILES_nlm_exports = \
291 # These are the OBJ files needed to create the LIB target above.
292 # Paths must all use the '/' character
295 $(OBJDIR)/apr_atomic.o \
296 $(OBJDIR)/apr_cpystrn.o \
297 $(OBJDIR)/apr_escape.o \
298 $(OBJDIR)/apr_fnmatch.o \
299 $(OBJDIR)/apr_getpass.o \
300 $(OBJDIR)/apr_hash.o \
301 $(OBJDIR)/apr_pools.o \
302 $(OBJDIR)/apr_random.o \
303 $(OBJDIR)/apr_skiplist.o \
304 $(OBJDIR)/apr_snprintf.o \
305 $(OBJDIR)/apr_strings.o \
306 $(OBJDIR)/apr_strnatcmp.o \
307 $(OBJDIR)/apr_strtok.o \
308 $(OBJDIR)/apr_tables.o \
310 $(OBJDIR)/charset.o \
315 $(OBJDIR)/errorcodes.o \
317 $(OBJDIR)/fileacc.o \
318 $(OBJDIR)/filedup.o \
319 $(OBJDIR)/filepath.o \
320 $(OBJDIR)/filepath_util.o \
321 $(OBJDIR)/filestat.o \
322 $(OBJDIR)/filesys.o \
326 $(OBJDIR)/groupinfo.o \
327 $(OBJDIR)/inet_pton.o \
328 $(OBJDIR)/inet_ntop.o \
331 $(OBJDIR)/multicast.o \
334 $(OBJDIR)/otherchild.o \
336 $(OBJDIR)/procsup.o \
337 $(OBJDIR)/proc_mutex.o \
339 $(OBJDIR)/readwrite.o \
342 $(OBJDIR)/pollset.o \
344 $(OBJDIR)/sendrecv.o \
346 $(OBJDIR)/sha2_glue.o \
348 $(OBJDIR)/signals.o \
349 $(OBJDIR)/sockaddr.o \
350 $(OBJDIR)/socket_util.o \
351 $(OBJDIR)/sockets.o \
352 $(OBJDIR)/sockopt.o \
354 $(OBJDIR)/tempdir.o \
356 $(OBJDIR)/thread_cond.o \
357 $(OBJDIR)/thread_mutex.o \
358 $(OBJDIR)/thread_rwlock.o \
359 $(OBJDIR)/threadpriv.o \
361 $(OBJDIR)/timestr.o \
362 $(OBJDIR)/userinfo.o \
363 $(OBJDIR)/version.o \
370 # implement targets and dependancies (leave this section alone)
373 libs :: $(OBJDIR) $(TARGET_lib)
375 nlms :: libs $(TARGET_nlm)
378 # Updated this target to create necessary directories and copy files to the
379 # correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
381 install :: nlms $(INSTDIRS) FORCE
382 $(call COPY,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/)
384 -$(call COPY,$(APR)/LICENSE,$(INSTALLBASE)/)
385 -$(call COPY,$(APR)/STATUS,$(INSTALLBASE)/STATUS.apr)
386 -$(call COPY,$(APR)/CHANGES,$(INSTALLBASE)/CHANGES.apr)
387 -$(call COPY,$(APU)/STATUS,$(INSTALLBASE)/STATUS.apu)
388 -$(call COPY,$(APU)/CHANGES,$(INSTALLBASE)/CHANGES.apu)
389 -$(call COPYR,$(APR)/docs,$(INSTALLBASE)/docs/)
393 installdev :: $(INSTDEVDIRS) FORCE
394 $(call COPY,$(APR)/include/*.h,$(INSTALLBASE)/include/)
395 $(call COPY,$(APR)/*.imp,$(INSTALLBASE)/lib/)
396 $(call COPY,$(APR)/misc/netware/*.xdc,$(INSTALLBASE)/lib/)
397 $(call COPY,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/bin/)
398 $(call COPY,$(APRLIB),$(INSTALLBASE)/lib/)
399 $(call COPY,$(APULIB),$(INSTALLBASE)/lib/)
400 $(call COPY,$(APULDAPLIB),$(INSTALLBASE)/lib/)
401 $(call COPY,$(APUXMLLIB),$(INSTALLBASE)/lib/)
408 # Any specialized rules here
411 vpath %.c atomic/netware:strings:tables:passwd:lib:time/unix
412 vpath %.c file_io/unix:locks/netware:misc/netware:misc/unix:threadproc/netware
413 vpath %.c poll/unix:shmem/unix:support/unix:random/unix
414 vpath %.c dso/netware:memory/unix:mmap/unix:user/netware:encoding
416 # Use the win32 network_io if Winsock is being used
417 ifndef USE_STDSOCKETS
418 vpath %.c network_io/win32
420 vpath %.c network_io/unix
422 $(OBJDIR)/%.o: file_io/netware/%.c $(OBJDIR)/$(NLM_NAME)_cc.opt
424 @echo $(DL)CC $<$(DL)
425 $(CC) $< -cwd source -o=$@ @$(OBJDIR)/$(NLM_NAME)_cc.opt
428 # Include the 'tail' makefile that has targets that depend on variables defined
432 include $(APRBUILD)/NWGNUtail.inc