system.mk

Fri, 05 Jan 2001 17:31:37 +0100

author
tuomov
date
Fri, 05 Jan 2001 17:31:37 +0100
changeset 32
7e74a8d61b76
parent 30
f7c7b419577e
child 38
5e59489313a0
permissions
-rw-r--r--

trunk: changeset 35
Added 'stripws'.

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

mercurial