]> git.ipfire.org Git - thirdparty/util-linux.git/blob - fdisk/Makefile
3a851fa027aa20801e4bb30d3aadf5ae7be88c79
[thirdparty/util-linux.git] / fdisk / Makefile
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)
5 #
6 include ../make_include
7 include ../MCONFIG
8
9 MAN8=
10 SBIN=
11 CFDISK=cfdisk
12 NOTMADE=
13
14 ifneq "$(HAVE_SLANG)" "yes"
15 ifneq "$(HAVE_NCURSES)" "yes"
16 CFDISK=
17 NOTMADE=cfdisk
18 endif
19 endif
20
21 ifeq "$(ARCH)" "m68k"
22 # It seems the m68k people do not want *fdisk
23 else
24 SBIN:=$(SBIN) fdisk
25 MAN8:=$(MAN8) fdisk.8
26
27 ifneq "$(ARCH)" "sparc"
28 SBIN:=$(SBIN) $(CFDISK) sfdisk
29 MAN8:=$(MAN8) cfdisk.8 sfdisk.8
30 endif
31 endif
32
33 all: $(SBIN) $(NOTMADE)
34
35 cfdisk.o: cfdisk.c
36 ifeq "$(HAVE_SLANG)" "yes"
37 $(CC) -c $(CFLAGS) -DSLCURSES=1 $< -o $@
38 else
39 ifeq "$(HAVE_NCURSES)" "yes"
40 $(CC) -c $(CFLAGS) $< -o $@
41 else
42 :
43 endif
44 endif
45
46 cfdisk: cfdisk.o llseek.o i386_sys_types.o
47 ifeq "$(HAVE_SLANG)" "yes"
48 $(CC) $(LDFLAGS) $^ -o $@ $(LIBSLANG)
49 else
50 ifeq "$(HAVE_NCURSES)" "yes"
51 $(CC) $(LDFLAGS) $^ -o $@ $(LIBCURSES)
52 else
53 @echo $@ not made since it requires ncurses or slang
54 endif
55 endif
56
57 # not installed by default
58 activate: sfdisk
59 rm -f activate
60 ln -s sfdisk activate
61
62 fdisk: fdisk.o llseek.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \
63 fdiskaixlabel.o i386_sys_types.o partname.o
64 fdisk.o: fdisk.c fdisk.h
65 fdiskbsdlabel.o: fdiskbsdlabel.c fdisk.h fdiskbsdlabel.h
66 fdisksunlabel.o: fdisksunlabel.c fdisksunlabel.h fdisk.h
67 fdiskaixlabel.o: fdiskaixlabel.c fdiskaixlabel.h fdisk.h
68 fdisk.o cfdisk.o sfdisk.o fdiskbsdlabel.o fdisksunlabel.o \
69 fdisksgilabel.o fdiskaixlabel.o i386_sys_types.o partname.o: common.h
70 sfdisk: sfdisk.o i386_sys_types.o partname.o
71
72 install: all
73 $(INSTALLDIR) $(SBINDIR)
74 $(INSTALLBIN) $(SBIN) $(SBINDIR)
75 $(INSTALLDIR) $(MAN8DIR)
76 $(INSTALLMAN) $(MAN8) $(MAN8DIR)
77
78 .PHONY: clean
79 clean:
80 -rm -f *.o *~ core $(SBIN)