mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
00424b1082
- Fix a bug that root window is not repainted on wallpaper change unless an Expose X event is received. Seemingly, if there's no mapped window on a screen, X will not send an Expose event when the wallpaper changes. Thanks to baskerville for reporting. - Fix a X Pixmap leak when there's no existing wallpaper pixmap found. - Fix a bug in mstrncpy() that null character is not added to the end of the copied string. - Make VSYNC_STRS public, for use in src/dbus.c. Adjust the type of WINTYPES array. Add NUM_VSYNC. - Add more targets for various D-Bus methods. Add "bad_target" D-Bus error. Improve error handling. Add more helper functions to append arguments to a D-Bus message. Add Introspect method to D-Bus introspection reply. - Add public declarations of things in the new condition format code to common.h. Move definitions of some inline functions from compton.h to common.h. Make some functions public. Move wid_get_prop_adv() to compton.c. The primary code files of the new format src/c2.{c,h} will be published when ready. - Add support for dumping version string in Makefile (make version), to make snapshot generation easier. - Add repeated inclusion protection to common.h. - Update documentation. - Use gsed instead of sed in dbus-examples/cdbus-driver.sh if possible, as some BSD systems does not come with GNU sed by default. Thanks to DaChiChang for reporting. - Code clean-up. Small type changes in register_cm() to silence warnings. Quit on failure in parse_vsync(). Apply stricter checks in force_repaint().
113 lines
2.6 KiB
Makefile
113 lines
2.6 KiB
Makefile
# Use tab to indent recipe lines, spaces to indent other lines, otherwise
|
|
# GNU make may get unhappy.
|
|
|
|
CC ?= gcc
|
|
|
|
PREFIX ?= /usr
|
|
BINDIR ?= $(PREFIX)/bin
|
|
MANDIR ?= $(PREFIX)/share/man/man1
|
|
|
|
PACKAGES = x11 xcomposite xfixes xdamage xrender xext xrandr
|
|
LIBS = -lm -lrt
|
|
INCS =
|
|
|
|
OBJS = compton.o
|
|
|
|
# === Configuration flags ===
|
|
CFG =
|
|
|
|
# ==== libconfig ====
|
|
ifeq "$(NO_LIBCONFIG)" ""
|
|
CFG += -DCONFIG_LIBCONFIG
|
|
PACKAGES += libconfig
|
|
|
|
# libconfig-1.3* does not define LIBCONFIG_VER* macros, so we use
|
|
# pkg-config to determine its version here
|
|
CFG += $(shell pkg-config --atleast-version=1.4 libconfig || echo '-DCONFIG_LIBCONFIG_LEGACY')
|
|
endif
|
|
|
|
# ==== PCRE regular expression ====
|
|
ifeq "$(NO_REGEX_PCRE)" ""
|
|
CFG += -DCONFIG_REGEX_PCRE
|
|
LIBS += $(shell pcre-config --libs)
|
|
INCS += $(shell pcre-config --cflags)
|
|
ifeq "$(NO_REGEX_PCRE_JIT)" ""
|
|
CFG += -DCONFIG_REGEX_PCRE_JIT
|
|
endif
|
|
endif
|
|
|
|
# ==== DRM VSync ====
|
|
ifeq "$(NO_VSYNC_DRM)" ""
|
|
CFG += -DCONFIG_VSYNC_DRM
|
|
endif
|
|
|
|
# ==== OpenGL VSync ====
|
|
ifeq "$(NO_VSYNC_OPENGL)" ""
|
|
CFG += -DCONFIG_VSYNC_OPENGL
|
|
LIBS := -lGL $(LIBS)
|
|
endif
|
|
|
|
# ==== D-Bus ====
|
|
ifeq "$(NO_DBUS)" ""
|
|
CFG += -DCONFIG_DBUS
|
|
PACKAGES += dbus-1
|
|
OBJS += dbus.o
|
|
endif
|
|
|
|
# ==== C2 ====
|
|
# ifeq "$(NO_C2)" ""
|
|
# CFG += -DCONFIG_C2
|
|
# OBJS += c2.o
|
|
# endif
|
|
|
|
# === Version string ===
|
|
COMPTON_VERSION ?= git-$(shell git describe --always --dirty)-$(shell git log -1 --date=short --pretty=format:%cd)
|
|
CFG += -DCOMPTON_VERSION="\"$(COMPTON_VERSION)\""
|
|
|
|
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed
|
|
CFLAGS ?= -DNDEBUG -O2 -D_FORTIFY_SOURCE=2
|
|
CFLAGS += $(CFG)
|
|
|
|
LIBS += $(shell pkg-config --libs $(PACKAGES))
|
|
INCS += $(shell pkg-config --cflags $(PACKAGES))
|
|
|
|
CFLAGS += -Wall -std=c99
|
|
MANPAGES = man/compton.1 man/compton-trans.1
|
|
MANPAGES_HTML = $(addsuffix .html,$(MANPAGES))
|
|
|
|
# === Recipes ===
|
|
.DEFAULT_GOAL := compton
|
|
|
|
%.o: src/%.c src/%.h src/common.h
|
|
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
|
|
|
compton: $(OBJS)
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
man/%.1: man/%.1.asciidoc
|
|
a2x --format manpage $<
|
|
|
|
man/%.1.html: man/%.1.asciidoc
|
|
asciidoc $<
|
|
|
|
docs: $(MANPAGES) $(MANPAGES_HTML)
|
|
|
|
install: compton docs
|
|
@install -Dm755 compton "$(DESTDIR)$(BINDIR)"/compton
|
|
@install -Dm755 bin/compton-trans "$(DESTDIR)$(BINDIR)"/compton-trans
|
|
@install -Dm644 man/compton.1 "$(DESTDIR)$(MANDIR)"/compton.1
|
|
@install -Dm644 man/compton-trans.1 "$(DESTDIR)$(MANDIR)"/compton-trans.1
|
|
|
|
uninstall:
|
|
@rm -f "$(DESTDIR)$(BINDIR)/compton"
|
|
@rm -f "$(DESTDIR)$(BINDIR)/compton-trans"
|
|
@rm -f "$(DESTDIR)$(MANDIR)/compton.1"
|
|
@rm -f "$(DESTDIR)$(MANDIR)/compton-trans.1"
|
|
|
|
clean:
|
|
@rm -f $(OBJS) compton $(MANPAGES) $(MANPAGES_HTML)
|
|
|
|
version:
|
|
@echo "$(COMPTON_VERSION)"
|
|
|
|
.PHONY: uninstall clean docs version
|