12 # Unless you are creating a package conforming to some OS's standards, you
13 # probably do not want to modify the following directories:
17 # Configuration .lua files
18 ETCDIR=$(PREFIX)/etc/ion3
19 # Some .lua files and ion-* shell scripts
20 SHAREDIR=$(PREFIX)/share/ion3
22 MANDIR=$(PREFIX)/share/man
24 DOCDIR=$(PREFIX)/share/doc/ion3
25 # Nothing at the moment
26 INCDIR=$(PREFIX)/include/ion3
27 # Nothing at the moment
30 MODULEDIR=$(LIBDIR)/ion3/mod
31 # Compiled Lua source code
32 LCDIR=$(LIBDIR)/ion3/lc
33 # ion-completefile (does not belong in SHAREDIR being a binary file)
34 EXTRABINDIR=$(LIBDIR)/ion3/bin
35 # For ion-completeman system-wide cache
36 VARDIR=/var/cache/ion3
38 LOCALEDIR=$(PREFIX)/share/locale
45 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
46 # modules through 'libdl' or has non-standard naming conventions.
49 # Flags to link with libdl.
57 # If you have installed Lua 5.1 from the official tarball without changing
58 # paths, this should do it.
60 LUA_LIBS = -L$(LUA_DIR)/lib -llua
61 LUA_INCLUDES = -I$(LUA_DIR)/include
62 LUA=$(LUA_DIR)/bin/lua
63 LUAC=$(LUA_DIR)/bin/luac
65 # If you are using the Debian packages, the following settings should be
67 #LUA_LIBS=`pkg-config --libs lua5.1`
68 #LUA_INCLUDES=`pkg-config --cflags lua5.1`
70 #LUAC=/usr/bin/luac5.1
74 ## X libraries, includes and options
79 #X11_PREFIX=/usr/openwin
81 X11_LIBS=-L$(X11_PREFIX)/lib -lX11 -lXext
82 X11_INCLUDES=-I$(X11_PREFIX)/include
84 # XFree86 libraries up to 4.3.0 have a bug that can cause a segfault.
85 # The following setting should work around that situation.
86 DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
88 # Use the Xutf8 routines (XFree86 extension) instead of the Xmb routines
89 # in an UTF-8 locale. (No, you don't need this in UTF-8 locales, and
90 # most likely don't even want. It's only there because both Xmb and
91 # Xutf8 routines are broken, in different ways.)
92 #DEFINES += -DCF_DE_USE_XUTF8
94 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
96 #DEFINES += -DCF_SUN_F1X_REMAP
103 # You may uncomment this if you know your system has
104 # asprintf and vasprintf in the c library. (gnu libc has.)
105 # If HAS_SYSTEM_ASPRINTF is not defined, an implementation
106 # in sprintf_2.2/ is used.
107 #HAS_SYSTEM_ASPRINTF=1
109 # If you're on an archaic system (such as relatively recent *BSD releases)
110 # without even dummy multibyte/widechar and localisation support, you may
111 # have to uncomment the following line:
112 #DEFINES += -DCF_NO_LOCALE -DCF_NO_GETTEXT
114 # On some other systems you may something like this:
115 #EXTRA_LIBS += -lintl
118 # clock_gettime for monotonic time
128 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
129 # have unused variables.
130 WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
131 -Wtrigraphs -Wformat -Wchar-subscripts \
132 -Wparentheses -pedantic -Wuninitialized
134 CFLAGS=-g -Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
135 LDFLAGS=-g -Os $(EXTRA_LIBS) $(LIBS)
136 EXPORT_DYNAMIC=-Xlinker --export-dynamic
138 # The following options are mainly for development use and can be used
139 # to check that the code seems to conform to some standards. Depending
140 # on the version and vendor of you libc, the options may or may not have
141 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
142 # may also have to define the other.
146 #POSIX_SOURCE=-D_POSIX_C_SOURCE=200112L
149 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
151 #XOPEN_SOURCE=-D__EXTENSIONS__
153 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
155 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and
156 # in some cases simply defining
157 #C99_SOURCE=-DCF_HAS_VA_COPY
158 # might allow for those optimisations to be taken without any special
159 # libc or compiler options.
167 DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
168 MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE)
183 INSTALL=sh $(TOPDIR)/install-sh -c