[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can automake just build .o objects, without linking them?
From: |
Ralf Wildenhues |
Subject: |
Re: Can automake just build .o objects, without linking them? |
Date: |
Tue, 6 Mar 2007 19:39:37 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Rodrigo,
* Rodrigo Meza wrote on Tue, Mar 06, 2007 at 05:50:29PM CET:
>
> 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.
Do it like this:
# You can also put the option in the argument to AM_INIT_AUTOMAKE
# in configure.ac.
AUTOMAKE_OPTIONS = subdir-objects
noinst_LIBRARIES = liball.a
liball_a_SOURCES = \
dir1/lib1.c \
dir1/lib1.h \
dir2/lib2.c \
dir2/lib2.h \
dir3/lib3.c \
dir3/lib3.h
Hope that helps.
Cheers,
Ralf