Skip to content

Instantly share code, notes, and snippets.

@pitcer
Last active April 3, 2020 21:51
Show Gist options
  • Select an option

  • Save pitcer/2fe16e2af3798cac78092ad935e37287 to your computer and use it in GitHub Desktop.

Select an option

Save pitcer/2fe16e2af3798cac78092ad935e37287 to your computer and use it in GitHub Desktop.
Makefile for C++
COMPILER = g++
COMPILER_FLAGS = \
-std=c++17 \
-Wall \
-Werror \
-Wextra \
-pedantic \
-Wpedantic \
-Wold-style-cast \
-finline-functions \
-ftree-vectorize \
-funroll-loops \
-Ofast
OUTPUT_NAME = binary
SOURCE = *.cpp
default: all
all:
${COMPILER} ${COMPILER_FLAGS} -o ${OUTPUT_NAME} ${SOURCE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment