New answers tagged


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