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 # Some .lua files and ion-* shell scripts
20 SHAREDIR
=$(PREFIX
)/share
/notion
22 MANDIR
=$(PREFIX
)/share
/man
24 DOCDIR
=$(PREFIX
)/share
/doc
/notion
25 # Nothing at the moment
28 MODULEDIR
=$(LIBDIR
)/notion
/mod
29 # Compiled Lua source code
30 LCDIR
=$(LIBDIR
)/notion
/lc
31 # ion-completefile (does not belong in SHAREDIR being a binary file)
32 EXTRABINDIR
=$(LIBDIR
)/notion
/bin
33 # For notion-completeman system-wide cache
34 VARDIR
=/var
/cache
/notion
36 LOCALEDIR
=$(PREFIX
)/share
/locale
38 # Configuration .lua files. Overrideable, as config files are usually
39 # not placed under $(PREFIX).
40 ETCDIR ?
= $(PREFIX
)/etc
/notion
42 # Force all include files to be installed to /usr even if the
43 # PREFIX is unset. No header files are installed at the moment
46 INCDIR
= $(PREFIX
)/include/notion
48 INCDIR
= /usr
/include/notion
51 # Executable suffix (for Cygwin).
59 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
60 # modules through 'libdl' or has non-standard naming conventions.
61 # You will likely need this option on e.g. Cygwin and Mac OS X.
64 # Flags to link with libdl. Even if PRELOAD_MODULES=1, you may need this
65 # setting (for e.g. Lua, when not instructed by pkg-config).
73 include $(TOPDIR
)/build
/lua-detect.mk
76 ## X libraries, includes and options
80 X11_PREFIX ?
= /usr
/X11R6
82 #X11_PREFIX ?= /usr/openwin
84 X11_LIBS
=-L
$(X11_PREFIX
)/lib
-lX11
-lXext
85 X11_INCLUDES
=-I
$(X11_PREFIX
)/include
87 # XFree86 libraries up to 4.3.0 have a bug that can cause a segfault.
88 # The following setting should work around that situation.
89 DEFINES
+= -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
91 # Use the Xutf8 routines (XFree86 extension) instead of the Xmb routines
92 # in an UTF-8 locale. (No, you don't need this in UTF-8 locales, and
93 # most likely don't even want. It's only there because both Xmb and
94 # Xutf8 routines are broken, in different ways.)
95 #DEFINES += -DCF_DE_USE_XUTF8
97 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
99 #DEFINES += -DCF_SUN_F1X_REMAP
106 # If you're on an archaic system (such as relatively recent *BSD releases)
107 # without even dummy multibyte/widechar and localisation support, you may
108 # have to uncomment the following line:
109 #DEFINES += -DCF_NO_LOCALE -DCF_NO_GETTEXT
111 # On some other systems you may need to explicitly link against libintl.
112 #EXTRA_LIBS += -lintl
113 # You may also need to give the location of its headers. The following
114 # should work on Mac OS X (which needs the above option as well) with
116 #EXTRA_INCLUDES += -I/opt/local/include
123 # You may uncomment this if you know that your system C libary provides
124 # asprintf and vasprintf. (GNU libc does.) If HAS_SYSTEM_ASPRINTF is not
125 # defined, an implementation provided in libtu/sprintf_2.2/ is used.
126 HAS_SYSTEM_ASPRINTF ?
= 1
128 # The following setting is needed with GNU libc for clock_gettime and the
129 # monotonic clock. Other systems may not need it, or may not provide a
130 # monotonic clock at all (which Ion can live with, and usually detect).
133 # Cygwin needs this. Also when you disable _BSD_SOURCE you may need it.
134 #DEFINES += -DCF_NO_GETLOADAVG
138 # If you're using/have gcc, it is unlikely that you need to modify
139 # any of the settings below this line.
141 #####################################################################
150 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
151 # have unused variables.
152 WARN
= -W
-Wimplicit
-Wreturn-type
-Wswitch
-Wcomment \
153 -Wtrigraphs
-Wformat
-Wchar-subscripts \
154 -Wparentheses
-pedantic
-Wuninitialized
156 CFLAGS
+= -Os
$(WARN
) $(DEFINES
) $(INCLUDES
) $(EXTRA_INCLUDES
) \
157 -DHAS_SYSTEM_ASPRINTF
=$(HAS_SYSTEM_ASPRINTF
)
159 LDFLAGS
+= -Wl
,--as-needed
$(LIBS
) $(EXTRA_LIBS
)
160 EXPORT_DYNAMIC
=-Xlinker
--export-dynamic
162 # The following options are mainly for development use and can be used
163 # to check that the code seems to conform to some standards. Depending
164 # on the version and vendor of you libc, the options may or may not have
165 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
166 # may also have to define the other.
170 POSIX_SOURCE?
=-D_POSIX_C_SOURCE
=200112L
171 BSD_SOURCE?
=-D_BSD_SOURCE
174 XOPEN_SOURCE
=-D_XOPEN_SOURCE
-D_XOPEN_SOURCE_EXTENDED
176 #XOPEN_SOURCE=-D__EXTENSIONS__
178 C99_SOURCE?
=-std
=c99
-DCF_HAS_VA_COPY
180 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and
181 # in some cases simply defining
182 #C99_SOURCE=-DCF_HAS_VA_COPY
183 # might allow for those optimisations to be taken without any special
184 # libc or compiler options.
192 DO_MAKE_DEPEND
=$(CC
) -MM
$(DEFINES
) $(INCLUDES
) $(EXTRA_INCLUDES
)
193 MAKE_DEPEND
=$(DO_MAKE_DEPEND
) $(SOURCES
) > $(DEPEND_FILE
)
209 INSTALL ?
= sh
$(TOPDIR
)/install-sh
-c
211 INSTALLDIR ?
= mkdir
-p
226 ifeq ($(PRELOAD_MODULES
),1)
227 X11_LIBS
+= -lXinerama
-lXrandr