Makefile pattern rule fails?

后端 未结 5 1026
春和景丽
春和景丽 2021-01-04 08:18

While using GNU-make, my Makefile has some pattern rule as:

%.o:%.c
    gcc $< -o:$@

This rule is added by me.

But when I do mak

5条回答
  •  一整个雨季
    2021-01-04 08:47

    You might need spaces around the : in the first line of your rule. Also, gcc does not take a colon before the output file name; just use -o $@.

提交回复
热议问题