If you’re using GNU Make, you can use filter-out
:
SRC_FILES := $(wildcard src/*.cpp)
SRC_FILES := $(filter-out src/bar.cpp, $(SRC_FILES))
Or as one line:
SRC_FILES = $(filter-out src/bar.cpp, $(wildcard src/*.cpp))
More Related Contents:
- how to write makefile when two header files include eachother in c++? [duplicate]
- Using G++ to compile multiple .cpp and .h files
- Makefiles, how can I use them? [closed]
- How to make a SIMPLE C++ Makefile
- Cmake cannot find library using “link_directories”
- How to read a CMake Variable in C++ source code
- templates: parent class member variables not visible in inherited class
- Can I compile all .cpp files in src/ to .o’s in obj/, then link to binary in ./?
- Why does the library linker flag sometimes have to go at the end using GCC?
- Building multiple binaries within one Eclipse project
- CMake output/build directory
- Compiling with g++ using multiple cores
- How to define several include path in Makefile
- Makefile: How to correctly include header file and its directory?
- OpenCV GTK+2.x error – “Unspecified error (The function is not implemented…)”
- Problem with compiling RInside examples under Windows
- does cout before return statement of recursive function stops it?
- Why does reading a record struct fields from std::istream fail, and how can I fix it?
- Concise explanation of reference collapsing rules requested: (1) A& & -> A& , (2) A& && -> A& , (3) A&& & -> A& , and (4) A&& && -> A&&
- Right way to split an std::string into a vector
- C++ implicit conversions
- What exactly is a ‘side-effect’ in C++?
- Vector of std::function with different signatures
- what happens when i mix signed and unsigned types ?
- Is it smart to replace boost::thread and boost::mutex with c++11 equivalents?
- How to set up unit testing for Visual Studio C++
- Void Pointer Arithmetic
- C++ Serialization Performance
- Display QImage with QtGui
- Is it safe to reinterpret_cast an enum class variable to a reference of the underlying type?