
Makefile
alex_mianmian
这个作者很懒,什么都没留下…
展开
-
Link a static library‘s all sections
Suppose I build a static library "mylib.a" which has many sections. one section is called ".my_test" and I put some structure in it.Suppose My main() function call some functions in the library.However, no functions directly access the structure in se.原创 2020-10-28 21:07:28 · 145 阅读 · 0 评论 -
Remove then add string from variable of Makefile
As we know, use sed command can change string.When we want to use it in Makefile, how to use it?Let's write a Makefile as following:LDFLAGS = -Txxhello.lds -LhelloIOT_LDFLAGS = $(LDFLAGS) | sed 's/-T.*lds/-Talex.lds/g'all: @echo $(LDFLA原创 2020-10-06 13:21:53 · 135 阅读 · 0 评论 -
c files always get rebuild when make -------- .PHONY in Makefile
.PHONY is key word in Makefile, it means a fake target.Firstly let's lista Makefile as following:C_FLAGS =SOURCE = main.c test.cOBJS_C = $(SOURCE:.c=.o)DEP = $(SOURCE:.c=.d)HEADER= header...原创 2019-06-19 22:10:06 · 156 阅读 · 0 评论