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
Содержание S5U1C17001C
Страница 6: ......
Страница 17: ...1 General S5U1C17001C Manual 1 General ...
Страница 18: ......
Страница 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Страница 22: ......
Страница 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Страница 30: ......
Страница 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Страница 104: ......
Страница 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Страница 122: ......
Страница 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Страница 366: ......
Страница 385: ...7 Library S5U1C17001C Manual 7 library ...
Страница 386: ......
Страница 404: ...7 18 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 7 liBrary THIS PAGE IS BLANK ...
Страница 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Страница 406: ......
Страница 438: ...8 32 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 8 aSSEMBlEr THIS PAGE IS BLANK ...
Страница 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Страница 440: ......
Страница 448: ...9 8 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 9 linkEr THIS PAGE IS BLANK ...
Страница 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Страница 450: ......
Страница 625: ...10 174 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 10 DEBUggEr THIS PAGE IS BLANK ...
Страница 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Страница 627: ......
Страница 695: ...11 68 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 11 OTHEr TOOlS THIS PAGE IS BLANK ...
Страница 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...