From: Maynard J. <may...@us...> - 2007-07-26 00:33:29
|
Jens Wilke wrote: [snip] > Index: oprofile-0.9.2-jit/libopagent/Makefile.am > =================================================================== > --- /dev/null > +++ oprofile-0.9.2-jit/libopagent/Makefile.am > @@ -0,0 +1,33 @@ > +AM_CPPFLAGS = -I ${top_srcdir}/libop -I ${top_srcdir}/libutil > + > +pkglib_PROGRAMS = libopagent.so > + > +noinst_PROGRAMS = bfddefines > The link step for bfddefines failed for me -- actually, I had 2 link problems. The first (as mention below) was due to the lack of '-liberty'. The second was because the object file, bfddefines.o, was placed on the command line _after_ the '-l<libname>' options, which cannot work. > + > +# install libopagent.h to include directory > +include_HEADERS = libopagent.h > libopagent.h gets installed via 'make install'. I don't think we want or need this to be installed. > + > +libopagent_so_SOURCES = libopagent.c > The end result is that a shared lib, libopagent.so, is built and _installed_. The existing jvmti agent links to this shared library, so unless we change libopagent to be static, the libopagent.so must be installed. Seems to me this just isn't necessary. Are there some drawbacks to making it static and not installing that I'm not seeing? > + > +nodist_libopagent_so_SOURCES = bfdheader.h jitheader.h > + > +libopagent_so_CFLAGS = -fPIC > + > +libopagent_so_LDFLAGS = -shared -o libopagent.so \ > + -Wl,-soname=libopagent.so > + > +# the bfdheader.h is generated by bfddefines at compile time > +# to extract the machine and architecture ids we need > +# to write out a bfd file for this arch. > +# automake does not support modelling such dependency, but > +# has the variable BUILT_SOURCE for all sources that need to > +# be made before the actual compile > +# see automake info page section 8.4.1 > +BUILT_SOURCES = bfdheader.h > + > +CLEANFILES = bfdheader.h > + > +bfddefines_LDFLAGS = -lbfd > I had to add '-liberty' here since libbfd depends on it. -Maynard > + > +bfdheader.h: bfddefines > + ./bfddefines bfddefines > $@ > [snip] |