From 4e6794bd437fb4b40d358e670ff83f30cb39a0b6 Mon Sep 17 00:00:00 2001 From: Cristian-Vasile Achim <66278390+csccva@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:44:31 +0300 Subject: [PATCH] Update 01_modules_make_batch_jobs.md --- .../docs/01_modules_make_batch_jobs.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/computer-platforms/docs/01_modules_make_batch_jobs.md b/computer-platforms/docs/01_modules_make_batch_jobs.md index fc46d1b2d..f52f94550 100644 --- a/computer-platforms/docs/01_modules_make_batch_jobs.md +++ b/computer-platforms/docs/01_modules_make_batch_jobs.md @@ -104,6 +104,27 @@ ssh-copy-id @mahti.csc.fi ![](images/building.svg){.center} +# Compiling and linking + +Single file source code: +```bash +cc main.c -o main +``` + +
+ In practice programs be separated into several files +
$\Rightarrow$ complicated dependency structures +- Building large programs takes time + - could we just rebuild the parts that changed? +- Having different options when building + - debug versions, enabling/disabling features, etc. +
+ +
+_A make rule_ +![](images/depend.png){.center width=40%} +
+ # Compiling and linking: possible problems - Programs should usually be separated into several files