I'm no expert on Makefiles, but you're probably looking for the man
pages of a couple of GNU programs.
This line, for example:
$(LD) $(LDFLAGS) -N -e main -Ttext 0 -o $@ $^
Is, if I understand it right, a mixture of bash
and make
syntax:
$(LD)
is replaced by the make
variable LD
, which most likely holds the name of the linker executable (usually ld
).
$(LDFLAGS)
is like the above, with the difference that it holds the flags to pass to the executable named in LD
.
-N -e main -Ttext 0 -o
are just arguments to LD
$@
is replaced by the target
$^
is replaced by a space-separated list of all dependencies
So if you want to know about the -N
option, your best bet is the GNU ld man page:
-N
--omagic
Set the text and data sections to be readable and writable. Also, do not page-align the data segment, and disable linking against shared libraries. If the output format supports Unix style magic numbers, mark the output as "OMAGIC". Note: Although a writable text section is allowed for PE-COFF targets, it does not conform to the format specification published by Microsoft.