catgatp

makefile 编译指定目录

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

 

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-11-13
  • 2022-01-27
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案