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-ps-cd-id.c -o build/lib-ps-cd-id.o
ar rcs build/libps-cd-id.a build/lib-ps-cd-id.o
(Static) (libps-cd-id.a
)
gcc -shared -o build/libps-cd-id.so build/lib-ps-cd-id.o
(Shared) (libps-cd-id.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.