Does file extension case matter on assembly source files with .asm extensions?
My goal is to have a rule that file.asm should be built exactly the same as file.ASM (or similar variations e.g. file.[aA][sS][mM]). I would like to avoid stepping on a convention that I'm unaware of.
Case-sensitive File Extension Convention Examples:
A开发者_如何学编程ssembly
Files with .S and .s extensions are treated differently under GNU Assembler (.S goes through a preprocessor; .s does not).C/C++
.C is sometimes (depending on compiler?) compiled as a C++ file and .c is compiled as C.gcc
has the -x
flag to solve this problem for you. Specify the language explicitly, and presto - no more problems. Other compilers may or may not have similar capabilities, but reading the documentation in the only way to find out.
At least on Windows, assemblers such as MASM or TASM don't care about the case of the file extension, i.e. .asm = .ASM as far as I am aware.
精彩评论