Exercise: Build Software Package (Native)¶
Download the tar file (
Software.tar.xz
)Unpack it with the following command:
$ tar -J -x -f Software.tar.xz
You’ll see a directory,
Software/
, a follows$ tree Software/ Software/ ├── greet.c ├── greet.h ├── greet-parameterized.c └── greet-simple.c
Write a
Makefile
that builds the software in a way thatAll
*.c
files are compiled into corresponding*.o
files ⟶ no linking step!greet.o
goes into a library,libgreet.a
(it does not contain amain()
function)A program
greet-parameterized
is built by linkinggreet-parameterized.o
(containingmain()
) againstlibgreet.a
.Likewise,
greet-simple
is built by linkinggreet-simple.o
against the library.
Test the outcome by running the two programs.