[Anjuta-list] incorrect placement of object and library (fPIC) files



I'm creating a shared library in which I have two main
directories; the include directory and the src
directory (src came from default Anjuta suggestion).

~/Project/include
~/Project/src

Under the src/ directory, I have several other ones,
e.g.:
~/Project/src/dir1
~/Project/src/dir2
etc..

When I ./configure and make this project, all of the
.o and .lo files are placed in the base
~Project-name/src/ directory, rather than the related
one from which it came from.  Meaning:

file.o should be in ~/Project/src/dir1, not
~/Project/src/

The problem is, when libtool attempts to create a
shared library, the object files aren't where they're
supposed to be, thus is fails.  Another bad point is,
if I similar file names in different directories, the
older .o will get overwritten by a completely
different object file.

Here's the end of the build message output (edited out
a lot of repetitive crap for ease of reading).

gcc -DHAVE_CONFIG_H -I. -I. -I..
-I/home/knewman/Projects/Project/include/ -g
-Wp,-MD,.deps/process_xfer.pp -c
process/process_xfer.c -o process_xfer.o >/dev/null
2>&1
Makefile:252: warning: undefined variable `AM_CFLAGS'
mv -f .libs/process_xfer.lo process_xfer.lo
/bin/sh ../libtool --mode=link gcc -g  -o libetnl.la
-rpath /usr/local/lib  file/common.lo <more .lo files
here> process/process_message.lo
process/process_xfer.lo  
rm -fr .libs/libetnl.la .libs/libetnl.*
.libs/libetnl.*
(cd file && ln -s common.lo common.o)
<more of the cd directory && ln -s file.lo file.o>
(cd process && ln -s messages.lo messages.o)
(cd util/parse && ln -s disk.lo disk.o)
(cd process && ln -s process_msgdir.lo
process_msgdir.o)
gcc: file/common.lo: No such file or directory
gcc: util/fcn_utility.lo: No such file or directory
<more gcc: directory/file.lo: No such file or
directory>
gcc: process/process_msgdir.lo: No such file or
directory
gcc: process/process_message.lo: No such file or
directory
gcc: process/process_xfer.lo: No such file or
directory
make[2]: *** [libetnl.la] Error 1
make[2]: Target `all' not remade because of errors.
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2
make: Target `all' not remade because of errors.
(cd process && ln -s process_message.lo
process_message.o)
(cd process && ln -s process_xfer.lo process_xfer.o)
gcc -shared  file/common.lo util/fcn_utility.lo
util/parse/disk.lo <insert directory/file.lo>
process/process_xfer.lo   -Wl,-soname -Wl,libetnl.so.0
-o .libs/libetnl.so.0.0.0
make[2]: Leaving directory
`/home/knewman/Projects/ETnl-Lib/src'
make[1]: Leaving directory
`/home/knewman/Projects/ETnl-Lib'
Build All completed...............Unsuccessful

Thank you for your help.


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com




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