From: Alexandre Oliva (oliva@dcc.unicamp.br)
Date: Sat Jan 09 1999 - 17:20:03 EST
On Jan 9, 1999, Godmar Back <gback@cs.utah.edu> wrote:
> If I want to share "internal.c" between, say "unix-jthreads" and
> "oskit-pthreads", but not between "unix-internals" and "unix-jthreads",
> what is the portable and legal way to do so if VPATH and ../ are out
> of the question?
There are several ways:
1) create an internal.c in one of the directories that #includes the
other.
2) create a rule like the ones I created for gc-mem.c in
kaffevm/Makefile.am, so that such an #include forwarded is created at
build time only, or just copy it
3) if the file will be compiled in the other directory too, just
_LIBADD or _LDADD it in whatever library or program you want it to be
part of.
4) create a _LIBRARY or a noinst_LTLIBRARY in the other directory,
containing the file you want to share, and _LIBADD or _LDADD the
library in the library or file you want it to belong
5) write a custom make rule in the Makefile.am to build the object
file in the current directory, and _LIBADD or _LDADD it.
6) insert your own solution here :-)
Gotta go home now; more tomorrow.
Cheers, and good luck!
-- Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org} oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org} Universidade Estadual de Campinas, SP, Brasil
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:34 EDT