diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..af3901d --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ + +CXXFLAGS += -Wall -Wextra -Wpedantic -g -Og --std=c++20 +TESTCXXFLAGS := $(shell pkg-config --cflags gtest gtest_main) +TESTLDFLAGS := $(shell pkg-config --libs gtest gtest_main) -lpthread + +SRCS := sieve_utils.cc sieve.cc segmented_sieve.cc threaded_sieve.cc +OBJS := $(SRCS:.cc=.o) + +test: $(OBJS) test.o + $(CXX) $(TESTLDFLAGS) $^ -o $@ + +clean: + rm -f *.o test + +%.o: %.cc + $(CXX) $(CXXFLAGS) -c $^ -o $@ + +test.o: test.cc + $(CXX) $(CXXFLAGS) -c $^ -o $@ + |