]> git.decadent.org.uk Git - ion3.git/blob - system.mk
Add 20071109-1.
[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=/usr/bin/lua5.1
70 #LUAC=/usr/bin/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 # 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
87
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
93
94 # Remap F11 key to SunF36 and F12 to SunF37? You may want to set this
95 # on SunOS.
96 #DEFINES += -DCF_SUN_F1X_REMAP
97
98
99 ##
100 ## libc
101 ##
102
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
108
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
113
114 # On some other systems you may something like this:
115 #EXTRA_LIBS += -lintl
116 #EXTRA_INCLUDES +=
117
118 # clock_gettime for monotonic time
119 EXTRA_LIBS += -lrt
120
121
122 ##
123 ## C compiler
124 ##
125
126 CC=gcc
127
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
133
134 CFLAGS=-Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
135 LDFLAGS=-Os $(EXTRA_LIBS) $(LIBS)
136 EXPORT_DYNAMIC=-Xlinker --export-dynamic
137
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. 
143
144 #C89_SOURCE=-ansi
145
146 #POSIX_SOURCE=-D_POSIX_C_SOURCE=200112L
147
148 # Most systems
149 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
150 # SunOS, (Irix)
151 #XOPEN_SOURCE=-D__EXTENSIONS__
152
153 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
154
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.
160
161
162 ##
163 ## make depend
164 ##
165
166 DEPEND_FILE=.depend
167 DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
168 MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE)
169
170 ##
171 ## AR
172 ##
173
174 AR=ar
175 ARFLAGS=cr
176 RANLIB=ranlib
177
178
179 ##
180 ## Install & strip
181 ##
182
183 INSTALL=sh $(TOPDIR)/install-sh -c
184 INSTALLDIR=mkdir -p
185
186 BIN_MODE=755
187 DATA_MODE=644
188
189 STRIP=strip
190
191 RM=rm