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
74 ifneq ($(shell which lua
),)
75 LUA
=$(LUA_DIR
)/bin
/lua
76 LUAC
=$(LUA_DIR
)/bin
/luac
79 # Attempt to autodect lua using pkg-config.
83 # lua libraries and includes:
85 ifeq (5.2,$(findstring 5.2,$(shell pkg-config
--exists lua5.2
&& pkg-config
--modversion lua5.2
)))
86 ifneq ($(shell which lua5.2
),)
92 ifeq (5.1,$(findstring 5.1,$(shell pkg-config
--exists lua5.1
&& pkg-config
--modversion lua5.1
)))
93 ifneq ($(shell which lua5.1
),)
99 ifeq (5.1,$(findstring 5.1,$(shell pkg-config
--exists lua
&& pkg-config
--modversion lua
)))
100 ifneq ($(shell which lua
),)
107 LUA_LIBS
=`pkg-config --libs lua5.2`
108 LUA_INCLUDES
=`pkg-config --cflags lua5.2`
114 LUA_LIBS
=`pkg-config --libs lua5.1`
115 LUA_INCLUDES
=`pkg-config --cflags lua5.1`
121 LUA_LIBS
=`pkg-config --libs lua`
122 LUA_INCLUDES
=`pkg-config --cflags lua`
131 ## X libraries, includes and options
135 X11_PREFIX
=/usr
/X11R6
137 #X11_PREFIX=/usr/openwin
139 X11_LIBS
=-L
$(X11_PREFIX
)/lib
-lX11
-lXext
140 X11_INCLUDES
=-I
$(X11_PREFIX
)/include
142 # XFree86 libraries up to 4.3.0 have a bug that can cause a segfault.
143 # The following setting should work around that situation.
144 DEFINES
+= -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
146 # Use the Xutf8 routines (XFree86 extension) instead of the Xmb routines
147 # in an UTF-8 locale. (No, you don't need this in UTF-8 locales, and
148 # most likely don't even want. It's only there because both Xmb and
149 # Xutf8 routines are broken, in different ways.)
150 #DEFINES += -DCF_DE_USE_XUTF8
152 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
154 #DEFINES += -DCF_SUN_F1X_REMAP
161 # If you're on an archaic system (such as relatively recent *BSD releases)
162 # without even dummy multibyte/widechar and localisation support, you may
163 # have to uncomment the following line:
164 #DEFINES += -DCF_NO_LOCALE -DCF_NO_GETTEXT
166 # On some other systems you may need to explicitly link against libintl.
167 #EXTRA_LIBS += -lintl
168 # You may also need to give the location of its headers. The following
169 # should work on Mac OS X (which needs the above option as well) with
171 #EXTRA_INCLUDES += -I/opt/local/include
178 # You may uncomment this if you know that your system C libary provides
179 # asprintf and vasprintf. (GNU libc does.) If HAS_SYSTEM_ASPRINTF is not
180 # defined, an implementation provided in libtu/sprintf_2.2/ is used.
181 HAS_SYSTEM_ASPRINTF
=1
183 # The following setting is needed with GNU libc for clock_gettime and the
184 # monotonic clock. Other systems may not need it, or may not provide a
185 # monotonic clock at all (which Ion can live with, and usually detect).
189 #DEFINES += -DCF_NO_GETLOADAVG
193 # If you're using/have gcc, it is unlikely that you need to modify
194 # any of the settings below this line.
196 #####################################################################
205 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
206 # have unused variables.
207 WARN
= -W
-Wimplicit
-Wreturn-type
-Wswitch
-Wcomment \
208 -Wtrigraphs
-Wformat
-Wchar-subscripts \
209 -Wparentheses
-pedantic
-Wuninitialized
211 CFLAGS
=-Os
$(WARN
) $(DEFINES
) $(INCLUDES
) $(EXTRA_INCLUDES
) -DHAS_SYSTEM_ASPRINTF
=$(HAS_SYSTEM_ASPRINTF
)
213 LDFLAGS
=-Wl
,--as-needed
$(LIBS
) $(EXTRA_LIBS
)
214 EXPORT_DYNAMIC
=-Xlinker
--export-dynamic
216 # The following options are mainly for development use and can be used
217 # to check that the code seems to conform to some standards. Depending
218 # on the version and vendor of you libc, the options may or may not have
219 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
220 # may also have to define the other.
224 POSIX_SOURCE
=-D_POSIX_C_SOURCE
=200112L
227 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
229 #XOPEN_SOURCE=-D__EXTENSIONS__
231 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
233 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and
234 # in some cases simply defining
235 #C99_SOURCE=-DCF_HAS_VA_COPY
236 # might allow for those optimisations to be taken without any special
237 # libc or compiler options.
245 DO_MAKE_DEPEND
=$(CC
) -MM
$(DEFINES
) $(INCLUDES
) $(EXTRA_INCLUDES
)
246 MAKE_DEPEND
=$(DO_MAKE_DEPEND
) $(SOURCES
) > $(DEPEND_FILE
)
262 INSTALL
=sh
$(TOPDIR
)/install-sh
-c
279 ifeq ($(PRELOAD_MODULES
),1)
280 X11_LIBS
+= -lXinerama
-lXrandr