From 9badf6db10f02bebb3e72af98d8d86ca9aec59a3 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 8 Aug 2019 13:38:09 +0200 Subject: C++; experimenting with pn-search --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3652a5d..59e28d0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -CC = gcc -CFLAGS = -Wall -Wextra -std=c11 -O3 -fwrapv -flto +CXX = g++ +CXXFLAGS = -Wall -Wextra -std=c++17 -O3 -fwrapv -flto LDFLAGS = TARGET = ttt3d @@ -8,8 +8,11 @@ TARGET = ttt3d all: $(TARGET) clean: - rm -f $(TARGET) + rm -f $(TARGET) *.o -$(TARGET): $(wildcard *.c *.h) - $(CC) $(CFLAGS) -o $@ $(filter %.c,$^) $(LDFLAGS) +$(TARGET): $(patsubst %.cpp,%.o,$(wildcard *.cpp)) + $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) + +%.o: %.cpp $(wildcard *.h) + $(CXX) $(CXXFLAGS) -c -o $@ $< -- cgit v1.2.3-70-g09d2