summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile15
1 files changed, 9 insertions, 6 deletions
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: