rules-lib.x86-win32
资源名称:ixp425BSP.rar [点击查看]
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:4k
源码类别:
VxWorks
开发平台:
C/C++
- # rules-lib.x86-win32 - Host specific default definitions
- #
- # modification history
- # --------------------
- # 01o,18jul02,cjs Replace -M flag with OPTION_DEPEND
- # 01n,12nov01,dbs fix dependency-build warnings for C++ source
- # 01m,08nov01,tam updated for repackaging
- # 01l,05jan99,fle added the DOC_OPTS_XXX flags
- # 01k,25nov98,fle made the man rule use DOC_BOOK and DOC_CHAPTER variables
- # 01j,10nov98,fle removed unability to make man pages on Windows hosts
- # warning
- # 01i,02apr98,pcn Removed Objcopy changes from Tempest view
- # 01h,03dec97,jmp added synopsis rules
- # 01g,20feb97,yp fixed for loop for *.s *.cpp wildcards
- # 01g,07feb97,cjs changed '/' to '' in rule for $(TGT_DIR)lib$(LIBNAME)
- # to fix spr 7859
- # 01f,07nov96,yp prevented clean rule from stuffing vxrm with all files
- # 01e,07nov96,yp added subdirs as phony target when SUBDIRS is null
- # 01d,10jul96,yp changed for command to get list from make wildcard
- # 01c,08jul96,yp stopped subshells so life will be good on WIN95
- # 01b,02jul96,yp changed sed rule to not use esc chars, added $(SHELL)
- # 01a,07may96,yp derived from rules.x86-win32
- #
- # DESCRIPTION
- #
- # This file contains the makefile rules that are specific to Windows to build
- # vxWorks libraries. It is included by rules.library where rules common to
- # all hosts and the default rule exist. This file containes rules for managing
- # archives on Windows hosts using batch files. If the archive exists we
- # update it. If not we create it. The archive are created from where the
- # object files exist to aviod including paths in the archive.
- #
- # The depency list is generated by target depend.$(CPU)$(TOOL) which creates
- # a dependency list for all files c,s and cpp suffixes.
- #
- # Sub directories to be built are expected to be defined in the SUBDIRS macor.
- # if it not defined the subdirs target is not seen.
- ifeq ($(LIBNAME),)
- LIBNAME = lib$(CPU)$(TOOL)vx.a
- endif
- LIBNAME_TOOLS = $(subst /,$(DIRCHAR),$(LIBNAME))
- LIBDIR_TOOLS = $(subst /,$(DIRCHAR),$(LIBDIR))
- lib: $(TGT_DIR)lib$(LIBNAME)
- # If the string containing the list of files to delete becomes too large
- # DOS becomes unhappy. So we need to have make split up the list and call
- # $(RM) independantly for each file. We avoid conflict with builing vs
- # cleaning by appending _clean to the list of objects, and strip it
- # right before we remove it.
- clean: $(foreach file,$(subst /,$(DIRCHAR),$(LIBOBJS) $(LOCAL_CLEAN)),$(file)_clean)
- $(RM) depend.$(CPU)$(TOOL)
- $(foreach file,$(subst /,$(DIRCHAR),$(LIBOBJS) $(LOCAL_CLEAN)),$(file)_clean):
- $(RM) $(subst _clean,,$@)
- $(TGT_DIR)lib$(LIBNAME) : $(MAKE_LIBDIR) $(LIBOBJS)
- @ if exist $@ updateLib.bat $(CPU) $(TOOL)
- $(AR) $(RANLIB) $(RM) $(TGT_DIR) $(LIBNAME_TOOLS) $(LIBDIR_TOOLS) $(notdir $?)
- @ if NOT exist $@ createLib.bat $(CPU)
- $(TOOL) $(AR) $(RANLIB) $(RM) $(TGT_DIR) $(LIBNAME) $(LIBDIR)
- depend.$(CPU)$(TOOL) :
- @ $(RM) $@
- @ echo Creating depend.$(CPU)$(TOOL)
- ifneq ($(wildcard *.c),)
- @ for %f in ($(wildcard *.c)) do
- $(CC) $(OPTION_DEPEND) $(CFLAGS) $(OPTION_OBJECT_ONLY) %f
- | $(TCL) $(BIN_DIR)depend.tcl $(TGT_DIR) >>$@
- endif
- ifneq ($(wildcard *.s),)
- @ for %f in ($(wildcard *.s)) do
- $(CPP) $(OPTION_DEPEND) $(CASFLAGS) %f
- | $(TCL) $(BIN_DIR)depend.tcl $(TGT_DIR) >>$@
- endif
- ifneq ($(wildcard *.cpp),)
- @ for %f in ($(wildcard *.cpp)) do
- $(CXX) $(OPTION_DEPEND) $(CFLAGS) %f
- | $(TCL) $(BIN_DIR)depend.tcl $(TGT_DIR) >>$@
- endif
- # if SUBDIRS is not null we need to build the subdirectories before building
- # the current directory.
- # if we have SUBDIRS
- ifneq ($(SUBDIRS),)
- subdirs : $(SUBDIRS)
- $(SUBDIRS)::
- $(MAKE) -C $@ CPU=$(CPU) TOOL=$(TOOL) $(TARGET)
- else
- subdirs :
- endif
- DOC_DIR = $(DOCS_ROOT)vxworksref
- man:
- $(BIN_DIR)/wtxtcl $(RESOURCE_DIR)/doctools/refgen.tcl $(DOC_OPTS)
- -book $(DOC_BOOK) -chapter $(DOC_CHAPTER) -out $(DOC_DIR)
- $(DOC_FILES)
- synopsis ::
- @ echo can't build synopsis resource files on Windows hosts
- exit (1)
- clean_synopsis ::
- @ echo can't build synopsis resource files on Windows hosts
- exit (1)