util-linux/fdisk/Makefile

77 lines
1.7 KiB
Makefile
Raw Normal View History

2006-12-06 17:25:37 -06:00
# Makefile -- Makefile for util-linux Linux utilities
# Created: Sat Dec 26 20:09:40 1992
# Revised: Fri Oct 6 21:02:21 1995 by r.faith@ieee.org
# Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu)
#
2006-12-06 17:25:39 -06:00
include ../make_include
2006-12-06 17:25:37 -06:00
include ../MCONFIG
MAN8=
SBIN=
2006-12-06 17:25:39 -06:00
CFDISK=cfdisk
NOTMADE=
2006-12-06 17:25:37 -06:00
2006-12-06 17:25:39 -06:00
ifneq "$(HAVE_SLANG)" "yes"
ifneq "$(HAVE_NCURSES)" "yes"
CFDISK=
NOTMADE=cfdisk
2006-12-06 17:25:37 -06:00
endif
2006-12-06 17:25:39 -06:00
endif
2006-12-06 17:25:37 -06:00
SBIN:=$(SBIN) fdisk
2006-12-06 17:25:39 -06:00
MAN8:=$(MAN8) fdisk.8
ifneq "$(ARCH)" "sparc"
2006-12-06 17:25:39 -06:00
SBIN:=$(SBIN) $(CFDISK) sfdisk
MAN8:=$(MAN8) cfdisk.8 sfdisk.8
endif
2006-12-06 17:25:37 -06:00
2006-12-06 17:25:39 -06:00
all: $(SBIN) $(NOTMADE)
2006-12-06 17:25:37 -06:00
cfdisk.o: cfdisk.c ../MCONFIG
2006-12-06 17:25:37 -06:00
ifeq "$(HAVE_SLANG)" "yes"
$(CC) -c $(CFLAGS) -DSLCURSES=1 $< -o $@
else
ifeq "$(HAVE_NCURSES)" "yes"
$(CC) -c $(CFLAGS) $< -o $@
else
:
endif
endif
cfdisk: cfdisk.o llseek.o i386_sys_types.o $(LIB)/xstrncpy.o
2006-12-06 17:25:37 -06:00
ifeq "$(HAVE_SLANG)" "yes"
$(CC) $(LDFLAGS) $^ -o $@ $(LIBSLANG)
else
ifeq "$(HAVE_NCURSES)" "yes"
2006-12-06 17:25:39 -06:00
$(CC) $(LDFLAGS) $^ -o $@ $(LIBCURSES)
2006-12-06 17:25:37 -06:00
else
@echo $@ not made since it requires ncurses or slang
endif
endif
# not installed by default
activate: sfdisk
rm -f activate
ln -s sfdisk activate
fdisk: fdisk.o llseek.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o \
fdiskaixlabel.o i386_sys_types.o partname.o
2006-12-06 17:25:37 -06:00
fdisk.o: fdisk.c fdisk.h
fdiskbsdlabel.o: fdiskbsdlabel.c fdisk.h fdiskbsdlabel.h
fdisksunlabel.o: fdisksunlabel.c fdisksunlabel.h fdisk.h
fdiskaixlabel.o: fdiskaixlabel.c fdiskaixlabel.h fdisk.h
2006-12-06 17:25:39 -06:00
fdisk.o cfdisk.o sfdisk.o fdiskbsdlabel.o fdisksunlabel.o \
fdisksgilabel.o fdiskaixlabel.o i386_sys_types.o partname.o: common.h
sfdisk: sfdisk.o i386_sys_types.o partname.o
2006-12-06 17:25:37 -06:00
install: all
$(INSTALLDIR) $(SBINDIR)
$(INSTALLBIN) $(SBIN) $(SBINDIR)
$(INSTALLDIR) $(MAN8DIR)
$(INSTALLMAN) $(MAN8) $(MAN8DIR)
.PHONY: clean
clean:
-rm -f *.o *~ core $(SBIN) partitiontype