1 # Makefile -- Makefile for util-linux Linux utilities
2 # Created: Sat Dec 26 20:09:40 1992
3 # Revised: Fri Oct 6 21:02:21 1995 by r.faith@ieee.org
4 # Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu)
9 # Where to put man pages?
11 MAN8
= fdformat
.8 mkswap
.8 setfdprm
.8
13 # Where to put binaries?
14 # See the "install" rule for the links. . .
18 USRBIN
= fdformat setfdprm
22 ifneq "$(CPU)" "sparc"
23 # fsck and mkfs will compile, but there is no kernel support on sparc
24 MAN8
:=$(MAN8
) fsck.minix
.8 mkfs
.8 mkfs.minix
.8
25 SBIN
:=$(SBIN
) fsck.minix mkfs.minix
27 MAN8
:=$(MAN8
) fdisk
.8 cfdisk
.8 sfdisk
.8
28 SBIN
:=$(SBIN
) fdisk cfdisk sfdisk
35 # Where to put datebase files?
37 all: $(SBIN
) $(USRBIN
)
40 ifeq "$(HAVE_SLANG)" "yes"
41 $(CC
) -c
$(CFLAGS
) -DSLCURSES
=1 $< -o
$@
43 ifeq "$(HAVE_NCURSES)" "yes"
44 $(CC
) -c
$(CFLAGS
) $< -o
$@
50 cfdisk
: cfdisk.o llseek.o
51 ifeq "$(HAVE_SLANG)" "yes"
52 $(CC
) $(LDFLAGS
) $^
-o
$@
$(LIBSLANG
)
54 ifeq "$(HAVE_NCURSES)" "yes"
55 $(CC
) $(LDFLAGS
) $^
-o
$@
$(LIBCURSES
) -lm
57 @echo
$@ not made since it requires ncurses or slang
61 # not installed by default
66 # Rules for everything else
69 fsck.minix
: fsck.minix.o
70 fsck.minix.o
: fsck.minix.c bitops.h
72 mkfs.minix
: mkfs.minix.o
73 mkfs.minix.o
: mkfs.minix.c bitops.h
79 fdisk
: fdisk.o fdisklabel.o fdisksunlabel.o llseek.o
80 fdisksunlabel.o
: fdisksunlabel.c fdisksunlabel.h fdisk.h
82 fdisk
: fdisk.o fdisklabel.o llseek.o
85 fdisk.o
: fdisk.c fdisk.h
86 fdisklabel.o
: fdisklabel.c fdisk.h fdisklabel.h
89 $(INSTALLDIR
) $(SBINDIR
) $(USRBINDIR
) $(ETCDIR
)
90 $(INSTALLBIN
) $(SBIN
) $(SBINDIR
)
91 $(INSTALLBIN
) $(USRBIN
) $(USRBINDIR
)
92 $(INSTALLDAT
) $(ETC
) $(ETCDIR
)
93 $(INSTALLDIR
) $(MAN8DIR
)
94 $(INSTALLMAN
) $(MAN8
) $(MAN8DIR
)
98 -rm -f
*.o
*~ core
$(SBIN
) $(USRBIN
)