www.pudn.com > Tornado_Train_Workshop_demo_program.rar > makeErrorTable


# makeErrorTable - project makefile extension for building error status table 
 
# In the bootable project's build spec, define the makefile macro 
# 
#   STAT_HEADER_DIRS  - a list of directories containing header files which 
#			potentially define error code macros starting with "S_" 
#			as well as a module number header file *ModNum.h. One 
#			should include $(TGT_DIR)/h in this list in order to 
#			get the VxWorks error codes. 
# 
# Another "makefile macro" to be defined is 
# 
#   include ../makeErrorTable # 
# 
# which results in the inclusion of this file, provided it is placed 
# in the project directory. 
#  
# Also, a custom rule should be defined in the build spec. This rule 
# should be 
#  
#   statTbl.o : 
#   		$(MAKE_STAT_TBL) 
# 
# That is, the target is statTbl.o, there are no dependencies, and the 
# build commands are given by $(MAKE_STAT_TBL), which is defined below. 
# Doing a "Re-Build All" rebuilds statTbl.o as well. Doing a "Build" 
# rebuilds statTbl.o only if it does not exist in the build spec 
# directory. 
 
 
MAKE_STAT_TOOL = makeStatTbl 
 
STAT_INCLUDES = $(patsubst %,-I%,$(STAT_HEADER_DIRS)) 
STAT_CFLAGS = -w 
 
ifneq   ($(findstring INCLUDE_STAT_SYM_TBL, $(COMPONENTS)),) 
EXTRA_MODULES        += statTbl.o 
endif 
 
ifneq ($(WIND_HOST_TYPE),x86-win32) 
 
define MAKE_STAT_TBL 
	$(MAKE_STAT_TOOL) $(STAT_HEADER_DIRS) > statTbl.c 
	$(CC) $(CFLAGS) $(STAT_INCLUDES) $(STAT_CFLAGS) -c statTbl.c 
 
endef 
 
else 
 
define MAKE_STAT_TBL 
	$(MAKE_STAT_TOOL) $(STAT_HEADER_DIRS) 
	$(CC) $(CFLAGS) $(STAT_INCLUDES) $(STAT_CFLAGS) -c statTbl.c 
 
endef 
 
endif