Skip to content

Instantly share code, notes, and snippets.

@etheriqa
Created August 17, 2015 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etheriqa/13ee20734ad3dd0849d2 to your computer and use it in GitHub Desktop.
Save etheriqa/13ee20734ad3dd0849d2 to your computer and use it in GitHub Desktop.
TARGET = kagiroi
SRC_DIR = src
SRCS = $(shell find . -name '*.cc')
DEPS = $(SRCS:.cc=.d)
OBJS = $(SRCS:.cc=.o)
CPPFLAGS = -MMD -MP -I$(SRC_DIR)
CXXFLAGS = -Wall -std=c++1y -O3
.PHONY: clean
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ -o $@
clean:
$(RM) $(TARGET) $(shell find . -name '*.o') $(shell find . -name '*.d')
-include $(DEPS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment