NWGNUtail.inc revision e097a47d2f32eaf74a6130e6fadfa3e24b8cb2ef
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# This contains final targets and should be included at the end of any
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# NWGNUmakefile file
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd#
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# If we are going to create an nlm, make sure we have assigned variables to
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# use during the link.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletcifndef NLM_NAME
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_NAME = $(TARGET_nlm)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndendif
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
2e545ce2450a9953665f701bb05350f0d3f26275ndifndef NLM_DESCRIPTION
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowenNLM_DESCRIPTION = $(NLM_NAME)
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowenendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifndef NLM_THREAD_NAME
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowenNLM_THREAD_NAME = $(NLM_NAME) Thread
3f08db06526d6901aa08c110b5bc7dde6bc39905ndendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifndef NLM_SCREEN_NAME
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_SCREEN_NAME = DEFAULT
3f08db06526d6901aa08c110b5bc7dde6bc39905ndendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
9472e4d3c410be3b3f1addbf3b1db1769f64e765ndifndef NLM_COPYRIGHT
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_COPYRIGHT = Licensed under the Apache License, Version 2.0
536a3bc06a7d525a48c17d2c09b6db9dbfd1f953ndendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
1ac39787115a288f5e848344b1b1e8dccb1c58f1ndifeq "$(NLM_FLAGS)" ""
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjungNLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndendif
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluemifeq "$(NLM_STACK_SIZE)" ""
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluemNLM_STACK_SIZE = 65536
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluemendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifeq "$(NLM_ENTRY_SYM)" ""
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_ENTRY_SYM = _LibCPrelude
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifeq "$(NLM_EXIT_SYM)" ""
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_EXIT_SYM = _LibCPostlude
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndendif
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# Create dependency lists based on the files available
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd#
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndCCOPT_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUhead.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUenvironment.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUtail.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd NWGNUmakefile \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(CUSTOM_INI) \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(EOLIST)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndCPPOPT_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUhead.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUenvironment.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUtail.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd NWGNUmakefile \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(CUSTOM_INI) \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(EOLIST)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd$(NLM_NAME)_LINKOPT_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(TARGET_lib) \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUenvironment.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd NWGNUmakefile \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(APBUILD)/NWGNUtail.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(CUSTOM_INI) \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(VERSION_INC) \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(EOLIST)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifeq "$(words $(strip $(TARGET_lib)))" "1"
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndLIB_NAME = $(basename $(notdir $(TARGET_lib)))
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd$(LIB_NAME)_LIBLST_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(FILES_lib_objs) \
9472e4d3c410be3b3f1addbf3b1db1769f64e765nd $(APBUILD)/NWGNUenvironment.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd NWGNUmakefile \
536a3bc06a7d525a48c17d2c09b6db9dbfd1f953nd $(APBUILD)/NWGNUtail.inc \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd $(CUSTOM_INI) \
1ac39787115a288f5e848344b1b1e8dccb1c58f1nd $(EOLIST)
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjungendif
727872d18412fc021f03969b8641810d8896820bhumbedooh
0d0ba3a410038e179b695446bb149cce6264e0abndifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
727872d18412fc021f03969b8641810d8896820bhumbedooh$(LIB_NAME)_LIBLST_DEPENDS += NWGNU$(LIB_NAME)
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohendif
0d0ba3a410038e179b695446bb149cce6264e0abnd
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohifeq "$(wildcard NWGNU$(NLM_NAME))" "NWGNU$(NLM_NAME)"
727872d18412fc021f03969b8641810d8896820bhumbedooh$(NLM_NAME)_LINKOPT_DEPENDS += NWGNU$(NLM_NAME)
0d0ba3a410038e179b695446bb149cce6264e0abndCCOPT_DEPENDS += NWGNU$(NLM_NAME)
0d0ba3a410038e179b695446bb149cce6264e0abndCPPOPT_DEPENDS += NWGNU$(NLM_NAME)
0d0ba3a410038e179b695446bb149cce6264e0abndendif
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh
0d0ba3a410038e179b695446bb149cce6264e0abnd#
0d0ba3a410038e179b695446bb149cce6264e0abnd# Generic compiler rules
0d0ba3a410038e179b695446bb149cce6264e0abnd#
727872d18412fc021f03969b8641810d8896820bhumbedooh
0d0ba3a410038e179b695446bb149cce6264e0abndifneq ($(MAKECMDGOALS),clean)
0d0ba3a410038e179b695446bb149cce6264e0abnd$(AP_WORK)/build/NWGNUversion.inc : $(AP_WORK)/build/nw_ver.awk $(AP_WORK)/include/ap_release.h
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh @echo Generating $(subst /,\,$@)
205f749042ed530040a4f0080dbcb47ceae8a374rjung $(AWK) -f $^ > $@
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen
0d0ba3a410038e179b695446bb149cce6264e0abnd-include $(AP_WORK)/build/NWGNUversion.inc
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndifneq "$(strip $(VERSION_STR))" ""
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndVERSION_INC = $(AP_WORK)/build/NWGNUversion.inc
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndelse
VERSION = 2,3,0
VERSION_STR = 2.3.0
VERSION_MAJMIN = 23
endif
endif
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
$(OBJDIR)/%.o: %.c $(OBJDIR)/$(NLM_NAME)_cc.opt
# @echo Compiling $<
@echo $(DL)CC $<$(DL)
$(CC) -o $@ $< @$(word 2, $^)
$(OBJDIR)/$(NLM_NAME)_cc.opt: $(CCOPT_DEPENDS)
$(call DEL,$@)
# @echo Generating $@
@echo $(DL)GEN $@$(DL)
ifneq "$(strip $(CFLAGS))" ""
@echo $(DL)$(CFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XCFLAGS))" ""
@echo $(DL)$(XCFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XINCDIRS))" ""
@echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
endif
ifneq "$(strip $(INCDIRS))" ""
@echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
endif
ifneq "$(strip $(DEFINES))" ""
@echo $(DL)$(DEFINES)$(DL)>> $@
endif
ifneq "$(strip $(XDEFINES))" ""
@echo $(DL)$(XDEFINES)$(DL)>> $@
endif
$(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(NLM_NAME)_cpp.opt
# @echo Compiling $<
@echo $(DL)CC $<$(DL)
$(CC) -o $@ $< @$(word 2, $^)
$(OBJDIR)/$(NLM_NAME)_cpp.opt: $(CPPOPT_DEPENDS)
$(call DEL,$@)
# @echo Generating $@
@echo $(DL)GEN $@$(DL)
ifneq "$(strip $(CFLAGS))" ""
@echo $(DL)$(CFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XCFLAGS))" ""
@echo $(DL)$(XCFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XINCDIRS))" ""
@echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
endif
ifneq "$(strip $(INCDIRS))" ""
@echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
endif
ifneq "$(strip $(DEFINES))" ""
@echo $(DL)$(DEFINES)$(DL)>> $@
endif
ifneq "$(strip $(XDEFINES))" ""
@echo $(DL)$(XDEFINES)$(DL)>> $@
endif
endif # one target nlm
#
# 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
$(call DEL,$@)
# @echo Generating $@
@echo $(DL)AR $@$(DL)
$(LIB) -o $@ @$<
$(OBJDIR)/$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
$(call DEL,$@)
ifneq "$(strip $(FILES_lib_objs))" ""
# @echo Generating $@
@echo $(DL)GEN $@$(DL)
@echo $(DL)$(FILES_lib_objs)$(DL)>> $@
endif
else # We must have more than one target library so load the individual makefiles
$(OBJDIR)/%.lib: NWGNU% $(APBUILD)/NWGNUhead.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUenvironment.inc FORCE
@echo Calling $<
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
endif
#
# Rules to build nlms.
#
vpath libcpre.o $(NOVI)
# 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
# @echo Linking $@
@echo $(DL)LINK $@$(DL)
$(LINK) @$(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)
$(call DEL,$@)
$(call DEL,$(@:.opt=.def))
# @echo Generating $@
@echo $(DL)GEN $@$(DL)
@echo $(DL)-warnings off$(DL)>> $@
@echo $(DL)-zerobss$(DL)>> $@
@echo $(DL)-o $(TARGET_nlm)$(DL)>> $@
ifneq "$(FILE_nlm_copyright)" ""
@$(CAT) $(FILE_nlm_copyright)>> $@
endif
ifeq "$(RELEASE)" "debug"
@echo $(DL)-g$(DL)>> $@
@echo $(DL)-sym internal$(DL)>> $@
@echo $(DL)-sym codeview4$(DL)>> $@
@echo $(DL)-osym $(OBJDIR)/$(NLM_NAME).sym$(DL)>> $@
else
@echo $(DL)-sym internal$(DL)>> $@
endif
@echo $(DL)-l $(SRC)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(HTTPD)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(SERVER)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(STDMOD)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(NWOS)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(NWOS)$(DL)>> $@
@echo $(DL)-l $(APR)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(APR)$(DL)>> $@
@echo $(DL)-l $(APRUTIL)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(PCRE)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime"$(DL)>> $@
@echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++"$(DL)>> $@
ifneq "$(IPV6)" ""
@echo $(DL)-l $(NOVELLLIBC)/include/winsock/IPV6$(DL)>> $@
endif
@echo $(DL)-l $(NOVELLLIBC)/imports$(DL)>> $@
ifneq "$(LDAPSDK)" ""
@echo $(DL)-l $(LDAPSDK)/imports$(DL)>> $@
endif
@echo $(DL)-l $(APULDAP)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(XML)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(SRC)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-nodefaults$(DL)>> $@
@echo $(DL)-map $(OBJDIR)/$(NLM_NAME).map$(DL)>> $@
ifneq "$(strip $(XLFLAGS))" ""
@echo $(DL)$(XLFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(FILES_nlm_objs))" ""
@echo $(DL)$(foreach objfile,$(strip $(FILES_nlm_objs)),$(objfile))$(DL)>> $@
endif
ifneq "$(FILES_nlm_libs)" ""
@echo $(DL)$(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
endif
@echo $(DL)-commandfile $(@:.opt=.def)$(DL)>> $@
@echo $(DL)# Do not edit this file - it is created by make!$(DL)> $(@:.opt=.def)
@echo $(DL)# All your changes will be lost!!$(DL)>> $(@:.opt=.def)
ifneq "$(FILE_nlm_msg)" ""
@echo $(DL)Messages $(FILE_nlm_msg)$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILE_nlm_hlp)" ""
@echo $(DL)Help $(FILE_nlm_hlp)$(DL)>> $(@:.opt=.def)
endif
ifeq "$(FILE_nlm_copyright)" ""
@echo $(DL)copyright "$(NLM_COPYRIGHT)"$(DL)>> $(@:.opt=.def)
endif
@echo $(DL)description "$(NLM_DESCRIPTION)"$(DL)>> $(@:.opt=.def)
@echo $(DL)threadname "$(NLM_THREAD_NAME)"$(DL)>> $(@:.opt=.def)
@echo $(DL)screenname "$(NLM_SCREEN_NAME)"$(DL)>> $(@:.opt=.def)
@echo $(DL)stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE))))$(DL)>> $(@:.opt=.def)
ifneq "$(NLM_VERSION)" ""
@echo $(DL)version $(NLM_VERSION)$(DL)>> $(@:.opt=.def)
else
@echo $(DL)version $(VERSION)$(DL)>> $(@:.opt=.def)
endif
@echo $(DL)start $(NLM_ENTRY_SYM)$(DL)>> $(@:.opt=.def)
@echo $(DL)exit $(NLM_EXIT_SYM)$(DL)>> $(@:.opt=.def)
ifneq "$(NLM_CHECK_SYM)" ""
@echo $(DL)check $(NLM_CHECK_SYM)$(DL)>> $(@:.opt=.def)
endif
@echo $(DL)$(strip $(NLM_FLAGS))$(DL)>> $(@:.opt=.def)
ifneq "$(FILES_nlm_modules)" ""
@echo $(DL)module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(module))$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_Ximports)" ""
@echo $(DL)import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(import))$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_exports)" ""
@echo $(DL)export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(export))$(DL)>> $(@:.opt=.def)
endif
# if APACHE_UNIPROC is defined, don't include XDCData
ifndef APACHE_UNIPROC
ifneq "$(string $(XDCDATA))" ""
@echo $(DL)xdcdata $(XDCDATA)$(DL)>> $(@:.opt=.def)
else
@echo $(DL)xdcdata apache.xdc$(DL)>> $(@:.opt=.def)
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% $(APBUILD)/NWGNUhead.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
@echo $(DL)Calling $<$(DL)
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
@$(ECHONL)
else
$(TARGET_nlm):
endif # NO_LICENSE_FILE
endif