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