New answers tagged makefile
1
It's usually best to have the Makefile in the same directory as the build products, or at least have that as the working directory. Then there's no need to re-write the built-in rules for compiling and linking. Use VPATH to ensure the source files can be found.
LDFLAGS := -lpthread
That should go into LIBS (which gets expanded later in the command line), ...
Top 50 recent answers are included
Related Tags
makefile × 79c++ × 27
make × 22
c × 16
beginner × 9
python × 4
c++11 × 3
bash × 3
console × 3
linux × 3
perl × 3
performance × 2
unit-testing × 2
node.js × 2
image × 2
file-system × 2
portability × 2
integration-testing × 2
cmake × 2
gcc × 2
java × 1
javascript × 1
array × 1
sorting × 1
linked-list × 1