Mon, 17 Nov 2003 22:04:25 +0100
trunk: changeset 60
Check that PREV!=NULL when unlinking item from a list. (PREV must
point to something if on list.)
6 | 1 | ## |
2 | ## System settings | |
3 | ## | |
4 | ||
5 | ||
6 | ## | |
30 | 7 | ## Installation paths |
6 | 8 | ## |
9 | ||
51 | 10 | PREFIX=/usr/local/ |
6 | 11 | |
30 | 12 | # No need to modify these usually |
13 | BINDIR=$(PREFIX)/bin | |
14 | ETCDIR=$(PREFIX)/etc | |
15 | MANDIR=$(PREFIX)/man | |
16 | DOCDIR=$(PREFIX)/doc | |
51 | 17 | LIBDIR=$(PREFIX)/lib |
30 | 18 | INCDIR=$(PREFIX)/include |
6 | 19 | |
20 | ||
21 | ## | |
30 | 22 | ## libc |
23 | ## | |
24 | ||
25 | # You may uncomment this if you know your system has | |
26 | # asprintf and vasprintf in the c library. (gnu libc has.) | |
27 | # If HAS_SYSTEM_ASPRINTF is not defined, an implementation | |
51 | 28 | # in sprintf_2.2/ is used. |
55 | 29 | HAS_SYSTEM_ASPRINTF=1 |
30 | 30 | |
6 | 31 | |
32 | ## | |
33 | ## C compiler | |
34 | ## | |
35 | ||
36 | CC=gcc | |
37 | ||
29 | 38 | # The POSIX_SOURCE, XOPEN_SOURCE and WARN options should not be necessary, |
16 | 39 | # they're mainly for development use. So, if they cause trouble (not |
40 | # the ones that should be used on your system or the system is broken), | |
41 | # just comment them out. | |
42 | ||
43 | # libtu/ uses POSIX_SOURCE | |
44 | ||
45 | POSIX_SOURCE=-ansi -D_POSIX_SOURCE | |
46 | ||
29 | 47 | # and . (ion) XOPEN_SOURCE. |
48 | # There is variation among systems what should be used and how they interpret | |
49 | # it so it is perhaps better not using anything at all. | |
16 | 50 | |
29 | 51 | # Most systems |
16 | 52 | #XOPEN_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED |
29 | 53 | # sunos, (irix) |
8 | 54 | #XOPEN_SOURCE=-ansi -D__EXTENSIONS__ |
6 | 55 | |
51 | 56 | # Same as '-Wall -pedantic' without '-Wunused' as callbacks often |
6 | 57 | # have unused variables. |
58 | WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ | |
29 | 59 | -Wtrigraphs -Wformat -Wchar-subscripts \ |
51 | 60 | -Wparentheses -pedantic -Wuninitialized |
29 | 61 | |
6 | 62 | |
55 | 63 | CFLAGS=-g -Os $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) |
9 | 64 | LDFLAGS=-g $(LIBS) $(EXTRA_LIBS) |
8 | 65 | |
66 | ||
67 | ## | |
68 | ## make depend | |
69 | ## | |
70 | ||
71 | DEPEND_FILE=.depend | |
72 | MAKE_DEPEND=$(CC) -M $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) > $(DEPEND_FILE) | |
6 | 73 | |
74 | ||
75 | ## | |
76 | ## AR | |
77 | ## | |
78 | ||
79 | AR=ar | |
29 | 80 | ARFLAGS=cr |
81 | RANLIB=ranlib | |
6 | 82 | |
83 | ||
84 | ## | |
85 | ## Install & strip | |
86 | ## | |
87 | ||
29 | 88 | # Should work almost everywhere |
89 | INSTALL=install | |
90 | # On a system with pure BSD install, -c might be preferred | |
91 | #INSTALL=install -c | |
92 | ||
93 | INSTALLDIR=mkdir -p | |
6 | 94 | |
95 | BIN_MODE=755 | |
96 | DATA_MODE=664 | |
97 | ||
98 | STRIP=strip |