如何在linux下写makefile

2025-03-12 23:47:17
推荐回答(1个)
回答1:

在命令行新建一个文件,名字叫Makefile:touch Makefile
然后用vi打开Makefile
在里面写:
test:
gcc test.c -o test // 这里自己改文件名字

保存退出
然后执行make命令就行。