I want to write a make file to compile my source code. I have to put in my make file the includes paths but i have a lot of folders with source codes. In make file i have a list with all .c files like this :
__MDA_SRC = \
$(__VIEWPATH)\f_03\test\mda\src\mda.c
now i need to find out the path of this file.
I tried this one :
__PATHS_FEATURE = \
$(dir $(__MDA_SRC ))
__INCLUDE_PATHES := \
-I$(__PATHS_FEATURE)
but i have an error F100: cannot open ...bla bla..
i supposed that the problem is on the path, because the path is extructed with the last backslash like:
..\..\..\..\..\f_03\test\mda\src\
How could i have the path without the last backslash like this :
..\..\..\..\..\f_02\hydraulic\btc\src
That seems unlikely to be the problem to me but you can remove it with
$(__PATHS_FEATURE:\=)
or
$(patsubst %\,%,$(__PATHS_FEATURE))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With