Epson S5U1C17001C Manual page 639

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

11 OTHEr TOOlS
format of a suffix definition
Specifying extensions
.SUFFIXES : .xxx
Format:
Example: .SUFFIXES : .c .s .o .elf
Specify all the extensions related to the dependency lists to which the suffix rules are applied.
Definition of suffix rules
The following shows the format of a suffix rule:
Format:
.<extension of dependent file 1>.<extension of target file>:
TAB
TAB
[
Example: .c.o :
$(CC) $(CFLAGS) -o $(SRC_DIR)/$*.o $(SRC_DIR)/$*.c
• $* is a macro that will be replaced with the target file name (not including the extension) described in the
dependency list.
• The command lines must begin with a TAB (space is not allowed).
The suffix rule in the example above corresponds to the dependency lists in the format below in which the
target file type is ".o" and the type of the first dependent file is ".c".
<file1>.o: <file1>.c [<other files>]
The command in this suffix rule will be executed in the dependency list for which the command line is omitted.
Example: Dependency list
## main.c
main.o : $(SRC_DIR)/main.c
## sub.c
sub.o : $(SRC_DIR)/sub.c
The suffix rule (.c.o) in the example above is applied to these two dependency lists as follows:
## main.c
main.o : $(SRC_DIR)/main.c
$(CC) $(CFLAGS) -o $(SRC_DIR)/main.o $(SRC_DIR)/main.c
## sub.c
sub.o : $(SRC_DIR)/sub.c
$(CC) $(CFLAGS) -o $(SRC_DIR)/sub.o $(SRC_DIR)/sub.c
The time stamp of the dependent file is checked even when the suffix rule is applied and the command is not
executed if the target file is newer than the dependent file.
Precautions on use of suffix definition
When using a suffix definition, the target file name and the first dependent file name must be the same except
for their extensions (also the file name is case sensitive).
Bad example: main.o : main1.c
In this case, the suffix rule is not applied. The make ignores such dependency lists and executes nothing for
them.
11-12
.yyy
.zzz ......
<command 1>
<command 2>
:
]
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
S5U1C17001C ManUal

Advertisement

Table of Contents
loading

Table of Contents