首页 > 代码库 > makefile 编译指定目录

makefile 编译指定目录

makefile 编译指定目录

 1 sub1=test1 2 sub2=test2 3 SUBDIRS = $(sub1) $(sub2) 4 .PHONY:default all clean $(SUBDIRS) sub1 sub2 5 default:all 6  7 all clean: 8     make $(SUBDIRS) TARGET=$@ 9 $(SUBDIRS):10     make -C $@ $(TARGET)11 sub1 sub2:12     make  $($@) 

 

makefile 编译指定目录