From 5be09d7edff924e7486d743e9d15edf07f555341 Mon Sep 17 00:00:00 2001
From: Mikhail Burakov <mburakov@mailbox.org>
Date: Mon, 18 Nov 2024 06:34:31 +0100
Subject: WIP

---
 makefile | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

(limited to 'makefile')

diff --git a/makefile b/makefile
index 2b6cdbd..69aa1f7 100644
--- a/makefile
+++ b/makefile
@@ -1,6 +1,6 @@
 bin:=$(notdir $(shell pwd))
-src:=$(wildcard *.c)
-obj:=$(src:.c=.o)
+src:=$(wildcard *.cc)
+obj:=$(src:.cc=.o)
 
 libs:=\
 	egl \
@@ -21,6 +21,9 @@ res:=\
 	luma.glsl \
 	chroma.glsl
 
+CXXFLAGS+=\
+	-std=c++20
+
 obj:=$(patsubst %,%.o,$(protocols)) $(obj)
 headers:=$(patsubst %,%.h,$(protocols))
 
@@ -36,15 +39,15 @@ LDFLAGS+= \
 all: $(bin)
 
 $(bin): $(obj)
-	$(CC) $^ $(LDFLAGS) -o $@
+	$(CXX) $^ $(LDFLAGS) -o $@
 
-%.o: %.c *.h $(res) $(headers)
-	$(CC) -c $< $(CFLAGS) -o $@
+%.o: %.cc *.h $(res) $(headers)
+	$(CXX) -c $< $(CFLAGS) $(CXXFLAGS) -o $@
 
 %.h: $(protocols_dir)/%.xml
 	wayland-scanner client-header $< $@
 
-%.c: $(protocols_dir)/%.xml
+%.cc: $(protocols_dir)/%.xml
 	wayland-scanner private-code $< $@
 
 clean:
-- 
cgit v1.2.3