summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9f9627a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+CXX=clang++
+CXXFLAGS=-Iinclude
+ifneq ($(DEBUG),1)
+CXXFLAGS += -DNDEBUG
+endif
+ifeq ($(LUMA__X),1)
+CXXFLAGS += -DLUMA__X=true
+endif
+CXXFLAGS += -std=c++20 -Wall -Wextra -Wpedantic
+CXXFLAGS += -march=native -mtune=native -O3
+LDFLAGS = -lfmt -lwebp
+HDRS_CXX = \
+ include/benoit.hh
+SRCS_CXX = \
+ src/benoit/benoit.cc \
+ src/benoit/print.cc \
+ src/benoit/strlen.cc \
+ src/main.cc
+SRCS=$(SRCS_CXX)
+OBJS=$(SRCS:.cc=.o)
+benoit: $(OBJS)
+ $(CXX) $(LDFLAGS) -o $@ $(OBJS)
+$(OBJS): $(HDRS_CXX) $(SRCS_CXX)
+.PHONY: clean
+clean:
+ rm benoit $(OBJS)