trunk: changeset 1861
[notion/jeffpc.git] / system.mk
blob5bd7807c0d00391ee3a386198df6d6d6982794bc
1 ##
2 ## System settings
3 ##
6 ##
7 ## Installation paths
8 ##
10 #DIST: PREFIX=/usr/local
11 PREFIX=/usr/local/ion-3
13 # Unless you are creating a package conforming to some OS's standards, you
14 # probably do not want to modify the following directories:
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
43 ## Modules
46 # Set PRELOAD_MODULES=1 if your system does not support dynamically loaded
47 # modules through 'libdl' or has non-standard naming conventions.
48 #PRELOAD_MODULES=1
50 # Flags to link with libdl.
51 DL_LIBS=-ldl
55 ## Lua
58 # If you have installed Lua 5.0 from the official tarball without changing
59 # paths, this should do it.
60 LUA_DIR=/usr/local
61 LUA_LIBS = -L$(LUA_DIR)/lib -llua -llualib
62 LUA_INCLUDES = -I$(LUA_DIR)/include
63 LUA=$(LUA_DIR)/bin/lua
64 LUAC=$(LUA_DIR)/bin/luac
66 # If you are using the Debian packages, the following settings should be
67 # what you want.
68 #LUA_LIBS=`lua-config50 --libs`
69 #LUA_INCLUDES=`lua-config50 --include`
70 #LUA=lua50
71 #LUAC=luac50
75 ## X libraries, includes and options
78 X11_PREFIX=/usr/X11R6
79 # SunOS/Solaris
80 #X11_PREFIX=/usr/openwin
82 X11_LIBS=-L$(X11_PREFIX)/lib -lX11 -lXext
83 X11_INCLUDES=-I$(X11_PREFIX)/include
85 # Change commenting to disable Xinerama support
86 XINERAMA_LIBS=-lXinerama
87 #DEFINES += -DCF_NO_XINERAMA
89 # XFree86 libraries up to 4.3.0 have a bug that will cause Ion to segfault
90 # if Opera is used when i18n support is enabled. The following setting
91 # should work around that situation.
92 DEFINES += -DCF_XFREE86_TEXTPROP_BUG_WORKAROUND
94 # Use the Xutf8 routines (XFree86 extension) instead of Xmb routines in
95 # an UTF8 locale given the -i18n command line option?
96 #DEFINES += -DCF_DE_USE_XUTF8
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
104 ## libc
107 # You may uncomment this if you know your system has
108 # asprintf and vasprintf in the c library. (gnu libc has.)
109 # If HAS_SYSTEM_ASPRINTF is not defined, an implementation
110 # in sprintf_2.2/ is used.
111 #HAS_SYSTEM_ASPRINTF=1
114 # If you're on an archaic system (such as relatively recent *BSD releases)
115 # without even dummy multibyte/widechar and localisation support, you may
116 # have to uncomment the following line:
117 #DEFINES += -DCF_NO_LOCALE
121 ## C compiler
124 CC=gcc
126 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
127 # have unused variables.
128 WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
129 -Wtrigraphs -Wformat -Wchar-subscripts \
130 -Wparentheses -pedantic -Wuninitialized
132 CFLAGS=-g -Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
133 LDFLAGS=-g -Os $(EXTRA_LIBS) $(LIBS)
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.
141 #C89_SOURCE=-ansi
143 #POSIX_SOURCE=-D_POSIX_SOURCE
145 # Most systems
146 #XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
147 # SunOS, (Irix)
148 #XOPEN_SOURCE=-D__EXTENSIONS__
150 #C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY
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.
160 ## make depend
163 DEPEND_FILE=.depend
164 DO_MAKE_DEPEND=$(CC) -MM $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
165 MAKE_DEPEND=$(DO_MAKE_DEPEND) $(SOURCES) > $(DEPEND_FILE)
168 ## AR
171 AR=ar
172 ARFLAGS=cr
173 RANLIB=ranlib
177 ## Install & strip
180 INSTALL=$(TOPDIR)/install-sh -c
181 INSTALLDIR=mkdir -p
183 BIN_MODE=755
184 DATA_MODE=644
186 STRIP=strip
188 RM=rm