I'm trying to make a makefile for compiling all the source files in my project, wich are spread in several directories like this:
libc/
arch/
include/
math/
stdio/
And i want to exclude all the files from the arch and include directories, I can do this in the shell using the command ls !(arch)/*.c But when i try to do the same using
$(wildcard !(arch)/*.c)
it doesn't work. How can i make it work in my makefile? Can i use something like !(arch || include) to exclude both directories?