]>
Commit | Line | Data |
---|---|---|
6dbe3af9 KZ |
1 | # MCONFIG -- Configuration stuff for util-linux |
2 | # Created: Sat Feb 4 15:50:30 1995 | |
6dbe3af9 | 3 | # Copyright 1995 Rickard E. Faith (faith@cs.unc.edu) |
fd6b7a7f | 4 | |
5c36a0eb KZ |
5 | # For a user-mode install, make (at least) three changes: |
6 | # - remove the `-o root' part in INSTALLSUID | |
7 | # - set USE_TTY_GROUP=no | |
8 | # - define DESTDIR | |
9 | ||
66ee8158 KZ |
10 | # Select for ARCH one of intel, alpha, sparc, arm, m68k, mips |
11 | # Select for CPU i386 if the binaries must be able to run on an intel 386 | |
12 | # (by default i486 code is generated, see below) | |
13 | CPU=$(shell uname -m) | |
14 | ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') | |
fd6b7a7f KZ |
15 | |
16 | # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp | |
17 | # will use PAM for authentication. Additionally, passwd will not be | |
18 | # installed as it is not PAM aware. | |
19 | HAVE_PAM=no | |
fd6b7a7f | 20 | |
726f69e2 KZ |
21 | # If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd, |
22 | # and vipw will not be built or installed from the login-utils | |
fd6b7a7f | 23 | # subdirectory. |
5c36a0eb | 24 | HAVE_SHADOW=yes |
6dbe3af9 | 25 | |
fd6b7a7f KZ |
26 | # If HAVE_PASSWD is set to "yes", then passwd will not be built or |
27 | # installed from the login-utils subdirectory (but login, chfn, chsh, | |
28 | # newgrp, and vipw *will* be installed). | |
29 | HAVE_PASSWD=no | |
fd6b7a7f | 30 | |
726f69e2 KZ |
31 | # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require |
32 | # non-root users to enter the account password before updating /etc/passwd. | |
33 | REQUIRE_PASSWORD=yes | |
34 | #REQUIRE_PASSWORD=no | |
35 | ||
36 | # If you use chsh from this package, ONLY_LISTED_SHELLS will require that | |
37 | # the selected shell be listed in /etc/shells -- otherwise only a warning is | |
38 | # printed. This prevents someone from setting their shell to /bin/false. | |
39 | ONLY_LISTED_SHELLS=yes | |
40 | #ONLY_LISTED_SHELLS=no | |
41 | ||
42 | ||
726f69e2 KZ |
43 | # If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not |
44 | # be built or installed from the login-utils subdirectory. (The shutdown | |
45 | # and halt that come with the SysVinit package should be used with the init | |
46 | # found in that package.) | |
fd6b7a7f | 47 | HAVE_SYSVINIT=yes |
6dbe3af9 | 48 | |
726f69e2 KZ |
49 | # If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will |
50 | # not be built or installed from the login-utils subdirectory. (The | |
51 | # shutdown and init from the SysVinit package do not depend on the last, | |
52 | # mesg, and wall from that package.) | |
fd6b7a7f | 53 | HAVE_SYSVINIT_UTILS=yes |
726f69e2 | 54 | |
fd6b7a7f | 55 | # If HAVE_GETTY is set to "yes", then agetty will not be built or |
726f69e2 KZ |
56 | # installed from the login-utils subdirectory. Note that agetty can |
57 | # co-exist with other gettys, so this option should never be used. | |
58 | HAVE_GETTY=no | |
726f69e2 KZ |
59 | |
60 | # If USE_TTY_GROUP is set to "yes", then wall and write will be installed | |
61 | # setgid to the "tty" group, and mesg will only set the group write bit. | |
62 | # Note that this is only useful if login/xterm/etc. change the group of the | |
63 | # user's tty to "tty" [The login in util-linux does this correctly, and | |
64 | # xterm will do it correctly if X is compiled with USE_TTY_GROUP set | |
65 | # properly.] | |
66 | USE_TTY_GROUP=yes | |
726f69e2 | 67 | |
66ee8158 KZ |
68 | # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN |
69 | # to the current user, allowing her to make a screendump and do other | |
70 | # nifty things on the console, but also allowing him to keep an open | |
71 | # file descriptor after logging out to trick the next user. | |
72 | ALLOW_VCS_USE=yes | |
73 | ||
fd6b7a7f KZ |
74 | # If HAVE_RESET is set to "yes", then reset won't be installed. The version |
75 | # of reset that comes with the ncurses package is less aggressive. | |
fd6b7a7f KZ |
76 | HAVE_RESET=yes |
77 | ||
5c36a0eb KZ |
78 | # If HAVE_SLN is set to "yes", then sln won't be installed |
79 | # (but the man page sln.8 will be installed anyway). | |
80 | # sln also comes with libc and glibc. | |
81 | HAVE_SLN=no | |
726f69e2 | 82 | |
eb63b9b8 KZ |
83 | # If HAVE_TSORT is set to "yes", then tsort won't be installed. |
84 | # GNU textutils 2.0 includes tsort. | |
85 | HAVE_TSORT=no | |
86 | ||
87 | # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. | |
88 | HAVE_FDUTILS=no | |
89 | ||
fd6b7a7f | 90 | # Different optimizations for different cpus. |
66ee8158 KZ |
91 | ifeq "$(ARCH)" "intel" |
92 | ifeq "$(CPU)" "i386" | |
93 | OPT= -pipe -O2 -m386 -fomit-frame-pointer | |
94 | else | |
95 | OPT= -pipe -O2 -m486 -fomit-frame-pointer | |
96 | endif | |
fd6b7a7f | 97 | else |
66ee8158 | 98 | ifeq "$(ARCH)" "arm" |
eb63b9b8 | 99 | OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer |
fd6b7a7f | 100 | else |
7eda085c | 101 | OPT= -O2 -fomit-frame-pointer |
fd6b7a7f KZ |
102 | endif |
103 | endif | |
104 | ||
22853e4a | 105 | WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes |
5c36a0eb KZ |
106 | |
107 | LIB=../lib | |
fd6b7a7f | 108 | |
eb63b9b8 | 109 | ERR_O=$(LIB)/err.o |
5c36a0eb | 110 | |
2b6fc908 KZ |
111 | # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk) |
112 | # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.) | |
113 | # HAVE_SLANG=yes | |
114 | ||
115 | # There is a subdirectory /usr/include/slang containing slcurses.h | |
116 | # SLANGFLAGS=-I/usr/include/slang | |
117 | # No such subdirectory - slcurses.h lives in /usr/include | |
118 | # (no extra definition required). | |
119 | LIBSLANG=-lslang | |
120 | ||
6dbe3af9 KZ |
121 | DEVDIR= $(DESTDIR)/dev |
122 | ETCDIR= $(DESTDIR)/etc | |
123 | SBINDIR= $(DESTDIR)/sbin | |
124 | USRSBINDIR= $(DESTDIR)/usr/sbin | |
726f69e2 | 125 | USRLIBDIR= $(DESTDIR)/usr/lib |
6dbe3af9 KZ |
126 | USRBINDIR= $(DESTDIR)/usr/bin |
127 | USRGAMESDIR= $(DESTDIR)/usr/games | |
66ee8158 KZ |
128 | USRSHAREMISCDIR=$(DESTDIR)/usr/share/misc |
129 | LOCALEDIR= $(DESTDIR)/usr/share/locale | |
6dbe3af9 KZ |
130 | BINDIR= $(DESTDIR)/bin |
131 | VARPATH= $(DESTDIR)/var | |
726f69e2 | 132 | LOGDIR= $(DESTDIR)/var/log |
6dbe3af9 | 133 | MANDIR= $(DESTDIR)/usr/man |
5c36a0eb KZ |
134 | MAN1DIR= $(MANDIR)/man1 |
135 | MAN3DIR= $(MANDIR)/man3 | |
136 | MAN5DIR= $(MANDIR)/man5 | |
137 | MAN6DIR= $(MANDIR)/man6 | |
138 | MAN8DIR= $(MANDIR)/man8 | |
6dbe3af9 KZ |
139 | INFODIR= $(DESTDIR)/usr/info |
140 | ||
141 | # Directory for shutdown, halt, reboot, etc. | |
142 | SHUTDOWNDIR= $(SBINDIR) | |
143 | ||
144 | # Directory for fsck | |
145 | FSCKDIR= $(SBINDIR) | |
146 | ||
6dbe3af9 KZ |
147 | # Directory for passwd |
148 | PASSWDDIR= $(USRBINDIR) | |
149 | ||
66ee8158 KZ |
150 | # Directory for help file for more. Used to be /usr/lib. |
151 | MOREHELPDIR= $(USRSHAREMISCDIR) | |
eb63b9b8 | 152 | |
6dbe3af9 KZ |
153 | # Modes |
154 | DIRMODE= 755 | |
155 | BINMODE= 755 | |
156 | MANMODE= 644 | |
157 | DATMODE= 644 | |
158 | INFOMODE= 644 | |
5c36a0eb | 159 | SUIDMODE= 4755 |
6dbe3af9 KZ |
160 | |
161 | CHMOD= chmod | |
162 | INSTALL= install | |
163 | INSTALLDIR= $(INSTALL) -d -m $(DIRMODE) | |
164 | INSTALLBIN= $(INSTALL) -m $(BINMODE) | |
165 | INSTALLMAN= $(INSTALL) -m $(MANMODE) | |
166 | INSTALLDAT= $(INSTALL) -m $(DATMODE) | |
167 | INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root | |
168 | ||
66ee8158 KZ |
169 | CFLAGS := $(CFLAGS) $(OPT) -I$(LIB) $(WARNFLAGS) \ |
170 | $(CURSESFLAGS) $(SLANGFLAGS) \ | |
171 | -DSBINDIR=\"$(SBINDIR)\" \ | |
172 | -DUSRSBINDIR=\"$(USRSBINDIR)\" \ | |
173 | -DLOGDIR=\"$(LOGDIR)\" \ | |
174 | -DVARPATH=\"$(VARPATH)\" \ | |
175 | -DLOCALEDIR=\"$(LOCALEDIR)\" | |
176 | ||
177 | ||
726f69e2 KZ |
178 | %.o: %.c |
179 | $(CC) -c $(CFLAGS) $< -o $@ | |
180 | ||
181 | %: %.cc | |
182 | $(CXX) $(CFLAGS) $< -o $@ | |
fd6b7a7f | 183 |