This is for compiling the library separably. Note that the example’s makefile already does this and it isn’t required to build the example with the included makefile.
gcc -Wall -Wextra -Werror -pedantic -c lib-ppf.c -o build/lib-ppf.o
ar rcs build/libppf.a build/lib-ppf.o
(Static) (libppf.a
)
gcc -shared -o build/libppf.so build/lib-ppf.o
(Shared) (libppf.so
)
In the source directory, you may execute any of the following:
make deps-apt
- installs the build dependencies required to compile the program.
make
- creates an executable for x86_64 Linux.
make clean
- deletes only the generated executable file created by only executing make
.
make clean-build
- deletes the generated build directory in it’s entirety.
make all
- generate all of the following:
All output is found in the build directory created in the source directory.