help-gnu-utils
[Top][All Lists]
Advanced

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

Can automake just build .o objects, without linking them?


From: Rodrigo Meza
Subject: Can automake just build .o objects, without linking them?
Date: 6 Mar 2007 08:50:29 -0800
User-agent: G2/1.0

Hello everybody:

  I have a problem with automake. I have a hierarchy of files like
this:

lib/liball.a
lib/dir1/lib1.o
lib/dir1/lib1.c
lib/dir1/lib1.h
lib/dir2/lib2.o
lib/dir2/lib2.c
lib/dir2/lib2.h
lib/dir3/lib3.o
lib/dir3/lib3.c
lib/dir3/lib3.h

and I would like to compile all the object files in their own
directory to afterwards build the .a file with them.
The problem is that AFAIK automake does not allow to build only the .o
files, but it always try to link them. In my current Makefile.am files
in dir1, dir2,dir3, I am building now a library file (lib1.a, lib2.a
and lib3.a) using something like:

noinst_LIBRARIES= lib1.a
lib1_a_SOURCES= lib1.c lib1.h

and in the root, I have a Makefile.am with:

noinst_LIBRARIES = liball.a
libmy_a_LIBADD = lib1/lib1.o lib2/lib2.o lib3/lib3.o
libmy_a_SOURCES=
SUBDIRS = lib1 lib2 lib3

All of this works just fine, but I would like to know if there is a
'standard' way to generate de .o files without having to create the
unuseful lib1.a, lib2.a and lib3.a files.

Thanks for any hints!

Rodrigo.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]