]> git.decadent.org.uk Git - ion3.git/blob - system.mk
Added news for 20070506-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=`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 # 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
113
114 # On some other systems you may something like this:
115 #EXTRA_LIBS += -lintl
116 #EXTRA_INCLUDES +=
117
118
119 ##
120 ## C compiler
121 ##
122
123 CC=gcc
124
125 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
126 # have unused variables.
127 WARN=   -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
128         -Wtrigraphs -Wformat -Wchar-subscripts \
129         -Wparentheses -pedantic -Wuninitialized
130
131 CFLAGS=-g -Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
132 LDFLAGS=-g -Os $(EXTRA_LIBS) $(LIBS)
133 EXPORT_DYNAMIC=-Xlinker --export-dynamic
134
135 # The following options are mainly for development use and can be used
136 # to check that the code seems to conform to some standards. Depending
137 # on the version and vendor of you libc, the options may or may not have
138 # expected results. If you define one of C99_SOURCE or XOPEN_SOURCE, you
139 # may also have to define the other. 
140
141 #C89_SOURCE=-ansi
142
143 #POSIX_SOURCE=-D_POSIX_SOURCE
144
145 # Most systems
146 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
147 # SunOS, (Irix)
148 #XOPEN_SOURCE=-D__EXTENSIONS__
149
150 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
151
152 # The -DCF_HAS_VA_COPY option should allow for some optimisations, and 
153 # in some cases simply defining
154 #C99_SOURCE=-DCF_HAS_VA_COPY
155 # might allow for those optimisations to be taken without any  special
156 # libc or compiler options.
157
158
159 ##
160 ## make depend
161 ##
162
163 DEPEND_FILE=.depend
164 DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
165 MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE)
166
167 ##
168 ## AR
169 ##
170
171 AR=ar
172 ARFLAGS=cr
173 RANLIB=ranlib
174
175
176 ##
177 ## Install & strip
178 ##
179
180 INSTALL=sh $(TOPDIR)/install-sh -c
181 INSTALLDIR=mkdir -p
182
183 BIN_MODE=755
184 DATA_MODE=644
185
186 STRIP=strip
187
188 RM=rm