Can a path or directory assigned to APP_SRC in oil file

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
aladdin7938
Newbie
Posts: 6
Joined: Mon Sep 26, 2016 5:50 am

Can a path or directory assigned to APP_SRC in oil file

Post by aladdin7938 » Sun Jan 22, 2017 9:29 pm

Guys, Do I have to list out every single .c source file i would like to compile
by typing APP_SRC = "???.c" once in oil file? There are a lot of source files for my case. It is really tedious to type APP_SRC = "*???.c" for every file. Is there better way to specify a directory or path including all *.c files needed?

Thanks a lot!
Attachments
2017_01_22_14_25_17_Atmel_AVR5_ErikaWiki.jpg
2017_01_22_14_25_17_Atmel_AVR5_ErikaWiki.jpg (28.09 KiB) Viewed 1562 times

paolo.gai
Administrator
Posts: 864
Joined: Thu Dec 07, 2006 12:11 pm

Re: Can a path or directory assigned to APP_SRC in oil file

Post by paolo.gai » Mon Jan 23, 2017 8:59 am

Hi!

you have to list the files. you can put relative paths as well. It has never been a big issue in the past, as the companies using it in products always asked an integration in their custom build systems.

Note that with ERIKA3 the build system will be different, but for now we have to live with this one.

Ciao,

PJ

e.guidieri
Full Member
Posts: 166
Joined: Tue May 10, 2011 2:05 pm

Re: Can a path or directory assigned to APP_SRC in oil file

Post by e.guidieri » Mon Jan 23, 2017 9:02 am

Hi,

since the entry of APP_SRC is copied verbatim in a makefile variable APP_SRC, actually you can use any make function to valorize it, like $(wildcard *.c).

Just remeber two things

1) All resulting path should be relative path to the folder containing OIL file.
2) OIL file should be located in the top-most folder for source code.

This means: you should use relative path, without "..".

Errico Guidieri

aladdin7938
Newbie
Posts: 6
Joined: Mon Sep 26, 2016 5:50 am

Re: Can a path or directory assigned to APP_SRC in oil file

Post by aladdin7938 » Mon Jan 23, 2017 4:07 pm

Thanks Errico and PJ !

Post Reply