2 ms·
Make's default implicit rule set is very useful for C, C++, Fortran, Pascal, and basically nothing else. Out of curiousity: how do you configure the implicit r
by nneonneo 10y ago
Make's default implicit rule set is very useful for C, C++, Fortran, Pascal, and basically nothing else.
Out of curiousity: how do you configure the implicit ruleset? I wasn't able to find documentation on that (the closest I found was https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_10.html#SEC95 https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter..., which explicitly documents the Make implicit rules but says nothing about changing/augmenting them).
- orodley 10y agoMany implicit rules make use of variables, which you can change as you see fit. For example, creating an object file from a C file will do something like "$(CC) $(CFLAGS) $< -o $@". You can change CC to change the compiler used, and add stuff to CFLAGS to add compiler options, all without touching the rule itself. Other than that there's not much configuration, but the predefined rules are usually quite simple, so it's pretty easy to just write your own implicit rules if the predefined ones don't suit your needs.