Released version 3-2014052800
[notion.git] / libtu / system-autodetect.mk
blobfb22494e57a31fa0d06a39fac56242ac02129d1d
1 ##
2 ## System settings
3 ##
5 # Beware: in releases, the Notion system.mk is used to build both libtu,
6 # libextl and notion - so structural changes to this file should also be
7 # carried out on the Notion system.mk
9 ##
10 ## Installation paths
13 PREFIX=/usr/local/
15 # No need to modify these usually
16 BINDIR=$(PREFIX)/bin
17 ETCDIR=$(PREFIX)/etc
18 MANDIR=$(PREFIX)/man
19 DOCDIR=$(PREFIX)/doc
20 LIBDIR=$(PREFIX)/lib
21 INCDIR=$(PREFIX)/include
25 ## libc
28 # You may uncomment this if you know your system has
29 # asprintf and vasprintf in the c library. (gnu libc has.)
30 # If HAS_SYSTEM_ASPRINTF is not defined, an implementation
31 # in sprintf_2.2/ is used.
32 HAS_SYSTEM_ASPRINTF=1
36 ## C compiler
39 CC=gcc
41 # The POSIX_SOURCE, XOPEN_SOURCE and WARN options should not be necessary,
42 # they're mainly for development use. So, if they cause trouble (not
43 # the ones that should be used on your system or the system is broken),
44 # just comment them out.
46 C89_SOURCE=-ansi
47 POSIX_SOURCE=-D_POSIX_SOURCE
49 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
50 # have unused variables.
51 WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
52 -Wtrigraphs -Wformat -Wchar-subscripts \
53 -Wparentheses -pedantic -Wuninitialized
56 CFLAGS=-g -Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) -DHAS_SYSTEM_ASPRINTF=$(HAS_SYSTEM_ASPRINTF)
57 LDFLAGS=-g $(LIBS) $(EXTRA_LIBS)
61 ## AR
64 AR=ar
65 ARFLAGS=cr
66 RANLIB=ranlib
70 ## Install & strip
73 # Should work almost everywhere
74 INSTALL=sh $(TOPDIR)/install-sh -c
75 INSTALLDIR=mkdir -p
77 BIN_MODE=755
78 DATA_MODE=664
80 STRIP=strip