fix new battery plugin to work better with multiple batteries present
[wmiirc-lua.git] / config.mk.in
blob23916386b48145714595344cd700f91709a1f1cc
1 LOADED_CONFIG_MK := 1
2 # ------------------------------------------------------------------------
3 # standard programs
4 CC = cc
5 INSTALL = install
6 POD2MAN = pod2man
8 # ------------------------------------------------------------------------
9 # things about lua
10 LUA_VERSION = $(shell lua -v 2>&1 | sed -e 's/.* \([0-9]\+\.[0-9]\+\)[ .].*/\1/')
11 LUA_PKG_NAME = lua${LUA_VERSION}
13 ifeq (${LUA_VERSION},)
14 $(error Unable to discover the lua interpreter version. Make sure 'lua' is in PATH.)
15 # If you see this you should see the README about the packages you need to install.
16 endif
18 LUA_INC := $(shell pkg-config --cflags ${LUA_PKG_NAME})
19 LUA_LIB := $(shell pkg-config --libs ${LUA_PKG_NAME})
21 ifeq (${LUA_INC},)
22 $(error Unable to get include and library info on the ${LUA_PKG_NAME} package.)
23 # If you see this then either LUA_VERSION or LUA_PKG_NAME is not getting
24 # set correctly, or you don't have pkg-config installed.
25 # Run pkg-config --list-all and see what LUA_PKG_NAME should be set to.
26 endif
28 # ------------------------------------------------------------------------
29 # things about ixp
31 IXP_PREFIX = /usr
32 #IXP_PREFIX = ${HOME}/usr
34 IXP_INC := -I${IXP_PREFIX}/include
35 IXP_LIB := -L${IXP_PREFIX}/lib -lixp
37 # ------------------------------------------------------------------------
38 # system directories
40 DESTDIR =
41 PREFIX = /usr/local
43 CORE_LIB_DIR = ${DESTDIR}${PREFIX}/lib/lua/${LUA_VERSION}
44 CORE_LUA_DIR = ${DESTDIR}${PREFIX}/share/lua/${LUA_VERSION}
46 PLUGIN_LIB_DIR = ${DESTDIR}${PREFIX}/lib/lua/${LUA_VERSION}/wmii
47 PLUGIN_LUA_DIR = ${DESTDIR}${PREFIX}/share/lua/${LUA_VERSION}/wmii
49 BIN_DIR = ${DESTDIR}${PREFIX}/bin
50 RC_DIR = ${DESTDIR}/etc/X11/wmii-lua
51 MAN_DIR = ${DESTDIR}${PREFIX}/share/man/man3
52 XS_DIR = ${DESTDIR}${PREFIX}/share/xsessions
54 ALL_INSTALL_DIRS= ${CORE_LIB_DIR} \
55 ${CORE_LUA_DIR} \
56 ${PLUGIN_LIB_DIR} \
57 ${PLUGIN_LUA_DIR} \
58 ${BIN_DIR} \
59 ${RC_DIR} \
60 ${MAN_DIR} \
61 ${XS_DIR}
63 # ------------------------------------------------------------------------
64 # home directories
66 HOME_WMII = ~/.wmii-lua
67 HOME_CORE = ${HOME_WMII}/core
68 HOME_PLUGINS = ${HOME_WMII}/plugins
69 HOME_BIN_DIR = $(word 1,$(wildcard ~/usr/bin ~/bin) ~/usr/bin)
70 HOME_PREFIX = $(dir ${HOME_BIN_DIR})
72 ALL_HOME_DIRS = ${HOME_CORE} \
73 ${HOME_PLUGINS} \
74 ${HOME_PLUGINS}
76 # vim: set ft=make :