automake
[Top][All Lists]
Advanced

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

Re: Example on JNI compilation


From: Ralf Wildenhues
Subject: Re: Example on JNI compilation
Date: Mon, 20 Apr 2009 20:26:02 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

* LCID Fire wrote on Mon, Apr 20, 2009 at 07:58:50PM CEST:
> Ralf Wildenhues wrote:
>> * LCID Fire wrote on Sat, Apr 18, 2009 at 11:08:58PM CEST:
>>> I'm currently stuck with compiling a JNI library, which java does not 
>>>  recognize. I'm not too sure about what options I have to provide to  
>>> automake and which are already builtin. Does anybody know an example 
>>> of  how a jni lib is built using automake?
>>
>> How would one go about doing it without automake?

> Like this:
> gcc -c -fPIC myfile.c -o myfile.o
> gcc -shared -lacl -Wl,-soname,mylib.so -o mylib.so myfile.o

I can't see anything JNI'ish or java'ish in the above, so, assuming
mylib.so is destined for $(pkglibdir),

  pkglib_LTLIBRARIES = mylib.la
  mylib_la_SOURCES = myfile.c
  mylib_la_LDFLAGS = -module -avoid-version
  mylib_la_LIBADD = -lacl

or I am still missing something that I haven't understood from your
request.

Cheers,
Ralf




reply via email to

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