Makefile: no rule to make target

前端 未结 3 1607
一个人的身影
一个人的身影 2021-01-15 18:28

I was looking for a solution on this site and also tried google for some time now, but somehow I can\'t get it to work.

My source should be in the src directory and

3条回答
  •  攒了一身酷
    2021-01-15 18:50

    Don't repeat the directory names in the compiler line. $< and $@ already have the directory names.

    $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
        $(CC) -S $< -o $@
        $(CC) -c $< -o $@
    

提交回复
热议问题