aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..ed10a1a
--- /dev/null
+++ b/makefile
@@ -0,0 +1,20 @@
+CXX = g++
+CXXFLAGS = -Wall -Wextra -Wpedantic -std=c++2a -g
+RELEASE = -O3 -march=native -mtune=native
+
+objects = main.o
+
+default: main
+
+release:
+ $(CXX) -c $(CXXFLAGS) $(RELEASE) main.cpp
+ $(CXX) -o main main.o
+
+%.o: %.cpp
+ $(CXX) -c $(CXXFLAGS) $<
+
+main: $(objects)
+ g++ -o $@ $^
+
+clean:
+ rm $(objects)