CXX = g++ --std=c++11 CX = gcc --std=c11 FLAGS = -g -Wall -Og -pthread BINARIES = cthreads pthreads exit_thread total total_locking total_locking_better .PHONY: all, clean all: $(BINARIES) cthreads: cthreads.c $(CX) $(FLAGS) -o $@ $< exit_thread: exit_thread.c $(CX) $(FLAGS) -o $@ $< pthreads: pthreads.cc $(CXX) $(FLAGS) -o $@ $< total: total.cc $(CXX) $(FLAGS) -o $@ $< total_locking: total_locking.cc $(CXX) $(FLAGS) -o $@ $< total_locking_better: total_locking_better.cc $(CXX) $(FLAGS) -o $@ $< clean: rm -rf $(BINARIES)