2012-03-17 21:00:49 -04:00
|
|
|
CC ?= gcc
|
|
|
|
|
2012-02-27 07:49:50 -05:00
|
|
|
PREFIX ?= /usr
|
2012-03-20 20:30:20 -04:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man/man1
|
2012-02-27 07:49:50 -05:00
|
|
|
|
2012-09-24 22:19:20 -04:00
|
|
|
PACKAGES = x11 xcomposite xfixes xdamage xrender xext libconfig
|
2012-03-17 21:00:49 -04:00
|
|
|
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
|
Feature: Issue #29: Alternative shadow blacklist implementation
- Add shadow blacklist feature, but a different implementation from
nicklan's. 5 matching modes (exact, starts-with, contains, wildcard,
PCRE) and 3 matching targets (window name, window class instance,
window general class). Not extensively tested, bugs to be expected.
It's slower for exact matching than nicklan's as it uses linear search
instead of hash table. Also, PCRE's JIT optimization may cause issues
on PaX kernels.
- Add dependency to libpcre. Could be made optional if we have a
graceful way to handle that in Makefile.
- Some matching functions are GNU extensions of glibc. So this version
may have troubles running on platforms not using glibc.
- Fix a bug that access freed memory blocks in set_fade_callcack() and
check_fade_fin(). valgrind found it out.
- Use WM_CLASS to detect client windows instead of WM_STATE. Some client
windows (like notification windows) have WM_CLASS but not WM_STATE.
- Mark the extents as damaged if shadow state changed in
determine_shadow().
- Rewrite wid_get_name(). Code clean-up.
- Two debugging options: DEBUG_WINDATA and DEBUG_WINMATCH.
- As the matching system is ready, it should be rather easy to add other
kinds of blacklists, like fading blacklist.
2012-09-21 23:42:39 -04:00
|
|
|
LIBS += $(shell pcre-config --libs)
|
2012-03-17 21:00:49 -04:00
|
|
|
INCS = $(shell pkg-config --cflags $(PACKAGES))
|
Feature: Issue #29: Alternative shadow blacklist implementation
- Add shadow blacklist feature, but a different implementation from
nicklan's. 5 matching modes (exact, starts-with, contains, wildcard,
PCRE) and 3 matching targets (window name, window class instance,
window general class). Not extensively tested, bugs to be expected.
It's slower for exact matching than nicklan's as it uses linear search
instead of hash table. Also, PCRE's JIT optimization may cause issues
on PaX kernels.
- Add dependency to libpcre. Could be made optional if we have a
graceful way to handle that in Makefile.
- Some matching functions are GNU extensions of glibc. So this version
may have troubles running on platforms not using glibc.
- Fix a bug that access freed memory blocks in set_fade_callcack() and
check_fade_fin(). valgrind found it out.
- Use WM_CLASS to detect client windows instead of WM_STATE. Some client
windows (like notification windows) have WM_CLASS but not WM_STATE.
- Mark the extents as damaged if shadow state changed in
determine_shadow().
- Rewrite wid_get_name(). Code clean-up.
- Two debugging options: DEBUG_WINDATA and DEBUG_WINMATCH.
- As the matching system is ready, it should be rather easy to add other
kinds of blacklists, like fading blacklist.
2012-09-21 23:42:39 -04:00
|
|
|
INCS += $(shell pcre-config --cflags)
|
|
|
|
CFLAGS += -Wall -std=c99
|
2011-12-07 13:35:22 -05:00
|
|
|
OBJS = compton.o
|
2011-11-06 19:20:45 -05:00
|
|
|
|
2012-09-27 21:10:34 -04:00
|
|
|
CFG ?= -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_REGEX_PCRE_JIT
|
|
|
|
# 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')
|
|
|
|
CFLAGS += $(CFG)
|
|
|
|
|
2012-02-27 02:42:38 -05:00
|
|
|
%.o: src/%.c src/%.h
|
|
|
|
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
compton: $(OBJS)
|
2012-03-17 21:00:49 -04:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
install: compton
|
2012-03-20 20:30:20 -04:00
|
|
|
@install -Dm755 compton "$(DESTDIR)$(BINDIR)"/compton
|
2012-06-23 18:39:49 -04:00
|
|
|
@install -Dm755 bin/compton-trans "$(DESTDIR)$(BINDIR)"/compton-trans
|
2012-03-20 20:30:20 -04:00
|
|
|
@install -Dm644 man/compton.1 "$(DESTDIR)$(MANDIR)"/compton.1
|
2012-06-23 18:39:49 -04:00
|
|
|
@install -Dm644 man/compton-trans.1 "$(DESTDIR)$(MANDIR)"/compton-trans.1
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
uninstall:
|
2012-03-20 20:30:20 -04:00
|
|
|
@rm -f "$(DESTDIR)$(BINDIR)/compton"
|
2012-06-23 18:39:49 -04:00
|
|
|
@rm -f "$(DESTDIR)$(BINDIR)/compton-trans"
|
2012-03-20 20:30:20 -04:00
|
|
|
@rm -f "$(DESTDIR)$(MANDIR)/compton.1"
|
2012-06-23 18:39:49 -04:00
|
|
|
@rm -f "$(DESTDIR)$(MANDIR)/compton-trans.1"
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
clean:
|
2011-12-09 09:46:40 -05:00
|
|
|
@rm -f $(OBJS) compton
|
2011-11-06 19:20:45 -05:00
|
|
|
|
|
|
|
.PHONY: uninstall clean
|