1
我目前正在尝试使用文件来配置我的生成文件。Makefile的配置文件
这是我做了什么
NAME = test
OBJS = $(SRCS_NAMES:.c=.o)
SRCS_DIR = sources/
function = echo main.c test.c
#function where i parse my file
#i use a makefile function cause i need to pass regex as parameters
all : $(NAME)
parse :
$(eval SRCS_NAMES = $(addprefix $(SRCS_DIR), $(shell $(call function))))
-include parse
%.o : %.c
gcc -c $< -o [email protected]
$(NAME) : $(OBJS)
gcc -o $(NAME) $(OBJS)
我不明白为什么的.o没有建立。
感谢您的时间