use V=1 to make Makefile verbose
[wmiirc-lua.git] / config.mk.dist
blobb787e3274145315eb561d37049ae86b3634dee79
1 # vim: set ft=make :
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
30 #IXP_PREFIX = ${HOME}
32 IXP_INC := -I${IXP_PREFIX}/usr/include
33 IXP_LIB := -L${IXP_PREFIX}/usr/lib -lixp
35 # ------------------------------------------------------------------------
36 # system directories
38 DESTDIR         =
39 PREFIX          = /usr/local
41 CORE_LIB_DIR    = ${DESTDIR}${PREFIX}/lib/lua/${LUA_VERSION}
42 CORE_LUA_DIR    = ${DESTDIR}${PREFIX}/share/lua/${LUA_VERSION}
44 PLUGIN_LIB_DIR  = ${DESTDIR}${PREFIX}/lib/lua/${LUA_VERSION}/wmii
45 PLUGIN_LUA_DIR  = ${DESTDIR}${PREFIX}/share/lua/${LUA_VERSION}/wmii
47 BIN_DIR         = ${DESTDIR}${PREFIX}/bin
48 RC_DIR          = ${DESTDIR}/etc/X11/wmii-3.5
49 MAN_DIR         = ${DESTDIR}${PREFIX}/share/man/man3
50 XS_DIR          = ${DESTDIR}${PREFIX}/share/xsessions
52 ALL_INSTALL_DIRS= ${CORE_LIB_DIR} \
53                   ${CORE_LUA_DIR} \
54                   ${PLUGIN_LIB_DIR} \
55                   ${PLUGIN_LUA_DIR} \
56                   ${BIN_DIR} \
57                   ${RC_DIR} \
58                   ${MAN_DIR} \
59                   ${XS_DIR}
61 # ------------------------------------------------------------------------
62 # home directories
64 HOME_WMII       = ~/.wmii-3.5
65 HOME_CORE       = ${HOME_WMII}/core
66 HOME_PLUGINS    = ${HOME_WMII}/plugins
67 HOME_BIN_DIR    = $(word 1,$(wildcard ~/usr/bin ~/bin) ~/usr/bin)
68 HOME_PREFIX     = $(dir ${HOME_BIN_DIR})
70 ALL_HOME_DIRS   = ${HOME_CORE} \
71                   ${HOME_PLUGINS} \
72                   ${HOME_PLUGINS}