summaryrefslogtreecommitdiff
path: root/how_to_build_software_with_make.html
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-03-27 22:46:06 +0200
committerAki <please@ignore.pl>2023-03-27 22:46:06 +0200
commitb24bd11098423139b17ca7dc29d5a2988556d724 (patch)
tree0d63cf58a0a65a05dcd6f3006e8ec3dcbcd06c6c /how_to_build_software_with_make.html
parentb9a7cf29707f39661e15ee0800ac158b99dc24ee (diff)
downloadignore.pl-b24bd11098423139b17ca7dc29d5a2988556d724.zip
ignore.pl-b24bd11098423139b17ca7dc29d5a2988556d724.tar.gz
ignore.pl-b24bd11098423139b17ca7dc29d5a2988556d724.tar.bz2
Minor fixes and changed wording in make post
Diffstat (limited to 'how_to_build_software_with_make.html')
-rw-r--r--how_to_build_software_with_make.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/how_to_build_software_with_make.html b/how_to_build_software_with_make.html
index dce05aa..b5dd992 100644
--- a/how_to_build_software_with_make.html
+++ b/how_to_build_software_with_make.html
@@ -38,7 +38,7 @@ targets or source files. That's it. Later this concept is expanded upon to reduc
<p>Since <b>make</b> live close to the compiler we will be also interested in object files (e.g., *.o, *.obj).
<h2>How to Build Executables With Make</h2>
-<p><b>Make<b> helps us to reduce number of characters we need to type in terminal and lines we need to put to setup the
+<p><b>Make</b> helps us to reduce number of characters we need to type in terminal and lines we need to put to setup the
build. In fact, the simplest case of one source file to one executable, like the one I showed above, does not need any
preparation at all:
<pre>
@@ -163,14 +163,14 @@ libgreeting.so: greeting.o
code</a>, which is needed when compiling code for shared libraries that are expected to work nicely on Linux. Then, we
set <i>LDFLAGS</i> - linker flags - to <code>-shared</code> which (put simply) tells the linker to build a shared
object.
-<p>Now let's analyse linker command itself. Starting with <code>$(LD)</code> which is substituted with linker
-executable. We already know <code>$(LDFLAGS)</code>, so <code>$(LDLIBS)</code> sounds like "linker libraries" and that's
-correct. Finally, we have two
+<p>Now let's analyse linker command itself. Starting with <code>$(LD)</code>; it's substituted with the linker
+executable. We already know <code>$(LDFLAGS)</code> and <code>$(LDLIBS)</code> sounds quite similar. This one is
+intended to store all external libraries that linker should use. Finally, we have two
<a href="https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html">automatic variables</a> also known
as <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html#tag_20_76_13_08">internal
-macros</a>: <code>$^</code> (substituted by all dependencies) and <code>$@</code> (substituted by target name). Note
+macros</a>: <code>$^</code> (substituted with all dependencies) and <code>$@</code> (substituted with target name). Note
that <code>$^</code> is not part of POSIX.
-<p>When we finally run <b>make</b> we will see how it performs all predicted substitutions:
+<p>When we finally run <b>make</b> we can observe predicted commands:
<pre>
$ make
cc -fPIC -c -o greeting.o greeting.c