ui: make primary cursor blink even if no lua theme has been loaded
[vis.git] / config.mk
blobbdc170220d30b3b40820e9022fa0d68be21a2a68
1 # vis version
2 VERSION = 0.1
4 # optional features
5 CONFIG_LUA=1
6 CONFIG_ACL=0
7 CONFIG_SELINUX=0
9 # Customize below to fit your system
11 PREFIX ?= /usr/local
12 MANPREFIX = ${PREFIX}/share/man
13 SHAREPREFIX = ${PREFIX}/share/vis
15 LIBS = -lc
17 CFLAGS_TERMKEY = $(shell pkg-config --cflags termkey 2> /dev/null || echo "")
18 LDFLAGS_TERMKEY = $(shell pkg-config --libs termkey 2> /dev/null || echo "-ltermkey")
20 CFLAGS_CURSES = $(shell pkg-config --cflags ncursesw 2> /dev/null || echo "-I/usr/include/ncursesw")
21 LDFLAGS_CURSES = $(shell pkg-config --libs ncursesw 2> /dev/null || echo "-lncursesw")
23 ifeq (${CONFIG_LUA},1)
24 CFLAGS_LUA = $(shell pkg-config --cflags lua5.2 2> /dev/null || echo "-I/usr/include/lua5.2")
25 LDFLAGS_LUA = $(shell pkg-config --libs lua5.2 2> /dev/null || echo "-llua -lm")
26 endif
28 ifeq (${CONFIG_ACL},1)
29 LIBS += -lacl
30 endif
32 OS = $(shell uname)
34 ifeq (${OS},Linux)
35 ifeq (${CONFIG_SELINUX},1)
36 LIBS += -lselinux
37 endif
38 else ifeq (${OS},Darwin)
39 CFLAGS += -D_DARWIN_C_SOURCE
40 else ifeq (${OS},OpenBSD)
41 CFLAGS += -D_BSD_SOURCE
42 else ifeq (${OS},FreeBSD)
43 CFLAGS += -D_BSD_SOURCE
44 else ifeq (${OS},NetBSD)
45 CFLAGS += -D_BSD_SOURCE
46 else ifeq (${OS},AIX)
47 CFLAGS += -D_ALL_SOURCE
48 endif
50 CFLAGS_LIBS = $(CFLAGS_LUA) $(CFLAGS_TERMKEY) $(CFLAGS_CURSES)
51 LDFLAGS_LIBS = $(LDFLAGS_LUA) $(LDFLAGS_TERMKEY) $(LDFLAGS_CURSES) $(LIBS)
53 CFLAGS_STD = -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
55 CFLAGS_VIS = $(CFLAGS_LIBS) $(CFLAGS_STD) -Os -DVERSION=\"${VERSION}\" -DNDEBUG
56 CFLAGS_VIS += -DCONFIG_LUA=${CONFIG_LUA}
57 CFLAGS_VIS += -DCONFIG_SELINUX=${CONFIG_SELINUX}
58 CFLAGS_VIS += -DCONFIG_ACL=${CONFIG_ACL}
59 ifeq (${CONFIG_LUA},1)
60 CFLAGS_VIS += -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_ALL
61 endif
63 LDFLAGS_VIS = $(LDFLAGS_LIBS)
65 DEBUG_CFLAGS_VIS = ${CFLAGS_VIS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra -pedantic -Wno-missing-field-initializers -Wno-unused-parameter
67 CC ?= cc
68 STRIP ?= strip