diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-08-08 13:38:09 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-08-08 13:38:09 +0200 |
commit | 9badf6db10f02bebb3e72af98d8d86ca9aec59a3 (patch) | |
tree | d5f278b5f7d1d339dce0dd13f839d827ed5e2ee0 /Makefile | |
parent | 363d8ea45c53591bda14c6bd9fa8ddfcd47eb487 (diff) |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 $@ $< |