Skip to content

Instantly share code, notes, and snippets.

@terakun
Created November 12, 2018 13:44
Show Gist options
  • Save terakun/8710a5a930980bbe590adca8bba8d476 to your computer and use it in GitHub Desktop.
Save terakun/8710a5a930980bbe590adca8bba8d476 to your computer and use it in GitHub Desktop.
c++ Makefile
CXX = g++
FLAGS = -std=c++1z -Ofast -march=native
INCLUDES =
LIBS =
TARGET = main
SRCS = main.cc
OBJS = $(patsubst %.cc,%.o,$(SRCS))
.cc.o:
$(CXX) $(FLAGS) $(INCLUDES) -c $< -o $@
$(TARGET): $(OBJS)
$(CXX) $(FLAGS) $(FLAG) -o $@ $(OBJS) $(LIBS)
clean:
rm $(TARGET) $(OBJS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment