system.mk

Mon, 17 Jan 2005 22:02:09 +0100

author
tuomov
date
Mon, 17 Jan 2005 22:02:09 +0100
changeset 85
9f94b2e96e3b
parent 57
de75d868bc0b
child 95
6737fe676e48
permissions
-rw-r--r--

trunk: changeset 1934
Fixed everything that requires locale stuff to check CF_NO_LOCALE.

6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
1 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
2 ## System settings
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
3 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
4
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
5
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
6 ##
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
7 ## Installation paths
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
8 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
9
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
10 PREFIX=/usr/local/
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
11
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
12 # No need to modify these usually
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
13 BINDIR=$(PREFIX)/bin
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
14 ETCDIR=$(PREFIX)/etc
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
15 MANDIR=$(PREFIX)/man
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
16 DOCDIR=$(PREFIX)/doc
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
17 LIBDIR=$(PREFIX)/lib
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
18 INCDIR=$(PREFIX)/include
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
19
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
20
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
21 ##
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
22 ## libc
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
23 ##
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
24
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
25 # You may uncomment this if you know your system has
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
26 # asprintf and vasprintf in the c library. (gnu libc has.)
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
27 # If HAS_SYSTEM_ASPRINTF is not defined, an implementation
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
28 # in sprintf_2.2/ is used.
55
d32ef6ce17a4 trunk: changeset 59
tuomov
parents: 54
diff changeset
29 HAS_SYSTEM_ASPRINTF=1
30
f7c7b419577e trunk: changeset 33
tuomov
parents: 29
diff changeset
30
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
31
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
32 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
33 ## C compiler
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
34 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
35
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
36 CC=gcc
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
37
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
38 # The POSIX_SOURCE, XOPEN_SOURCE and WARN options should not be necessary,
16
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
39 # they're mainly for development use. So, if they cause trouble (not
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
40 # the ones that should be used on your system or the system is broken),
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
41 # just comment them out.
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
42
57
de75d868bc0b trunk: changeset 1220
tuomov
parents: 55
diff changeset
43 C89_SOURCE=-ansi
de75d868bc0b trunk: changeset 1220
tuomov
parents: 55
diff changeset
44 POSIX_SOURCE=-D_POSIX_SOURCE
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
45
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
46 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
47 # have unused variables.
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
48 WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
49 -Wtrigraphs -Wformat -Wchar-subscripts \
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
50 -Wparentheses -pedantic -Wuninitialized
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
51
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
52
55
d32ef6ce17a4 trunk: changeset 59
tuomov
parents: 54
diff changeset
53 CFLAGS=-g -Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES)
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
54 LDFLAGS=-g $(LIBS) $(EXTRA_LIBS)
8
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
55
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
56
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
57 ##
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
58 ## make depend
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
59 ##
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
60
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
61 DEPEND_FILE=.depend
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
62 MAKE_DEPEND=$(CC) -M $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) > $(DEPEND_FILE)
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
63
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
64
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
65 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
66 ## AR
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
67 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
68
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
69 AR=ar
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
70 ARFLAGS=cr
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
71 RANLIB=ranlib
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
72
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
73
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
74 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
75 ## Install & strip
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
76 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
77
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
78 # Should work almost everywhere
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
79 INSTALL=install
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
80 # On a system with pure BSD install, -c might be preferred
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
81 #INSTALL=install -c
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
82
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
83 INSTALLDIR=mkdir -p
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
84
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
85 BIN_MODE=755
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
86 DATA_MODE=664
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
87
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
88 STRIP=strip

mercurial