]> git.decadent.org.uk Git - ion3.git/blob - system.mk
Added workaround for Flash full-screen bug (#462690).
[ion3.git] / system.mk
1 ##
2 ## System settings
3 ##
4
5 ##
6 ## Installation paths
7 ##
8
9 # Installation path prefix. Unless you know what you're doing, the default
10 # of /usr/local is likely the correct choice.
11 PREFIX=/usr/local
12
13 # Unless you are creating a package conforming to some OS's standards, you
14 # probably do not want to modify the following directories:
15
16 # Main binaries
17 BINDIR=$(PREFIX)/bin
18 # Configuration .lua files
19 ETCDIR=$(PREFIX)/etc/ion3
20 # Some .lua files and ion-* shell scripts
21 SHAREDIR=$(PREFIX)/share/ion3
22 # Manual pages
23 MANDIR=$(PREFIX)/share/man
24 # Some documents
25 DOCDIR=$(PREFIX)/share/doc/ion3
26 # Nothing at the moment
27 INCDIR=$(PREFIX)/include/ion3
28 # Nothing at the moment
29 LIBDIR=$(PREFIX)/lib
30 # Modules
31 MODULEDIR=$(LIBDIR)/ion3/mod
32 # Compiled Lua source code
33 LCDIR=$(LIBDIR)/ion3/lc
34 # ion-completefile (does not belong in SHAREDIR being a binary file)
35 EXTRABINDIR=$(LIBDIR)/ion3/bin
36 # For ion-completeman system-wide cache
37 VARDIR=/var/cache/ion3
38 # Message catalogs
39 LOCALEDIR=$(PREFIX)/share/locale
40
41
42 ##
43 ## Modules
44 ##
45
46 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
47 # modules through 'libdl' or has non-standard naming conventions.
48 # You will likely need this option on e.g. Cygwin and Mac OS X.
49 #PRELOAD_MODULES=1
50
51 # Flags to link with libdl. Even if PRELOAD_MODULES=1, you may need this
52 # setting (for e.g. Lua, when not instructed by pkg-config).
53 DL_LIBS=-ldl
54
55
56 ##
57 ## Lua
58 ##
59
60 # If you have installed Lua 5.1 from the official tarball without changing
61 # paths, this should do it.
62 LUA_DIR=/usr/local
63 LUA_LIBS = -L$(LUA_DIR)/lib -llua
64 LUA_INCLUDES = -I$(LUA_DIR)/include
65 LUA=$(LUA_DIR)/bin/lua
66 LUAC=$(LUA_DIR)/bin/luac
67
68 # If you are using the Debian packages, the following settings should be
69 # what you want.
70 #LUA_LIBS=`pkg-config --libs lua5.1`
71 #LUA_INCLUDES=`pkg-config --cflags lua5.1`
72 #LUA=/usr/bin/lua5.1
73 #LUAC=/usr/bin/luac5.1
74
75
76 ##
77 ## X libraries, includes and options
78 ##
79
80 # Paths
81 X11_PREFIX=/usr/X11R6
82 # SunOS/Solaris
83 #X11_PREFIX=/usr/openwin
84
85 X11_LIBS=-L$(X11_PREFIX)/lib -lX11 -lXext
86 X11_INCLUDES=-I$(X11_PREFIX)/include
87
88 # XFree86 libraries up to 4.3.0 have a bug that can cause a segfault.
89 # The following setting  should  work around that situation.
90 DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
91
92 # Use the Xutf8 routines (XFree86 extension) instead of the Xmb routines
93 # in an UTF-8 locale. (No, you don't need this in UTF-8 locales, and 
94 # most likely don't even want. It's only there because both Xmb and 
95 # Xutf8 routines are broken, in different ways.)
96 #DEFINES += -DCF_DE_USE_XUTF8
97
98 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
99 # on SunOS.
100 #DEFINES += -DCF_SUN_F1X_REMAP
101
102
103 ##
104 ## Localisation
105 ##
106
107 # If you're on an archaic system (such as relatively recent *BSD releases)
108 # without even dummy multibyte/widechar and localisation support, you may 
109 # have to uncomment the following line:
110 #DEFINES += -DCF_NO_LOCALE -DCF_NO_GETTEXT
111
112 # On some other systems you may need to explicitly link against libintl.
113 #EXTRA_LIBS += -lintl
114 # You may also need to give the location of its headers. The following
115 # should work on Mac OS X (which needs the above option as well) with
116 # macports.
117 #EXTRA_INCLUDES += -I/opt/local/include
118
119
120 ##
121 ## libc
122 ##
123
124 # You may uncomment this if you know that your system C libary provides
125 # asprintf and  vasprintf. (GNU libc does.) If HAS_SYSTEM_ASPRINTF is not
126 # defined, an implementation provided in libtu/sprintf_2.2/ is used. 
127 #HAS_SYSTEM_ASPRINTF=1
128
129 # The following setting is needed with GNU libc for clock_gettime and the
130 # monotonic clock. Other systems may not need it, or may not provide a
131 # monotonic clock at all (which Ion can live with, and usually detect).
132 EXTRA_LIBS += -lrt
133
134
135 #
136 # If you're using/have gcc, it is unlikely that you need to modify
137 # any of the settings below this line.
138 #
139 #####################################################################
140
141
142 ##
143 ## C compiler. 
144 ##
145
146 CC=gcc
147
148 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
149 # have unused variables.
150 WARN=   -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
151         -Wtrigraphs -Wformat -Wchar-subscripts \
152         -Wparentheses -pedantic -Wuninitialized
153
154 CFLAGS=-Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES)
155 LDFLAGS=$(LIBS) $(EXTRA_LIBS)
156 EXPORT_DYNAMIC=-Xlinker --export-dynamic
157
158 # The following options are mainly for development use and can be used
159 # to check that the code seems to conform to some standards. Depending
160 # on the version and vendor of you libc, the options may or may not have
161 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
162 # may also have to define the other. 
163
164 #C89_SOURCE=-ansi
165
166 #POSIX_SOURCE=-D_POSIX_C_SOURCE=200112L
167
168 # Most systems
169 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
170 # SunOS, (Irix)
171 #XOPEN_SOURCE=-D__EXTENSIONS__
172
173 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
174
175 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and 
176 # in some cases simply defining
177 #C99_SOURCE=-DCF_HAS_VA_COPY
178 # might allow for those optimisations to be taken without any  special
179 # libc or compiler options.
180
181
182 ##
183 ## make depend
184 ##
185
186 DEPEND_FILE=.depend
187 DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES)
188 MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE)
189
190
191 ##
192 ## AR
193 ##
194
195 AR=ar
196 ARFLAGS=cr
197 RANLIB=ranlib
198
199
200 ##
201 ## Install & strip
202 ##
203
204 INSTALL=sh $(TOPDIR)/install-sh -c
205 INSTALL_STRIP=-s
206 INSTALLDIR=mkdir -p
207
208 BIN_MODE=755
209 DATA_MODE=644
210
211 RM=rm
212
213
214 ##
215 ## Debugging
216 ##
217
218 #INSTALL_STRIP =
219 #CFLAGS += -g
220