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

Re: Static link question



Mine goes something like this:

(note -all-static --strip-all and the exec-hook)



STARTSTUBS =
/usr/local/touchtunes/jukebox-cross-environment/stubs/crt1.o
/usr/local/touchtunes/jukebox-cross-environment/stubs/crti.o
/usr/local/touchtunes/jukebox-cross-environment/gcc-lib/2.95.3/crtbegin.o
ENDSTUBS =
/usr/local/touchtunes/jukebox-cross-environment/gcc-lib/2.95.3/crtend.o
/usr/local/touchtunes/jukebox-cross-environment/stubs/crtn.o



LD_LIBRARY_PATH		=
.:/usr/local/touchtunes/jukebox-cross-environment/lib: \
		/usr/local/touchtunes/jukebox-cross-environment/usr/lib: \
		/usr/local/touchtunes/jukebox-cross-environment/usr/local/lib :\
		$(top_builddir)/distrib/usr/local/touchtunes/lib

INCLUDES = \
	-I/usr/local/touchtunes/jukebox-cross-environment/usr/include \
	-I/usr/local/touchtunes/jukebox-cross-environment/usr/include/g++-3 \
	-idirafter
/usr/local/touchtunes/jukebox-cross-environment/usr/include/rpm



juced_LDADD	= -lglib-1.3 -lrpm -lrpmdb -lrpmio -lz -lbz2 -lpopt -lc
-lgcc $(ENDSTUBS)
juced_LDFLAGS	= -T$(top_builddir)/../../linkerscript -nostdlib \
	$(STARTSTUBS) -all-static --strip-all \
	`/usr/local/touchtunes/jukebox-cross-environment/usr/bin/pkg-config
--libs glib-2.0`

install-exec-hook:
	objcopy --strip-all $(bindir)/juced




Hope this helps,
		-Tristan

"Adam H. Pendleton" wrote:
> 
> This question isn't directly related to the RPM libraries, but more
> about development with them.  I hope someone on this list answer it.  :)
> 
> I want to be able to distribute an executable to systems without the
> rpm development libraries, thus I need to link statically against the
> rpm libraries (right?).  My problem is I can't seem to get this to work
> right.  I am using automake, autoconf, and libtool with this
> application, which is *supposed* to make this sort of thing easier.  In
> my Makefile.am I have:
> 
> program_LDADD = /usr/lib/librpm.la
> 
> I'm sure I'm just dense but I can't seem to link statically against the
> rpm libs using the .la extension.  Setting CFLAGS to "-static" doesn't
> work, nor does "--disable-shared" to configure.  What do I need to do?
> 
> ahp
> 
>   ------------------------------------------------------------------------
>               Name: PGP.sig
>    PGP.sig    Type: application/pgp-signature
>           Encoding: 7bit





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