Linux Makefile: How to include cpp files in subfolder for (转载)
Linux Makefile: How to include cpp files in subfolder for (转载)# Programming - 葵花宝典
l*o
1 楼
果真是疯狂啊,15人民币一张。大神都是钱堆出来的。
s*w
2 楼
【 以下文字转载自 Linux 讨论区 】 发信人: somehow (修身健体), 信区: Linux 标 题: Linux Makefile: How to include cpp files in subfolder for 发信站: BBS 未名空间站 (Fri May 29 22:50:35 2015, 美东) so my folder contains: 1.cpp 2.cpp 3.cpp also 2 folders: ubuntu, redhat. Each contains ubuntu.cpp, redhat.cpp. If distribution is ubuntu, it should compile 1.cpp, 2.cpp, 3.cpp, ubuntu.cpp i tried it like this, SRCS_CPP =$(filter-out file_i_dont_like.cpp, $(wildcard *.cpp), $(DISTRO)/$( wildcard *.cpp)) the behavior is strange. cmd line is sth like: make -f myMakeFile DISTRO=ubuntu sorry i cannot easily show you the error yet, our project is too messy. But it seems trying to compile sth. doesn't exist. Many thanks for your suggestions !