Make:ExtensionRule
lastmod 2018-08-17created 2018-06-182 edits
Make 확장 규칙에 대한 설명.
About
입력 파일의 확장자를 보고, 그에 따라 적절한 연산을 수행시키는 규칙이다. Makefile에게 주의 깊게 처리할 파일들의 확장자를 등록할 경우 .SUFFIXES를 사용하면 된다.
확장자 규칙 및 관련 매크로
.SUFFIXES와 관련된 확장자 및 관련 매크로를 정리한다.
| Compiler | Source | Object | Macro | Value | Flag macro |
| C compiler | *.c | *.o | $(CC) | cc | $(CFLAGS) |
| C Preprocessor | $(CPP) | $(CC) -E | $(CPPFLAGS) | ||
| C++ 컴파일 | *.cc | *.o | $(CXX) | g++ | $(CXXFLAGS) |
| Pascal compiler | *.p | *.o | $(PC) | pc | $(PFLAGS) |
| Fortran compiler | *.f | *.o | $(FC) | f77 | $(FFLAGS) |
| Modula-2 compiler | *.def | *.sym | |||
| Assembly compiler | *.s | *.o | $(AS) | as | $(ASFLAGS) |
| Assembly preprocessor | *.S | *.s | |||
| Single object file link | *.o | * | |||
| YACC processor | *.y | *.o | $(YACC) | yacc | $(YFLAGS) |
| Lex compiler | *.l | *.o | $(LEX) | lex | $(LFLAGS) |
| Lint library generator | *.c | *.ln | |||
| TEX processor | *.tex | *.dvi | $(TEX) | tex | |
| Texinfo file processor | *.texi | *.dvi | $(TEXI2DVI) | texi2dvi | |
| Extracting file from RCS | RCS/*.v | * | $(CO) | co | $(COFLAGS) |
| SCCS file processor | SCCS/*.n | * | $(GET) | get | |
| Archive maintaining program | $(AR) | ar | $(ARFLAGS) | ||
| Web file processor | $(WEAVE) | weave | |||
| Remove file | $(RM) | rm -f | |||
| Makefile | $(MAKE_COMMAND) | make |