Re: [riot-devel] Add static library to Makefile

2016-04-03 Thread Oleg Hahm
Baptiste,

On Sat, Apr 02, 2016 at 05:25:46PM +0200, Baptiste Clenet wrote:
> Weird, Oleg, did you try to use the library? Could you include .h file
> which are inside .a library and use some functions. It was able to
> find the library .a but couldn't link with function inside the library

the libexample.a just contains one .o file with one function (`int my_add(int
a, int b);`, see
https://github.com/OlegHahm/miniature-dangerzone/blob/master/static_linked/main.c#L3).
This function gets linked and successfully called if you build the
application.

Cheers,
Oleg
-- 
panic("Yeee, unsupported cache architecture.");
linux-2.6.6/arch/mips/mm/cache.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Add static library to Makefile

2016-04-02 Thread Baptiste Clenet
Weird, Oleg, did you try to use the library? Could you include .h file
which are inside .a library and use some functions. It was able to
find the library .a but couldn't link with function inside the library

2016-03-30 15:53 GMT+02:00 Oleg Hahm :
> Hi Baptiste!
>
> On Wed, Mar 30, 2016 at 09:26:01AM +0200, Baptiste Clenet wrote:
>> I tried to use
>> APPDEPS +=  libexample.a
>> Does not work
>
> Strange, for me it works like charm:
> https://github.com/OlegHahm/miniature-dangerzone/tree/master/static_linked
>
> Cheers,
> Oleg
> --
> /* When we have more time, we can teach the penguin to say
>  * "By your command" or "Activating turbo boost, Michael".
>  */
> linux-2.2.16/arch/sparc/prom/sun4prom.c
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Add static library to Makefile

2016-03-30 Thread Oleg Hahm
Hi Baptiste!

On Wed, Mar 30, 2016 at 09:26:01AM +0200, Baptiste Clenet wrote:
> I tried to use
> APPDEPS +=  libexample.a
> Does not work

Strange, for me it works like charm:
https://github.com/OlegHahm/miniature-dangerzone/tree/master/static_linked

Cheers,
Oleg
-- 
/* When we have more time, we can teach the penguin to say 
 * "By your command" or "Activating turbo boost, Michael".
 */
linux-2.2.16/arch/sparc/prom/sun4prom.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Add static library to Makefile

2016-03-30 Thread Baptiste Clenet
BASELIBS +=  libexample.a makes it work!

2016-03-30 12:04 GMT+02:00 Oleg Hahm :
> Hi Kaspar!
>
> On Wed, Mar 30, 2016 at 10:51:03AM +0200, Kaspar Schleiser wrote:
>> On 03/30/2016 09:26 AM, Baptiste Clenet wrote:
>> > I tried to use
>> > APPDEPS +=  libexample.a
>> > Does not work
>>
>> Try copying it into the bin/$BOARD folder, then add
>> "USEMODULE += libexample" to your makefile.
>
> That sounds more like a workaround since you would have to copy it again after
> every `make clean`. IMO APPDEPS should fit. Will investigate, why it doesn't
> work.
>
> Cheers,
> Oleg
> --
> printk (KERN_DEBUG "Somebody wants the port\n");
> linux-2.6.6/drivers/parport/parport_pc.c
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Add static library to Makefile

2016-03-30 Thread Oleg Hahm
Hi Kaspar!

On Wed, Mar 30, 2016 at 10:51:03AM +0200, Kaspar Schleiser wrote:
> On 03/30/2016 09:26 AM, Baptiste Clenet wrote:
> > I tried to use
> > APPDEPS +=  libexample.a
> > Does not work
> 
> Try copying it into the bin/$BOARD folder, then add
> "USEMODULE += libexample" to your makefile.

That sounds more like a workaround since you would have to copy it again after
every `make clean`. IMO APPDEPS should fit. Will investigate, why it doesn't
work.

Cheers,
Oleg
-- 
printk (KERN_DEBUG "Somebody wants the port\n");
linux-2.6.6/drivers/parport/parport_pc.c


signature.asc
Description: PGP signature
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Add static library to Makefile

2016-03-30 Thread Kaspar Schleiser
Hey,

On 03/30/2016 09:26 AM, Baptiste Clenet wrote:
> I tried to use
> APPDEPS +=  libexample.a
> Does not work

Try copying it into the bin/$BOARD folder, then add
"USEMODULE += libexample" to your makefile.

Kaspar
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Add static library to Makefile

2016-03-30 Thread Baptiste Clenet
I tried to use
APPDEPS +=  libexample.a
Does not work

2016-03-30 9:23 GMT+02:00 Baptiste Clenet :
> Hi,
>
> I would like to link libexample.a in my RIOT example, what should I
> add in the Makefile?
>
> Thanks,
>
> --
> Baptiste



-- 
Baptiste
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel