summaryrefslogtreecommitdiff
path: root/Makefile
blob: 862685d524373fb85ea5d6d990622d92247d8e48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CXX = clang++
CXXFLAGS  = -Iinclude -std=c++20 -Wall -Wextra -Wpedantic
CXXFLAGS += -march=native -mtune=native -O3
HDRS_CXX = \
	include/prime.hh
SRCS_CXX = \
	src/main.cc \
	src/prime/isprime.cc \
	src/prime/prime.cc \
	src/prime/printresult.cc
OBJS_CXX=$(SRCS_CXX:.cc=.o)
OBJS=$(OBJS_CXX)
prime: $(OBJS_CXX)
	$(CXX) $(LDFLAGS) -o $@ $(OBJS_CXX)
$(OBJS_CXX): $(HDRS_CXX) $(SRCS_CXX)
.PHONY: clean
clean:
	rm prime $(OBJS)