I'am trying to create a Makefile that has a target in src folder, but my target .c file is generated by script.
I am trying to use wildcard or %.c to get all generated .c file, but it always return empty string.
$(CC) -c $(wildcard src/*.c)
Why do you use the
Delay the evaluation by using the wildcard in the shell.
obj: GEN_C $(CC) -c src/*.c GEN_C: generate_c.sh