Buildingalibraryismuchlikebuildingaprogram.Inthiscase,thenameoftheprimaryisLIBRARIES.Librariescanbeinstalledinlibdirorpkglibdir.
Each_LIBRARIESvariableisalistofthelibrariestobebuilt.Forinstance,tocreatealibrarynamedlibcpio.a,butnotinstallit,youwouldwrite:
Extraobjectscanbeaddedtoalibraryusingthelibrary_LIBADDvariable.Thisshouldbeusedforobjectsdeterminedbyconfigure.Againfromcpio:
Becarefulwhenselectinglibrarycomponentsconditionally.Becausebuildinganemptylibraryisnotportable,youshouldensurethatanylibraryalwayscontainsatleastoneobject.
Touseastaticlibrarywhenbuildingaprogram,addittoLDADDforthisprogram.Inthefollowingexample,theprogramcpioisstaticallylinkedwiththelibrarylibcpio.a.
THE END