Archive suffix rules are obsolete in GNU make because pattern rules for archives are a more general mechanism (see Implicit rule for archive member targets for more information). But they are retained for compatibility with other make utilities.
To write a suffix rule for archives, you simply write a suffix rule using the target suffix, ‘.a’ (the usual suffix for archive files).
For example, the following
is the old-fashioned suffix rule to update a library archive from C source
files:
This works just as if you
had written the following pattern rule.
In fact, this is just what make does when it sees a suffix rule with ‘.a’ as the target suffix. Any double-suffix rule ‘.x.a’ is converted to a pattern rule with the target pattern, ‘(%.o)’ and a dependency pattern of ‘%.x’. Since you might want to use ‘.a’ as the suffix for some other kind of file, make also converts archive suffix rules to pattern rules in the normal way (see Old-fashioned suffix rules ). Thus a double-suffix rule, ‘.x.a’, produces two pattern rules: ‘(%.o): %.x’ and ‘%.a: %.x’.