]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/Makefile
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / sys-utils / Makefile
CommitLineData
6dbe3af9
KZ
1# Makefile -- Makefile for util-linux Linux utilities
2# Created: Sat Dec 26 20:09:40 1992
fd6b7a7f 3# Revised: Mon Aug 19 20:12:33 1996 by faith@cs.unc.edu
6dbe3af9
KZ
4# Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu)
5#
7eda085c 6include ../make_include
6dbe3af9
KZ
7include ../MCONFIG
8
9# Where to put man pages?
10
11MAN1= arch.1 readprofile.1
12
7eda085c 13MAN8= ctrlaltdel.8 cytune.8 dmesg.8 \
eb63b9b8
KZ
14 ipcrm.8 ipcs.8 renice.8 \
15 setsid.8 sln.8 tunelp.8
fd6b7a7f 16
6dbe3af9
KZ
17# Where to put binaries?
18# See the "install" rule for the links. . .
19
2b6fc908
KZ
20BIN= arch dmesg
21
7eda085c
KZ
22USRBIN= cytune ipcrm ipcs renice setsid
23
24USRSBIN= readprofile tunelp
25
26SBIN= ctrlaltdel
2b6fc908 27
7eda085c 28NOTMADE=
fd6b7a7f 29
22853e4a
KZ
30CWFLAGS := $(subst -Wmissing-prototypes,,$(CFLAGS))
31
5c36a0eb 32ifeq "$(HAVE_SLN)" "no"
7eda085c
KZ
33ifeq "$(CAN_DO_STATIC)" "no"
34NOTMADE=nosln
35else
5c36a0eb 36SBIN:=$(SBIN) sln
fd6b7a7f 37endif
7eda085c 38endif
6dbe3af9 39
66ee8158 40ifeq "$(ARCH)" "intel"
eb63b9b8 41MAN8:=$(MAN8) rdev.8 ramsize.8 rootflags.8 swapdev.8 vidmode.8
7eda085c 42USRSBIN:=$(USRSBIN) rdev
fd6b7a7f 43endif
6dbe3af9
KZ
44
45# Where to put datebase files?
46
47USRINFO= ipc.info
48
7eda085c 49all: $(SBIN) $(BIN) $(USRBIN) $(USRSBIN) $(NOTMADE)
6dbe3af9 50
22853e4a
KZ
51# Sometimes indirectly include <asm/bitops.h>
52cytune.o: cytune.c
53 $(CC) $(CWFLAGS) -c $< -o $@
54
55ipcs.o: ipcs.c
56 $(CC) $(CWFLAGS) -c $< -o $@
57
58ipcrm.o: ipcrm.c
59 $(CC) $(CWFLAGS) -c $< -o $@
60
6dbe3af9
KZ
61sln: sln.c
62 $(CC) -static $(CFLAGS) $(LDFLAGS) $< -o $@
63
7eda085c
KZ
64nosln:
65 @echo sln not made since static compilation fails here
66
6dbe3af9
KZ
67# Rules for everything else
68
69arch: arch.o
5c36a0eb
KZ
70ctrlaltdel.o: ctrlaltdel.c $(LIB)/linux_reboot.h
71ctrlaltdel: ctrlaltdel.o $(LIB)/my_reboot.o
22853e4a 72cytune: cytune.o
6dbe3af9
KZ
73ipcrm: ipcrm.o
74ipcs: ipcs.o
6dbe3af9
KZ
75rdev: rdev.o
76renice: renice.o
77readprofile: readprofile.o
6dbe3af9 78setsid: setsid.o
6dbe3af9
KZ
79
80install: all
7eda085c 81 $(INSTALLDIR) $(SBINDIR) $(BINDIR) $(USRBINDIR) $(USRSBINDIR)
6dbe3af9
KZ
82 $(INSTALLBIN) $(SBIN) $(SBINDIR)
83 $(INSTALLBIN) $(BIN) $(BINDIR)
6dbe3af9 84 $(INSTALLBIN) $(USRBIN) $(USRBINDIR)
7eda085c 85 $(INSTALLBIN) $(USRSBIN) $(USRSBINDIR)
66ee8158 86ifeq "$(ARCH)" "intel"
7eda085c
KZ
87 (cd $(USRSBINDIR); ln -sf rdev swapdev)
88 (cd $(USRSBINDIR); ln -sf rdev ramsize)
89 (cd $(USRSBINDIR); ln -sf rdev vidmode)
90 (cd $(USRSBINDIR); ln -sf rdev rootflags)
eb63b9b8 91endif
6dbe3af9
KZ
92 $(INSTALLDIR) $(MAN1DIR) $(MAN8DIR) $(INFODIR)
93 $(INSTALLMAN) $(MAN1) $(MAN1DIR)
94 $(INSTALLMAN) $(MAN8) $(MAN8DIR)
95 $(INSTALLMAN) $(USRINFO) $(INFODIR)
96
97clean:
7eda085c 98 -rm -f *.o *~ core $(SBIN) $(BIN) $(USRBIN) $(USRSBIN)