system.mk

Tue, 11 Mar 2003 20:01:42 +0100

author
tuomov
date
Tue, 11 Mar 2003 20:01:42 +0100
changeset 47
672e29bfda3c
parent 38
5e59489313a0
child 51
2d95d77aa954
permissions
-rw-r--r--

trunk: changeset 51
minor glitch

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

mercurial