User`s guide

Compiling and Linking Programs
Program Generation 2-17
Example 2-3. Sample Makefile for a DSP/BIOS Program
# Makefile for creation of program named by the PROG variable
# The following naming conventions are used by this makefile:
# <prog>.asm - C54 assembly language source file
# <prog>.obj - C54 object file (compiled/assembled source)
# <prog>.out - C54 executable (fully linked program)
# <prog>cfg.s54 - configuration assembly source file
# generated by Configuration Tool
# <prog>cfg.h54 - configuration assembly header file
# generated by Configuration Tool
# <prog>cfg.cmd - configuration linker command file
# generated by Configuration Tool
include $(TI_DIR)/c5400/bios/include/c54rules.mak
#
# Compiler, assembler, and linker options.
# -g enable symbolic debugging
CC54OPTS = -g
AS54OPTS =
# -q quiet run
LD54OPTS = -q
# Every BIOS program must be linked with:
# $(PROG)cfg.o54 - object resulting from assembling
# $(PROG)cfg.s54
# $(PROG)cfg.cmd - linker command file generated by
# the Configuration Tool. If additional
# linker command files exist,
# $(PROG)cfg.cmd must appear first.
#
PROG = volume
OBJS = $(PROG)cfg.obj load.obj
LIBS =
CMDS = $(PROG)cfg.cmd
# Targets:
all:: $(PROG).out
$(PROG).out: $(OBJS) $(CMDS)
$(PROG)cfg.obj: $(PROG)cfg.h54
$(PROG).obj:
$(PROG)cfg.s54 $(PROG)cfg.h54 $(PROG)cfg.cmd:
@ echo Error: $@ must be manually regenerated:
@ echo Open and save $(PROG).cdb within the BIOS Configuration Tool.
@ check $@
.clean clean::
@ echo removing generated configuration files ...
@ remove -f $(PROG)cfg.s54 $(PROG)cfg.h54 $(PROG)cfg.cmd
@ echo removing object files and binaries ...
@ remove -f *.obj *.out *.lst *.map