NWGNUtail.inc revision e097a47d2f32eaf74a6130e6fadfa3e24b8cb2ef
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# This contains final targets and should be included at the end of any
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# NWGNUmakefile file
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# If we are going to create an nlm, make sure we have assigned variables to
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# use during the link.
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletcifndef NLM_NAME
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_NAME = $(TARGET_nlm)
2e545ce2450a9953665f701bb05350f0d3f26275ndifndef NLM_DESCRIPTION
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowenNLM_DESCRIPTION = $(NLM_NAME)
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifndef NLM_THREAD_NAME
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowenNLM_THREAD_NAME = $(NLM_NAME) Thread
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifndef NLM_SCREEN_NAME
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_SCREEN_NAME = DEFAULT
9472e4d3c410be3b3f1addbf3b1db1769f64e765ndifndef NLM_COPYRIGHT
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_COPYRIGHT = Licensed under the Apache License, Version 2.0
1ac39787115a288f5e848344b1b1e8dccb1c58f1ndifeq "$(NLM_FLAGS)" ""
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjungNLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluemifeq "$(NLM_STACK_SIZE)" ""
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluemNLM_STACK_SIZE = 65536
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifeq "$(NLM_ENTRY_SYM)" ""
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_ENTRY_SYM = _LibCPrelude
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifeq "$(NLM_EXIT_SYM)" ""
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndNLM_EXIT_SYM = _LibCPostlude
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd# Create dependency lists based on the files available
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndCCOPT_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndCPPOPT_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd$(NLM_NAME)_LINKOPT_DEPENDS = \
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndifeq "$(words $(strip $(TARGET_lib)))" "1"
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndLIB_NAME = $(basename $(notdir $(TARGET_lib)))
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd$(LIB_NAME)_LIBLST_DEPENDS = \
0d0ba3a410038e179b695446bb149cce6264e0abndifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
727872d18412fc021f03969b8641810d8896820bhumbedooh$(LIB_NAME)_LIBLST_DEPENDS += NWGNU$(LIB_NAME)
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)
0d0ba3a410038e179b695446bb149cce6264e0abnd# Generic compiler rules
0d0ba3a410038e179b695446bb149cce6264e0abndifneq ($(MAKECMDGOALS),clean)
0d0ba3a410038e179b695446bb149cce6264e0abnd$(AP_WORK)/build/NWGNUversion.inc : $(AP_WORK)/build/nw_ver.awk $(AP_WORK)/include/ap_release.h
205f749042ed530040a4f0080dbcb47ceae8a374rjung $(AWK) -f $^ > $@
0d0ba3a410038e179b695446bb149cce6264e0abnd-include $(AP_WORK)/build/NWGNUversion.inc
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndifneq "$(strip $(VERSION_STR))" ""
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndVERSION_INC = $(AP_WORK)/build/NWGNUversion.inc
$(call DEL,$@)
$(call DEL,$@)
$(call DEL,$@)
$(LIB) -o $@ @$<
$(call DEL,$@)
$(OBJDIR)/%.lib: NWGNU% $(APBUILD)/NWGNUhead.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUenvironment.inc FORCE
$(call DEL,$@)
@echo $(DL)module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(module))$(DL)>> $(@:.opt=.def)
@echo $(DL)import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(import))$(DL)>> $(@:.opt=.def)
@echo $(DL)export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(export))$(DL)>> $(@:.opt=.def)
$(OBJDIR)/%.nlm: NWGNU% $(APBUILD)/NWGNUhead.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
@$(ECHONL)