]> git.decadent.org.uk Git - ion3.git/blob - system.mk
[svn-inject] Installing original source of ion3
[ion3.git] / system.mk
1 ##
2 ## System settings
3 ##
4
5
6 ##
7 ## Installation paths
8 ##
9
10 PREFIX=/usr/local
11
12 # Unless you are creating a package conforming to some OS's standards, you
13 # probably do not want to modify the following directories:
14
15 # Main binaries
16 BINDIR=$(PREFIX)/bin
17 # Configuration .lua files
18 ETCDIR=$(PREFIX)/etc/ion3
19 # Some .lua files and ion-* shell scripts
20 SHAREDIR=$(PREFIX)/share/ion3
21 # Manual pages
22 MANDIR=$(PREFIX)/share/man
23 # Some documents
24 DOCDIR=$(PREFIX)/share/doc/ion3
25 # Nothing at the moment
26 INCDIR=$(PREFIX)/include/ion3
27 # Nothing at the moment
28 LIBDIR=$(PREFIX)/lib
29 # Modules
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
37 # Message catalogs
38 LOCALEDIR=$(PREFIX)/share/locale
39
40
41 ##
42 ## Modules
43 ##
44
45 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
46 # modules through 'libdl' or has non-standard naming conventions.
47 #PRELOAD_MODULES=1
48
49 # Flags to link with libdl.
50 DL_LIBS=-ldl
51
52
53 ##
54 ## Lua
55 ##
56
57 # If you have installed Lua 5.1 from the official tarball without changing
58 # paths, this should do it.
59 LUA_DIR=/usr/local
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
64
65 # If you are using the Debian packages, the following settings should be
66 # what you want.
67 #LUA_LIBS=`pkg-config --libs lua5.1`
68 #LUA_INCLUDES=`pkg-config --cflags lua5.1`
69 #LUA=`which lua5.1`
70 #LUAC=`which luac5.1`
71
72
73 ##
74 ## X libraries, includes and options
75 ##
76
77 X11_PREFIX=/usr/X11R6
78 # SunOS/Solaris
79 #X11_PREFIX=/usr/openwin
80
81 X11_LIBS=-L$(X11_PREFIX)/lib -lX11 -lXext
82 X11_INCLUDES=-I$(X11_PREFIX)/include
83
84 # Change commenting to disable Xinerama support
85 XINERAMA_LIBS=-lXinerama
86 DEFINES += -DCF_XINERAMA
87 # For Solaris
88 #XINERAMA_LIBS=
89 #DEFINES += -DCF_SUN_XINERAMA
90
91 # XFree86 libraries up to 4.3.0 have a bug that will cause Ion to segfault
92 # if Opera is used when i18n support is enabled. The following setting
93 # should work around that situation.
94 DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
95
96 # Use the Xutf8 routines (XFree86 extension) instead of Xmb routines in
97 # an UTF8 locale.
98 #DEFINES += -DCF_DE_USE_XUTF8
99
100 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
101 # on SunOS.
102 #DEFINES += -DCF_SUN_F1X_REMAP
103
104
105 ##
106 ## libc
107 ##
108
109 # You may uncomment this if you know your system has
110 # asprintf and vasprintf in the c library. (gnu libc has.)
111 # If HAS_SYSTEM_ASPRINTF is not defined, an implementation
112 # in sprintf_2.2/ is used.
113 #HAS_SYSTEM_ASPRINTF=1
114
115
116 # If you're on an archaic system (such as relatively recent *BSD releases)
117 # without even dummy multibyte/widechar and localisation support, you may 
118 # have to uncomment the following line:
119 #DEFINES += -DCF_NO_LOCALE
120
121 # On some other systems you may something like this:
122 #EXTRA_LIBS += -lintl
123 #EXTRA_INCLUDES +=
124
125
126 ##
127 ## C compiler
128 ##
129
130 CC=gcc
131
132 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
133 # have unused variables.
134 WARN=   -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
135         -Wtrigraphs -Wformat -Wchar-subscripts \
136         -Wparentheses -pedantic -Wuninitialized
137
138 CFLAGS=-g -Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
139 LDFLAGS=-g -Os $(EXTRA_LIBS) $(LIBS)
140 EXPORT_DYNAMIC=-Xlinker --export-dynamic
141
142 # The following options are mainly for development use and can be used
143 # to check that the code seems to conform to some standards. Depending
144 # on the version and vendor of you libc, the options may or may not have
145 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
146 # may also have to define the other. 
147
148 #C89_SOURCE=-ansi
149
150 #POSIX_SOURCE=-D_POSIX_SOURCE
151
152 # Most systems
153 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
154 # SunOS, (Irix)
155 #XOPEN_SOURCE=-D__EXTENSIONS__
156
157 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
158
159 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and 
160 # in some cases simply defining
161 #C99_SOURCE=-DCF_HAS_VA_COPY
162 # might allow for those optimisations to be taken without any  special
163 # libc or compiler options.
164
165
166 ##
167 ## make depend
168 ##
169
170 DEPEND_FILE=.depend
171 DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
172 MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE)
173
174 ##
175 ## AR
176 ##
177
178 AR=ar
179 ARFLAGS=cr
180 RANLIB=ranlib
181
182
183 ##
184 ## Install & strip
185 ##
186
187 INSTALL=sh $(TOPDIR)/install-sh -c
188 INSTALLDIR=mkdir -p
189
190 BIN_MODE=755
191 DATA_MODE=644
192
193 STRIP=strip
194
195 RM=rm