2wmw

Tiling Windowmanager for Wayland

Files | Log | Commits | Refs | README


config.mk

Size: 1339 bytes

VERSION = 0.1

PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

PKG_CONFIG = pkg-config

WLROOTS_PKG := $(shell ${PKG_CONFIG} --exists wlroots-0.18 && echo wlroots-0.18 || \
                       ${PKG_CONFIG} --exists wlroots-0.17 && echo wlroots-0.17 || \
                       ${PKG_CONFIG} --exists wlroots-0.16 && echo wlroots-0.16 || \
                       ${PKG_CONFIG} --exists wlroots && echo wlroots || echo none)

INCS = $(shell ${PKG_CONFIG} --cflags pixman-1) \
       $(shell ${PKG_CONFIG} --cflags libdrm) \
       $(shell ${PKG_CONFIG} --cflags pango) \
       $(shell ${PKG_CONFIG} --cflags pangocairo) \
       $(shell ${PKG_CONFIG} --cflags cairo) \
       $(shell ${PKG_CONFIG} --cflags dbus-1)

ifneq ($(WLROOTS_PKG),none)
    INCS += $(shell ${PKG_CONFIG} --cflags $(WLROOTS_PKG))
else
    INCS += -I/usr/include/wlroots-0.18 -I/usr/include/wlroots -I/usr/local/include/wlroots
endif

LIBS = $(shell ${PKG_CONFIG} --libs wayland-client) \
       $(shell ${PKG_CONFIG} --libs pangocairo) \
       $(shell ${PKG_CONFIG} --libs cairo) \
       $(shell ${PKG_CONFIG} --libs dbus-1)

ifneq ($(WLROOTS_PKG),none)
    LIBS += $(shell ${PKG_CONFIG} --libs $(WLROOTS_PKG))
else
    LIBS += -lwlroots-0.18 -lwlroots
endif

CPPFLAGS = -D_DEFAULT_SOURCE
CFLAGS = -O2 -Wall ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}

CC = gcc