summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-08-08 13:38:09 +0200
committerTom Smeding <tom.smeding@gmail.com>2019-08-08 13:38:09 +0200
commit9badf6db10f02bebb3e72af98d8d86ca9aec59a3 (patch)
treed5f278b5f7d1d339dce0dd13f839d827ed5e2ee0 /Makefile
parent363d8ea45c53591bda14c6bd9fa8ddfcd47eb487 (diff)
C++; experimenting with pn-searchHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
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 $@ $<