system.mk

Mon, 17 Nov 2003 22:04:25 +0100

author
tuomov
date
Mon, 17 Nov 2003 22:04:25 +0100
changeset 56
af2c6d224f9d
parent 55
d32ef6ce17a4
child 57
de75d868bc0b
permissions
-rw-r--r--

trunk: changeset 60
Check that PREV!=NULL when unlinking item from a list. (PREV must
point to something if on list.)

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
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
43 # libtu/ uses POSIX_SOURCE
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
44
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
45 POSIX_SOURCE=-ansi -D_POSIX_SOURCE
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
46
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
47 # and . (ion) XOPEN_SOURCE.
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
48 # There is variation among systems what should be used and how they interpret
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
49 # it so it is perhaps better not using anything at all.
16
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
50
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
51 # Most systems
16
f597c8f0bcc9 trunk: changeset 19
tuomov
parents: 9
diff changeset
52 #XOPEN_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
53 # sunos, (irix)
8
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
54 #XOPEN_SOURCE=-ansi -D__EXTENSIONS__
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
55
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
56 # Same as '-Wall -pedantic' without '-Wunused' as callbacks often
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
57 # have unused variables.
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
58 WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
59 -Wtrigraphs -Wformat -Wchar-subscripts \
51
2d95d77aa954 trunk: changeset 55
tuomov
parents: 38
diff changeset
60 -Wparentheses -pedantic -Wuninitialized
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
61
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
62
55
d32ef6ce17a4 trunk: changeset 59
tuomov
parents: 54
diff changeset
63 CFLAGS=-g -Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES)
9
55e7f2ff6021 trunk: changeset 12
tuomov
parents: 8
diff changeset
64 LDFLAGS=-g $(LIBS) $(EXTRA_LIBS)
8
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
65
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
66
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
67 ##
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
68 ## make depend
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
69 ##
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
70
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
71 DEPEND_FILE=.depend
c1994196683f trunk: changeset 11
tuomov
parents: 7
diff changeset
72 MAKE_DEPEND=$(CC) -M $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) > $(DEPEND_FILE)
6
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 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
76 ## AR
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
77 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
78
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
79 AR=ar
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
80 ARFLAGS=cr
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
81 RANLIB=ranlib
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
82
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
83
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
84 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
85 ## Install & strip
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
86 ##
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
87
29
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
88 # Should work almost everywhere
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
89 INSTALL=install
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
90 # On a system with pure BSD install, -c might be preferred
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
91 #INSTALL=install -c
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
92
a2715cff4288 trunk: changeset 32
tuomov
parents: 16
diff changeset
93 INSTALLDIR=mkdir -p
6
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
94
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
95 BIN_MODE=755
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
96 DATA_MODE=664
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
97
f73065173121 trunk: changeset 9
tuomov
parents:
diff changeset
98 STRIP=strip

mercurial