mirror of
https://github.com/yshui/picom.git
synced 2024-12-02 14:15:41 -05:00
1306b1591f
- Some WMs don't respect Keith Packard's proposal of _NET_WM_WINDOW_OPACITY, and do not copy _NET_WM_OPACITY attribute of a client window to its frame windows, thus cause opacity set by non-override-redirect windows to have no effect. This commit adds support for reading _NET_WM_OPACITY from client windows if running with --detect-client-opacity. Thanks to pvanek for reporting. - Change Makefile logic to determine options from 3 variables (NO_LIBCONFIG, NO_REGEX_PCRE, NO_REGEX_PCRE_JIT) instead of CFG to ensure compatibility when we add new options. CFG variable is no longer been respected.
60 lines
1.5 KiB
Makefile
60 lines
1.5 KiB
Makefile
CC ?= gcc
|
|
|
|
PREFIX ?= /usr
|
|
BINDIR ?= $(PREFIX)/bin
|
|
MANDIR ?= $(PREFIX)/share/man/man1
|
|
|
|
PACKAGES = x11 xcomposite xfixes xdamage xrender xext
|
|
LIBS = -lm
|
|
INCS =
|
|
|
|
# Parse configuration flags
|
|
CFG =
|
|
|
|
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
|
|
|
|
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
|
|
|
|
CFLAGS += $(CFG)
|
|
|
|
LIBS += $(shell pkg-config --libs $(PACKAGES))
|
|
INCS += $(shell pkg-config --cflags $(PACKAGES))
|
|
CFLAGS += -Wall -std=c99
|
|
OBJS = compton.o
|
|
|
|
%.o: src/%.c src/%.h
|
|
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
|
|
|
compton: $(OBJS)
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
|
|
install: compton
|
|
@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
|
|
|
|
.PHONY: uninstall clean
|