1 CC = g++ 2 CFLAGS += -O2 3 CPPFLAGS += -std=c++11 4 SOURCES = $(wildcard *.cc) 5 EXECUTABLES = $(SOURCES:.cc=) 6 BINDIR = bin 7 8 all: $(EXECUTABLES) 9 10 $(BINDIR): 11 mkdir -p $@ 12 13 $(EXECUTABLES): $(BINDIR) 14 $(CC) $(CFLAGS) $(CPPFLAGS) $(addsuffix .cc, $@) -o $(BINDIR)/$@ -lgflags_nothreads 15 16 clean: 17 rm -rf $(BINDIR) 18