Path: utzoo!attcan!uunet!jarthur!usc!ucsd!ucbvax!ucdavis!caldwr!rfinch From: rfinch@caldwr.UUCP (Ralph Finch) Newsgroups: comp.unix.questions Subject: Question about basic library usage / makefiles Keywords: ar ranlib library makefile Message-ID: <706@caldwr.UUCP> Date: 17 Feb 90 02:38:22 GMT Distribution: na Organization: California Department of Water Resources Lines: 31 Setup: SunOS. 2 directories with many Fortran subroutines (131 and 109), which end up being 0.6 and 1.2 MB worth of object files, respectively. These are then used to link with a main program. Problem: Compiling each subroutine is quick, since most aren't too long. But putting them in their respective libraries takes a long time, since the libs are large. ranlib takes a long time on each one. But I have to use some sort of library because otherwise I get plenty of unresolved references upon linking, since if I link with straight object files they aren't in proper order. Question: What method should I be using to use libraries but with fast updates? I tried using multiple libraries in each subdirectory, which did speed up the ar and ranlib processes, but that was no good upon linking (they were out of order again). Currently in the makefile I am compiling each source, then at the end I use Sun's .DONE (don't know if this is in other makes) to create a new library from all objects each time. I found that updating the library after each compile takes way too long. I think I'm missing some basic technique; could somebody clue me in? Thanks! -- Ralph Finch The opinions expressed herein are mine... rfinch@water.ca.gov ...ucbvax!ucdavis!caldwr!rfinch 916-445-0088