S5U1C17001C ManUal
EPSOn
11-11
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
11 OTHEr TOOlS
11
Tools
11.1.7 Suffix Definitions
Dependency lists in which the target file type is "
.o
" and the dependent file type is "
.c
" normally contain a
command line to invoke the compiler. In other words, basically the same command line can be used common to
all dependency lists that process the same file type if only the file names can be replaced. The suffix definition is
a description of a list of file types (extensions) and commands to be executed and allows the make file to omit the
description of commands in each dependency list. This function helps simplify dependency lists when many source
files must be managed.
When a suffix definition has been made in the make file, the
make.exe
executes the commands described in the
suffix definition for the dependency list that have the same file type configuration as the suffix definition and does
not have a command description. If a dependency list has a command described, it is executed, not the command
in the suffix definition. Therefore, the specific dependency list can execute a different command from others by
describing the command in the normal form. This is useful when executing a different function only for the specific
source, or when using a source located in a different directory from the other sources.
The following shows the dependency lists without a suffix definition and with a suffix definition.
Dependency lists without a suffix definition
# dependency list start
### src definition start
SRC1_DIR= .
### src definition end
$(TARGET).elf : $(OBJS) $(TARGET).mak $(TARGET).lds
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(OBJLDS) $(LIBS)
## boot.s
boot.o : $(SRC1_DIR)/boot.s
$(AS) $(ASFLAGS) -o boot.o $(SRC1_DIR)/boot.s
## main.c
main.o : $(SRC1_DIR)/main.c
$(CC) $(CFLAGS) $(SRC1_DIR)/main.c
# dependency list end
Dependency lists with a suffix definition
# suffix & rule definitions
.SUFFIXES : .c .s .o .elf
Suffix definition
.c.o :
$(CC) $(CFLAGS) -o $(SRC_DIR)/$*.o $(SRC_DIR)/$*.c
Suffix rules
.s.o :
$(AS) $(ASFLAGS) -o $(SRC_DIR)/$*.o $(SRC_DIR)/$*.s
# dependency list start
### src definition start
### src definition end
$(TARGET).elf : $(OBJS) $(TARGET).mak $(TARGET).lds
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(OBJLDS) $(LIBS)
## boot.s
Dependency lists
boot.o : $(SRC_DIR)/boot.s
## main.c
main.o : $(SRC_DIR)/main.c
## sub.c
sub.o : $(SRC_DIR)/sub.c
# dependency list end
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...