The MPLAB® XC8 Compiler uses the LPP libraries for library routines written in C.
Do not mix the source code used to build a library. The .lpp libraries must be built from C source only; .lib libraries must be built from assembly source only. The .lpp libraries are passed to the code generator application; .lib libraries are passed to the linker application.
Using the compiler driver, libraries can be built by listing all of the files that are to be included into the library on the command line. None of these files should contain a main() function, nor settings for Configuration bits or any other such data. Use the --OUTPUT=lpp option to indicate that a library file is required.
xc8.exe --chip=16f877a lib_multiply.c lib_add.c --output=lpp
creates a library file called lib_multiply.lpp and lib_add.lpp.