NWGNUtail.inc revision aa9de0408a660ea61a911ec2312738681455708a
#
# This contains final targets and should be included at the end of any
# NWGNUmakefile file
#
#
# If we are going to create an nlm, make sure we have assigned variables to
# use during the link.
#
echo NLM_NAME=$(NLM_NAME)
ifndef NLM_NAME
NLM_NAME = $(TARGET_nlm)
endif
ifndef NLM_DESCRIPTION
NLM_DESCRIPTION = $(NLM_NAME)
endif
ifndef NLM_THREAD_NAME
NLM_THREAD_NAME = $(NLM_NAME) Thread
endif
ifndef NLM_SCREEN_NAME
NLM_SCREEN_NAME = Apache for NetWare
endif
#
# Create dependency lists based on the files available
#
CCOPT_DEPENDS = \
$(CUSTOM_INI) \
$(EOLIST)
CPPOPT_DEPENDS = \
$(CUSTOM_INI) \
$(EOLIST)
$(NLM_NAME)_LINKOPT_DEPENDS = \
$(TARGET_lib) \
$(CUSTOM_INI) \
$(EOLIST)
ifeq "$(words $(strip $(TARGET_lib)))" "1"
LIB_NAME = $(basename $(notdir $(TARGET_lib)))
$(LIB_NAME)_LIBLST_DEPENDS = \
$(FILES_lib_objs) \
$(CUSTOM_INI) \
$(EOLIST)
endif
ifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
$(LIB_NAME)_LIBLST_DEPENDS += NWGNU$(LIB_NAME)
endif
ifeq "$(wildcard NWGNU$(NLM_NAME))" "NWGNU$(NLM_NAME)"
$(NLM_NAME)_LINKOPT_DEPENDS += NWGNU$(NLM_NAME)
CCOPT_DEPENDS += NWGNU$(NLM_NAME)
CPPOPT_DEPENDS += NWGNU$(NLM_NAME)
endif
#
# Generic compiler rules
#
$(OBJDIR)/%.o: %.c $(OBJDIR)\cc.opt
$(OBJDIR)\cc.opt: $(CCOPT_DEPENDS)
@echo Generating $@
ifneq "$(strip $(CFLAGS))" ""
endif
ifneq "$(strip $(XCFLAGS))" ""
endif
ifneq "$(strip $(XINCDIRS))" ""
endif
ifneq "$(strip $(INCDIRS))" ""
endif
ifneq "$(strip $(DEFINES))" ""
endif
ifneq "$(strip $(XDEFINES))" ""
endif
$(OBJDIR)/%.o: %.cpp $(OBJDIR)\cpp.opt
$(OBJDIR)\cpp.opt: $(CPPOPT_DEPENDS)
@echo Generating $@
ifneq "$(strip $(CFLAGS))" ""
endif
ifneq "$(strip $(XCFLAGS))" ""
endif
ifneq "$(strip $(XINCDIRS))" ""
endif
ifneq "$(strip $(INCDIRS))" ""
endif
ifneq "$(strip $(DEFINES))" ""
endif
ifneq "$(strip $(XDEFINES))" ""
endif
#
# Rules to build libraries
#
# If we only have one target library then build it
ifeq "$(words $(strip $(TARGET_lib)))" "1"
$(TARGET_lib) : $(OBJDIR)\$(LIB_NAME)_lib.lst
@echo Generating $@
$(OBJDIR)\$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
@echo Generating $@
ifneq "$(strip $(FILES_lib_objs))" ""
endif
else # We must have more than one target library so load the individual makefiles
$(OBJDIR)/%.lib: NWGNU% $(AP_WORK)\build\NWGNUhead.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUenvironment.inc FORCE
endif
#
# Rules to build nlms.
#
vpath libcpre.o $(NOVELLLIBC)\imports
# If we only have one target NLM then build it
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)\$(NLM_NAME)_link.opt
# This will force the link option file to be rebuilt if we change the
# corresponding makefile
$(OBJDIR)\$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
@echo Generating $@
@echo -o $(TARGET_nlm) >> $@
ifneq "$(FILE_nlm_copyright)" ""
@-type $(FILE_nlm_copyright) >> $@
endif
ifeq "$(RELEASE)" "debug"
@echo -g >> $@
else
endif
ifneq "$(NLM_VERSION)" ""
else
endif
ifneq "$(LDAPSDK)" ""
endif
@echo -nodefaults >> $@
ifneq "$(NLM_STACK_SIZE)" ""
else
endif
ifneq "$(NLM_ENTRY_SYM)" ""
endif
ifneq "$(NLM_EXIT_SYM)" ""
@echo -exit $(NLM_EXIT_SYM) >> $@
endif
ifneq "$(NLM_CHECK_SYM)" ""
endif
ifneq "$(NLM_FLAGS)" ""
endif
ifneq "$(strip $(FILES_nlm_objs))" ""
endif
ifneq "$(FILES_nlm_libs)" ""
endif
ifneq "$(FILE_nlm_msg)" ""
endif
ifneq "$(FILE_nlm_hlp)" ""
endif
ifneq "$(FILES_nlm_modules)" ""
@echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
endif
ifneq "$(FILES_nlm_Ximports)" ""
@echo Import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(subst /,\,$(import))) >> $(OBJDIR)\$(NLM_NAME)_link.def
endif
ifneq "$(FILES_nlm_exports)" ""
@echo Export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(subst /,\,$(export))) >> $(OBJDIR)\$(NLM_NAME)_link.def
endif
ifneq "$(strip $(XLFLAGS))" ""
endif
# if APACHE_UNIPROC is defined, don't include XDCData
ifndef APACHE_UNIPROC
ifneq "$(string $(XDCDATA))" ""
else
endif
endif
else # more than one target so look for individual makefiles.
# Only include these if NO_LICENSE_FILE isn't set to prevent excessive
# recursion
ifndef NO_LICENSE_FILE
$(OBJDIR)/%.nlm: NWGNU% $(AP_WORK)\build\NWGNUhead.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUenvironment.inc $(CUSTOM_INI) FORCE
else
$(TARGET_nlm):
endif # NO_LICENSE_FILE
endif