Example syntax for creating and using a response file in the makefile:
myproject.dll: $(MANYOBJECTS)
ilink64 $(LINKER_FLAGS) @&&.
$(MANYOBJECTS), myproject.dll, , import64 cw64mt
.
The key ideas are:
- the character immediately following the
&&
is the character to be used as delimiter, other delimiters besides .
are possible
- the text between the two
.
's is expanded and placed in a temporary file
- The closing delimiter must be the first character on its line
- the temporary filename takes the place of the
&&.
....
- Anything after the opening delimiter on the same line is ignored
- The
@
means that ilink64
will treat the contents of the temporary file as a response file, as opposed to treating it as an object file
- Anything after the response file is actually ignored by
ilink64
despite correctly appearing in the command output (don't know why; but this means you have to make the response file contain the entire remainder of the command).
The command generated by this example was:
MAKE Version 5.4 Copyright (c) 1987, 2010 Embarcadero Technologies, Inc.
ilink64 -q -aa -Tpd -x -Gn c0x64 @MAKE0000.@@@
(note: my linker flags may be incorrect, this is just a demonstration of how the response file works).