2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
|
|
|
<title>Command explanations</title>
|
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><userinput>sed: </userinput> The sed command here searches for the
|
2001-03-25 09:46:07 +01:00
|
|
|
string "$(CC) $(CFLAGS) -o" and replaces it by "$(CC) $(CFLAGS)
|
2001-01-24 00:31:17 +00:00
|
|
|
$(LDFLAGS) -o" in the Makefile file. We make that modification so it
|
2001-07-22 20:45:10 +01:00
|
|
|
will be easier to link bzip2 statically.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><userinput>...Makefile | make -f -:</userinput> Makefile
|
2001-01-24 00:31:17 +00:00
|
|
|
is the last parameter of the sed command which indicates the file to
|
2001-03-25 09:46:07 +01:00
|
|
|
search and replace in. Sed normally sends the modified file to stdout
|
|
|
|
(standard output), which will be the console. With the construction we
|
|
|
|
use, sed's output will be piped to the make program. Normally, when make
|
|
|
|
is started, it tries to find a number of files like Makefile. But we have
|
2001-01-24 00:31:17 +00:00
|
|
|
modified the Makefile file so we don't want make to use it. The "-f -"
|
|
|
|
parameter tells make to read it's input from another file, or from stdin
|
|
|
|
(standard input) which the dash (-) implies. This is one way to do it.
|
|
|
|
Another way would be to have sed write the output to a different file
|
2001-07-22 20:45:10 +01:00
|
|
|
and tell make with the -f parameter to read that alternate file.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><userinput>LDFLAGS=-static:</userinput> This is the second way we use to
|
2001-03-18 19:30:50 +00:00
|
|
|
link a package statically. This is also the most common way.
|
2001-05-22 02:11:39 +01:00
|
|
|
The -all-static value is only used with the binutils package and won't
|
2001-07-22 20:45:10 +01:00
|
|
|
be used throughout the rest of this book.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|