vxworks串口调试程序事例适用于初学者
源代码在线查看: makefile
# Wind River Workbench generated Makefile. # Do not edit!!! # # The file ".wrmakefile" is the template used by the Wind River Workbench to # generate the makefiles of this project. Add user-specific build targets and # make rules only(!) in this project's ".wrmakefile" file. These will then be # automatically dumped into the makefiles. WIND_HOME := $(subst \,/,$(WIND_HOME)) WIND_BASE := $(subst \,/,$(WIND_BASE)) WIND_USR := $(subst \,/,$(WIND_USR)) all : pre_build main_all post_build _clean :: @echo "make: removing targets and objects of `pwd`" TRACE=0 TRACEON=$(TRACE:0=@) TRACE_FLAG=$(TRACEON:1=) MAKEFILE := Makefile FLEXIBLE_BUILD := 1 BUILD_SPEC = SIMNTdiab DEBUG_MODE = 1 ifeq ($(DEBUG_MODE),1) MODE_DIR := Debug else MODE_DIR := NonDebug endif OBJ_DIR := . PRJ_ROOT_DIR := E:/ZhaoJiang/serial_write WS_ROOT_DIR := C:/WindRiver/workspace #Global Build Macros PROJECT_TYPE = DKM DEFINES = EXPAND_DBG = 0 #BuildSpec specific Build Macros VX_CPU_FAMILY = simpc CPU = SIMNT TOOL_FAMILY = diab TOOL = diab TOOL_PATH = CC_ARCH_SPEC = -tX86LH:vxworks65 LIBPATH = LIBS = IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip #BuildTool flags ifeq ($(DEBUG_MODE),1) DEBUGFLAGS_C-Compiler = -g DEBUGFLAGS_C++-Compiler = -g DEBUGFLAGS_Linker = -g DEBUGFLAGS_Partial-Image-Linker = DEBUGFLAGS_Librarian = DEBUGFLAGS_Assembler = -g else DEBUGFLAGS_C-Compiler = -XO -Xsize-opt DEBUGFLAGS_C++-Compiler = -XO -Xsize-opt DEBUGFLAGS_Linker = -XO -Xsize-opt DEBUGFLAGS_Partial-Image-Linker = DEBUGFLAGS_Librarian = DEBUGFLAGS_Assembler = -XO -Xsize-opt endif #Project Targets PROJECT_TARGETS = serial_write/$(MODE_DIR)/serial_write.out #Rules # serial_write ifeq ($(DEBUG_MODE),1) serial_write/$(MODE_DIR)/% : DEBUGFLAGS_C-Compiler = -g serial_write/$(MODE_DIR)/% : DEBUGFLAGS_C++-Compiler = -g serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Linker = -g serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Partial-Image-Linker = serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Librarian = serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Assembler = -g else serial_write/$(MODE_DIR)/% : DEBUGFLAGS_C-Compiler = -XO -Xsize-opt serial_write/$(MODE_DIR)/% : DEBUGFLAGS_C++-Compiler = -XO -Xsize-opt serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Linker = -XO -Xsize-opt serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Partial-Image-Linker = serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Librarian = serial_write/$(MODE_DIR)/% : DEBUGFLAGS_Assembler = -XO -Xsize-opt endif serial_write/$(MODE_DIR)/% : IDE_INCLUDES = -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip serial_write/$(MODE_DIR)/% : PROJECT_TYPE = DKM serial_write/$(MODE_DIR)/% : DEFINES = serial_write/$(MODE_DIR)/% : EXPAND_DBG = 0 serial_write/$(MODE_DIR)/% : VX_CPU_FAMILY = simpc serial_write/$(MODE_DIR)/% : CPU = SIMNT serial_write/$(MODE_DIR)/% : TOOL_FAMILY = diab serial_write/$(MODE_DIR)/% : TOOL = diab serial_write/$(MODE_DIR)/% : TOOL_PATH = serial_write/$(MODE_DIR)/% : CC_ARCH_SPEC = -tX86LH:vxworks65 serial_write/$(MODE_DIR)/% : LIBPATH = serial_write/$(MODE_DIR)/% : LIBS = serial_write/$(MODE_DIR)/% : OBJ_DIR := serial_write/$(MODE_DIR) serial_write/$(MODE_DIR)/Objects/serial_write/serial_write.o : E:/ZhaoJiang/serial_write/serial_write.c $(TRACE_FLAG)if [ ! -d "`dirname "$@"`" ]; then mkdir -p "`dirname "$@"`"; fi;echo "building $@"; $(TOOL_PATH)dcc $(DEBUGFLAGS_C-Compiler) $(CC_ARCH_SPEC) -W:c:,-Xclib-optim-off -Xansi -Xlocal-data-area-static-only -Xforce-declarations -Xmake-dependency=0xd $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL $(DEFINES) -o "$@" -c "$ OBJECTS_serial_write = serial_write/$(MODE_DIR)/Objects/serial_write/serial_write.o serial_write/$(MODE_DIR)/serial_write.out : $(OBJECTS_serial_write) $(TRACE_FLAG)if [ ! -d "`dirname "$@"`" ]; then mkdir -p "`dirname "$@"`"; fi;echo "building $@";rm -f "$@";ddump -Ng $(OBJECTS_serial_write) $(ADDED_OBJECTS) | tclsh $(WIND_BASE)/host/resource/hutils/tcl/munch.tcl -c pentium > $(OBJ_DIR)/ctdt.c; $(TOOL_PATH)dcc $(DEBUGFLAGS_Linker) $(CC_ARCH_SPEC) -Xdollar-in-ident -Xforce-declarations $(ADDED_CFLAGS) $(IDE_INCLUDES) $(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL $(DEFINES) -o $(OBJ_DIR)/ctdt.o -c $(OBJ_DIR)/ctdt.c; $(TOOL_PATH)dld -tX86LH:vxworks65 -X -r5 -f 0x90,1,1 -r4 -o "$@" $(OBJ_DIR)/ctdt.o $(OBJECTS_serial_write) $(ADDED_OBJECTS) $(LIBPATH) $(LIBS) $(ADDED_LIBPATH) $(ADDED_LIBS) && if [ "$(EXPAND_DBG)" = "1" ]; then plink "$@";fi serial_write/$(MODE_DIR)/serial_write_compile_file : $(FILE) ; _clean :: serial_write/$(MODE_DIR)/serial_write_clean serial_write/$(MODE_DIR)/serial_write_clean : $(TRACE_FLAG)if [ -d "serial_write" ]; then cd "serial_write"; rm -rf $(MODE_DIR); fi DEP_FILES := serial_write/$(MODE_DIR)/Objects/serial_write/serial_write.d -include $(DEP_FILES) WIND_SCOPETOOLS_BASE := $(subst \,/,$(WIND_SCOPETOOLS_BASE)) -include $(PRJ_ROOT_DIR)/*.makefile -include *.makefile main_all : external_build $(PROJECT_TARGETS) @echo "make: built targets of `pwd`" # entry point for extending the build external_build :: @echo "" # main entry point for pre processing prior to the build pre_build :: $(PRE_BUILD_STEP) generate_sources @echo "" # entry point for generating sources prior to the build generate_sources :: @echo "" # main entry point for post processing after the build post_build :: $(POST_BUILD_STEP) deploy_output @echo "" # entry point for deploying output after the build deploy_output :: @echo "" clean :: external_clean $(CLEAN_STEP) _clean # entry point for extending the build clean external_clean :: @echo ""