make
MJN
programming and sharing.
展开
-
makefile demo
1. 最简单的makefile假设编译器是gcc, 代码结构很简单, 源文件有main.c, test.h, test.c, 代码为:/*file:test.h*/#ifndef TEST_H#define TEST_Hvoid func();#endif/*file:test.c*/#include "test.h"void func() { /*some cod原创 2013-05-11 23:09:26 · 1924 阅读 · 0 评论 -
makefile中的循环控制
GNU make的foreach函数foreach函数仅GNU make支持:下面的代码中使用了函数foreach和shellfiles=main.exe a.exe b.exeall: echo $(files_1); \ rm -f $(foreach i, $(shell echo $(files) | sed s/.exe//g), $(i).o)shel原创 2013-10-23 16:35:06 · 17163 阅读 · 0 评论