Tue, 22 Jan 2002 01:22:58 +0100
trunk: changeset 40
END_OPTPARSEROPTS missing too.
6 | 1 | ## |
2 | ## System settings | |
3 | ## | |
4 | ||
5 | ||
6 | ## | |
30 | 7 | ## Installation paths |
6 | 8 | ## |
9 | ||
10 | PREFIX=/usr/local | |
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 | |
17 | # Not used | |
18 | INCDIR=$(PREFIX)/include | |
19 | LIBDIR=$(PREFIX)/lib | |
6 | 20 | |
21 | ||
22 | ## | |
23 | ## X libraries, includes and options | |
24 | ## | |
25 | ||
26 | X11_PREFIX=/usr/X11R6 | |
27 | ||
28 | # SunOS/Solaris | |
29 | #X11_PREFIX=/usr/openwin | |
30 | ||
7 | 31 | X11_LIBS=-L$(X11_PREFIX)/lib |
32 | X11_INCLUDES=-I$(X11_PREFIX)/include | |
6 | 33 | X11_DEFINES= |
34 | ||
30 | 35 | #EXTRA_INCLUDES = -I$(PREFIX)/include |
36 | #EXTRA_LIBS = -L$(PREFIX)/lib | |
37 | ||
38 | ||
39 | ## | |
40 | ## libc | |
41 | ## | |
42 | ||
43 | # You may uncomment this if you know your system has | |
44 | # asprintf and vasprintf in the c library. (gnu libc has.) | |
45 | # If HAS_SYSTEM_ASPRINTF is not defined, an implementation | |
46 | # in sprintf_2.2/ is used. | |
47 | #HAS_SYSTEM_ASPRINTF=1 | |
48 | ||
6 | 49 | |
50 | ## | |
51 | ## C compiler | |
52 | ## | |
53 | ||
54 | CC=gcc | |
55 | ||
29 | 56 | # The POSIX_SOURCE, XOPEN_SOURCE and WARN options should not be necessary, |
16 | 57 | # they're mainly for development use. So, if they cause trouble (not |
58 | # the ones that should be used on your system or the system is broken), | |
59 | # just comment them out. | |
60 | ||
61 | # libtu/ uses POSIX_SOURCE | |
62 | ||
63 | POSIX_SOURCE=-ansi -D_POSIX_SOURCE | |
64 | ||
29 | 65 | # and . (ion) XOPEN_SOURCE. |
66 | # There is variation among systems what should be used and how they interpret | |
67 | # it so it is perhaps better not using anything at all. | |
16 | 68 | |
29 | 69 | # Most systems |
16 | 70 | #XOPEN_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED |
29 | 71 | # sunos, (irix) |
8 | 72 | #XOPEN_SOURCE=-ansi -D__EXTENSIONS__ |
6 | 73 | |
74 | # Same as '-Wall -pedantic-errors' without '-Wunused' as callbacks often | |
75 | # have unused variables. | |
76 | WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ | |
29 | 77 | -Wtrigraphs -Wformat -Wchar-subscripts \ |
78 | -Wparentheses -pedantic-errors -Wuninitialized | |
79 | ||
6 | 80 | |
9 | 81 | CFLAGS=-g -O2 $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) |
82 | LDFLAGS=-g $(LIBS) $(EXTRA_LIBS) | |
8 | 83 | |
84 | ||
85 | ## | |
86 | ## make depend | |
87 | ## | |
88 | ||
89 | DEPEND_FILE=.depend | |
90 | MAKE_DEPEND=$(CC) -M $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) > $(DEPEND_FILE) | |
6 | 91 | |
92 | ||
93 | ## | |
94 | ## AR | |
95 | ## | |
96 | ||
97 | AR=ar | |
29 | 98 | ARFLAGS=cr |
99 | RANLIB=ranlib | |
6 | 100 | |
101 | ||
102 | ## | |
103 | ## Install & strip | |
104 | ## | |
105 | ||
29 | 106 | # Should work almost everywhere |
107 | INSTALL=install | |
108 | # On a system with pure BSD install, -c might be preferred | |
109 | #INSTALL=install -c | |
110 | ||
111 | INSTALLDIR=mkdir -p | |
6 | 112 | |
113 | BIN_MODE=755 | |
114 | DATA_MODE=664 | |
115 | ||
116 | STRIP=strip |