9 # Installation path prefix. Unless you know what you're doing, the default
10 # of /usr/local is likely the correct choice.
11 #DIST: PREFIX=/usr/local
14 # Unless you are creating a package conforming to some OS's standards, you
15 # probably do not want to modify the following directories:
19 # Configuration .lua files
20 ETCDIR
=$(PREFIX
)/etc
/notion
21 # Some .lua files and ion-* shell scripts
22 SHAREDIR
=$(PREFIX
)/share
/notion
24 MANDIR
=$(PREFIX
)/share
/man
26 DOCDIR
=$(PREFIX
)/share
/doc
/notion
27 # Nothing at the moment
28 INCDIR
=$(PREFIX
)/include/notion
29 # Nothing at the moment
32 MODULEDIR
=$(LIBDIR
)/notion
/mod
33 # Compiled Lua source code
34 LCDIR
=$(LIBDIR
)/notion
/lc
35 # ion-completefile (does not belong in SHAREDIR being a binary file)
36 EXTRABINDIR
=$(LIBDIR
)/notion
/bin
37 # For notion-completeman system-wide cache
38 VARDIR
=/var
/cache
/notion
40 LOCALEDIR
=$(PREFIX
)/share
/locale
42 # Executable suffix (for Cygwin).
50 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
51 # modules through 'libdl' or has non-standard naming conventions.
52 # You will likely need this option on e.g. Cygwin and Mac OS X.
55 # Flags to link with libdl. Even if PRELOAD_MODULES=1, you may need this
56 # setting (for e.g. Lua, when not instructed by pkg-config).
64 # To skip auto-detection of lua uncomment this and edit the variables below to
65 # suit your installation of lua.
68 # Default to paths and names that should work for a build installed from the
69 # official Lua 5.1 source tarball.
71 LUA_LIBS
=-L
$(LUA_DIR
)/lib
-llua
72 LUA_INCLUDES
= -I
$(LUA_DIR
)/include
73 LUA
=$(LUA_DIR
)/bin
/lua
74 LUAC
=$(LUA_DIR
)/bin
/luac
76 # Attempt to autodect lua using pkg-config.
80 # lua libraries and includes:
82 ifeq (5.2,$(findstring 5.2,$(shell pkg-config
--exists lua5.2
&& pkg-config
--modversion lua5.2
)))
83 ifneq ($(shell which lua5.2
),)
89 ifeq (5.1,$(findstring 5.1,$(shell pkg-config
--exists lua5.1
&& pkg-config
--modversion lua5.1
)))
90 ifneq ($(shell which lua5.1
),)
96 ifeq (5.1,$(findstring 5.1,$(shell pkg-config
--exists lua
&& pkg-config
--modversion lua
)))
97 ifneq ($(shell which lua
),)
104 LUA_LIBS
=`pkg-config --libs lua5.2`
105 LUA_INCLUDES
=`pkg-config --cflags lua5.2`
111 LUA_LIBS
=`pkg-config --libs lua5.1`
112 LUA_INCLUDES
=`pkg-config --cflags lua5.1`
118 LUA_LIBS
=`pkg-config --libs lua`
119 LUA_INCLUDES
=`pkg-config --cflags lua`
128 ## X libraries, includes and options
132 X11_PREFIX
=/usr
/X11R6
134 #X11_PREFIX=/usr/openwin
136 X11_LIBS
=-L
$(X11_PREFIX
)/lib
-lX11
-lXext
137 X11_INCLUDES
=-I
$(X11_PREFIX
)/include
139 # XFree86 libraries up to 4.3.0 have a bug that can cause a segfault.
140 # The following setting should work around that situation.
141 DEFINES
+= -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
143 # Use the Xutf8 routines (XFree86 extension) instead of the Xmb routines
144 # in an UTF-8 locale. (No, you don't need this in UTF-8 locales, and
145 # most likely don't even want. It's only there because both Xmb and
146 # Xutf8 routines are broken, in different ways.)
147 #DEFINES += -DCF_DE_USE_XUTF8
149 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
151 #DEFINES += -DCF_SUN_F1X_REMAP
158 # If you're on an archaic system (such as relatively recent *BSD releases)
159 # without even dummy multibyte/widechar and localisation support, you may
160 # have to uncomment the following line:
161 #DEFINES += -DCF_NO_LOCALE -DCF_NO_GETTEXT
163 # On some other systems you may need to explicitly link against libintl.
164 #EXTRA_LIBS += -lintl
165 # You may also need to give the location of its headers. The following
166 # should work on Mac OS X (which needs the above option as well) with
168 #EXTRA_INCLUDES += -I/opt/local/include
175 # You may uncomment this if you know that your system C libary provides
176 # asprintf and vasprintf. (GNU libc does.) If HAS_SYSTEM_ASPRINTF is not
177 # defined, an implementation provided in libtu/sprintf_2.2/ is used.
178 #HAS_SYSTEM_ASPRINTF=1
180 # The following setting is needed with GNU libc for clock_gettime and the
181 # monotonic clock. Other systems may not need it, or may not provide a
182 # monotonic clock at all (which Ion can live with, and usually detect).
186 #DEFINES += -DCF_NO_GETLOADAVG
190 # If you're using/have gcc, it is unlikely that you need to modify
191 # any of the settings below this line.
193 #####################################################################
202 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
203 # have unused variables.
204 WARN
= -W
-Wimplicit
-Wreturn-type
-Wswitch
-Wcomment \
205 -Wtrigraphs
-Wformat
-Wchar-subscripts \
206 -Wparentheses
-pedantic
-Wuninitialized
208 CFLAGS
=-Os
$(WARN
) $(DEFINES
) $(INCLUDES
) $(EXTRA_INCLUDES
)
209 LDFLAGS
=-Wl
,--as-needed
$(LIBS
) $(EXTRA_LIBS
)
210 EXPORT_DYNAMIC
=-Xlinker
--export-dynamic
212 # The following options are mainly for development use and can be used
213 # to check that the code seems to conform to some standards. Depending
214 # on the version and vendor of you libc, the options may or may not have
215 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
216 # may also have to define the other.
220 POSIX_SOURCE
=-D_POSIX_C_SOURCE
=200112L
223 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
225 #XOPEN_SOURCE=-D__EXTENSIONS__
227 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
229 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and
230 # in some cases simply defining
231 #C99_SOURCE=-DCF_HAS_VA_COPY
232 # might allow for those optimisations to be taken without any special
233 # libc or compiler options.
241 DO_MAKE_DEPEND
=$(CC
) -MM
$(DEFINES
) $(INCLUDES
) $(EXTRA_INCLUDES
)
242 MAKE_DEPEND
=$(DO_MAKE_DEPEND
) $(SOURCES
) > $(DEPEND_FILE
)
258 INSTALL
=sh
$(TOPDIR
)/install-sh
-c
275 ifeq ($(PRELOAD_MODULES
),1)
276 X11_LIBS
+= -lXinerama
-lXrandr