Skip to content

Instantly share code, notes, and snippets.

@snoopspy
Created February 21, 2015 14:33
Show Gist options
  • Save snoopspy/9e31e0284bd04d7e28a7 to your computer and use it in GitHub Desktop.
Save snoopspy/9e31e0284bd04d7e28a7 to your computer and use it in GitHub Desktop.
SOURCES = main.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = $(shell basename $(PWD))
LDFLAGS += -lpthread
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
clean:
rm -rf *.o
rm -rf $(EXECUTABLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment