Re: directory with object files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Dienstag, 30. Oktober 2007 16:29:20 schrieb Peter Skvarka:
> My application needs to be linked with static libraries placed in some
> other directories than directory with application sources.
> When I set in makefile full path for needed static libraries, all is ok and
> it can be build.
> But I have several static libraries placed in several different
> directories, and I dont want to copy them into application directory either
> to use full pathes in makefile.
> Does exist some makefile variable which defines directoy for linked object
> files - needed static libraries ?

As far as I know if you have a static library archive named

libLibrary.a

In a path

/my/lib/dir/

You should get a go with

gcc -L/my/lib/dir -lLibrary $(OBJECT_FILES) -o Result

There is no way to collect object files this way, but there are methods for 
Make to collect all object files in a given directory:

OBJECTS_FILES:= $(wildcard PATH/*.o)

You can even do $(wildcard P/*/*.o) to find

P/a/abc.o P/a/cde.o P/b/abc.o P/c/xyz.o

where P/a, P/b and P/c are some object directories in a parent directory P.

I think that should be enough to get you through.

>
> Peter



-- 

Mit freundlichen Grüßen / kind regards

I n g o   K r a b b e
System Administrator / system administrator
_________________________________________________________________________
Elements of Art GmbH         http://www.eoa.de
An der Eickesmuehle 22       41238 D-Moenchengladbach / Germany
fon: +49 (2166) 91567-3418   Registergericht: Moenchengladbach HRB 5855
fax: +49 (2166) 91567-99     Geschaeftsfuehrer: Erik Winterberg,
                                                Sebastian Leppert


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux