NWGNUhtdbm revision 70953fb44a7140fe206c3a5f011e24209c8c5c6a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews# Make sure all needed macro's are defined
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Get the 'head' of the build environment if necessary. This includes default
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# targets and paths to tools
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsifndef EnvironmentDefined
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude $(AP_WORK)\build\NWGNUhead.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These directories will be at the beginning of the include list, followed by
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# INCDIRS
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXINCDIRS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(NWOS) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(APR)/include \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(APRUTIL)/include \
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews $(APR)/misc/netware \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(APR) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These flags will come after CFLAGS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXCFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These defines will come after DEFINES
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXDEFINES += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These flags will be added to the link.opt file
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXLFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These values will be appended to the correct variables based on the value of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# RELEASE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsifeq "$(RELEASE)" "debug"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXINCDIRS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXCFLAGS += \
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXDEFINES += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXLFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsifeq "$(RELEASE)" "noopt"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXINCDIRS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXCFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXDEFINES += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXLFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsifeq "$(RELEASE)" "release"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXINCDIRS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXCFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXDEFINES += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXLFLAGS += \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These are used by the link target if an NLM is being generated
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This is used by the link 'name' directive to name the nlm. If left blank
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# TARGET_nlm (see below) will be used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_NAME = htdbm
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This is used by the link '-desc ' directive.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If left blank, NLM_NAME will be used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_DESCRIPTION = Apache $(VERSION_STR) HT Database Management Utility for NetWare
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This is used by the '-threadname' directive. If left blank,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NLM_NAME Thread will be used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_THREAD_NAME = htdbm
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This is used by the '-screenname' directive. If left blank,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# 'Apache for NetWare' Thread will be used.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_SCREEN_NAME = htdbm Password Management
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified, it will override VERSION value in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# $(AP_WORK)\build\NWGNUenvironment.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_VERSION =
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified, it will override the default of 64K
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_STACK_SIZE = 8192
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified it will be used by the link '-entry' directive
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_ENTRY_SYM = _LibCPrelude
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified it will be used by the link '-exit' directive
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_EXIT_SYM = _LibCPostlude
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified it will be used by the link '-check' directive
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_CHECK_SYM =
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If these are specified it will be used by the link '-flags' directive
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsNLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified it will be linked in with the XDCData option in the def
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file instead of the default of $(NWOS)/apache.xdc. XDCData can be disabled
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# by setting APACHE_UNIPROC in the environment
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXDCDATA =
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews# If there is an NLM target, put it here
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARGET_nlm = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(OBJDIR)/htdbm.nlm \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If there is an LIB target, put it here
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARGET_lib = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These are the OBJ files needed to create the NLM target above.
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews# Paths must all use the '/' character
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFILES_nlm_objs = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(OBJDIR)/htdbm.o \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These are the LIB files needed to create the NLM target above.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These will be added as a library command in the link.opt file.
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFILES_nlm_libs = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews libcpre.o \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These are the modules that the above NLM target depends on to load.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# These will be added as a module command in the link.opt file.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFILES_nlm_modules = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews aprlib \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews libc \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EOLIST)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If the nlm has a msg file, put it's path here
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews#
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark AndrewsFILE_nlm_msg =
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews#
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews# If the nlm has a hlp file put it's path here
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFILE_nlm_hlp =
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If this is specified, it will override $(NWOS)\copyright.txt.
#
FILE_nlm_copyright =
#
# Any additional imports go here
#
FILES_nlm_Ximports = \
@$(APR)/aprlib.imp \
@libc.imp \
$(EOLIST)
#
# Any symbols exported to here
#
FILES_nlm_exports = \
$(EOLIST)
#
# These are the OBJ files needed to create the LIB target above.
# Paths must all use the '/' character
#
FILES_lib_objs = \
$(EOLIST)
#
# implement targets and dependancies (leave this section alone)
#
libs :: $(OBJDIR) $(TARGET_lib)
nlms :: libs $(TARGET_nlm)
#
# Updated this target to create necessary directories and copy files to the
# correct place. (See $(AP_WORK)\build\NWGNUhead.inc for examples)
#
install :: nlms FORCE
#
# Any specialized rules here
#
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
include $(AP_WORK)\build\NWGNUtail.inc