Saturday, August 22, 2009

Makefile template (2)

這是另一種Makefile,到每一個子目錄再執行make

1 # Copyright (C) 2009 Lung.S.Wu
2 #
3 # From: http://zbarbar.blogspot.com/
4
5 DIR=dir1 dir2
6
7 all:
8 $(foreach s, $(DIR), make -C $(s);)
9
10 clean:
11 $(foreach s, $(DIR), make -C $(s) clean;)
12

No comments:

Post a Comment