c62rules.mak

来自「SEED的VPM642测试程序-板级支持库」· MAK 代码 · 共 86 行

MAK
86
字号
#
#  This file contains the definitions and rules necessary to 
#  build an application for the C62 with GNU make.
#

#  explicitly define the path of c6x tools
C6X_TOOLS = $(TI_DIR)/c6000/cgtools/bin
TCONF_DIR = $(TI_DIR)\bin\utilities\tconf

#  C6000 compiler, assembler, and linker.
CC62 = $(C6X_TOOLS)/cl6x
AS62 = $(C6X_TOOLS)/cl6x
LD62 = $(C6X_TOOLS)/lnk6x

#  Options
#
#  cl6x:
#		-c	Disable linking (negate -z)
#  asm6x:
#
#  lnk6x:
#
CC62FLAGS = -c
AS62FLAGS =
LD62FLAGS =

#  explicitly define the path to Remove
REMOVE = $(TI_DIR)/bin/remove

#Tconf executable
TCONF = $(TCONF_DIR)\tconf

#
#  Define other directory locations necessary for building programs:
#
#       WINDIR  - the windows system directory
#

ifndef WINDIR
    ifdef windir
	WINDIR := $(windir)
    else
	WINDIR := $(SYSROOT)
    endif
endif

PATH := $(PATH);$(WINDIR)/ti/plugins/bios
export PATH
Path := $(PATH)
export Path

.PRECIOUS: %cfg.s62 %cfg.cmd %cfg.h62 %cfg_c.c %cfg.h

%.cdb %cfg.s62 %cfg.h62 %cfg.h %cfg_c.c %cfg.cmd : %.tcf
	$(TCONF) $(TCONFOPTS) $<

#  Pattern rules to build C6000 executables
%.obj : %.cpp
	cl6x $(CC62FLAGS) $(CC62OPTS) $<

%.obj : %.c
	cl6x $(CC62FLAGS) $(CC62OPTS) $<

%.asm : %.cpp
	cl6x -S $(CC62FLAGS) $(CC62OPTS) $<

%.asm : %.c
	cl6x -S $(CC62FLAGS) $(CC62OPTS) $<

%.obj : %.asm
	$(AS62) $(AS62FLAGS) $(AS62OPTS) $< 

%.obj : %.s62
	$(AS62) $(AS62FLAGS) $(AS62OPTS) $<

%.out : %.obj
	$(LD62) $(LD62FLAGS) $(LD62OPTS) -o $@ $< $(OBJS) $(LIBS) $(CMDS)

#  Implicit rules
.cpp:
	cl6x $(CC62FLAGS) $(CC62OPTS) $<

.c:
	cl6x $(CC62FLAGS) $(CC62OPTS) $<

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?