]> git.ipfire.org Git - thirdparty/util-linux.git/blame - text-utils/Makefile
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / text-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:11:15 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
7eda085c 11MAN1= col.1 colcrt.1 colrm.1 column.1 hexdump.1 more.1 rev.1
6dbe3af9 12
6dbe3af9
KZ
13# Where to put binaries?
14# See the "install" rule for the links. . .
15
16BIN= more
17
7eda085c
KZ
18USRBIN= col colcrt colrm column hexdump rev
19
66ee8158
KZ
20MAYBE= ul
21
7eda085c
KZ
22ifeq "$(HAVE_NCURSES)" "yes"
23USRBIN:=$(USRBIN) ul
24MAN1:=$(MAN1) ul.1
25endif
6dbe3af9 26
6dbe3af9
KZ
27# Where to put datebase files?
28
eb63b9b8
KZ
29MOREHELP= more.help
30MOREHELPFILE=$(MOREHELPDIR)/$(MOREHELP)
31# MOREHELPDIR set in ../MCONFIG
32CFLAGS:=$(CFLAGS) -DMOREHELPFILE=\"$(MOREHELPFILE)\"
6dbe3af9 33
7eda085c
KZ
34all: $(BIN) $(USRBIN)
35
eb63b9b8 36# more and ul use curses - maybe we can't compile them
2b6fc908 37ifeq "$(HAVE_NCURSES)" "yes"
eb63b9b8
KZ
38# Have ncurses - make more and ul
39more ul:
7eda085c 40 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBCURSES)
eb63b9b8
KZ
41more: more.o
42ul: ul.o
2b6fc908 43else
eb63b9b8
KZ
44# Do not have ncurses - give up on ul
45ul:
2b6fc908 46 @echo $@ not made since it requires ncurses
eb63b9b8
KZ
47ifeq "$(HAVE_TERMCAP)" "yes"
48more: more.o
49 $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LIBTERMCAP)
50else
51more:
52 @echo $@ not made since it requires ncurses or termcap
53endif
2b6fc908 54endif
7eda085c 55
6dbe3af9 56# Rules for hexdump
5c36a0eb 57hexdump: hexdump.o conv.o display.o hexsyntax.o odsyntax.o parse.o
6dbe3af9
KZ
58hexdump.o: hexdump.c hexdump.h
59conv.o: conv.c hexdump.h
60display.o: display.c hexdump.h
61hexsyntax.o: hexsyntax.c hexdump.h
62odsyntax.o: odsyntax.c hexdump.h
63parse.o: parse.c hexdump.h
64
65# Rules for everything else
5c36a0eb 66col: col.o
6dbe3af9
KZ
67colcrt: colcrt.o
68colrm: colrm.o
eb63b9b8 69column.o: $(LIB)/errs.h
5c36a0eb
KZ
70column: column.o $(ERR_O)
71more.o: more.c $(LIB)/pathnames.h
6dbe3af9 72rev: rev.o
5c36a0eb 73
6dbe3af9 74install install.shadow install.text-utils: all
eb63b9b8 75 $(INSTALLDIR) $(BINDIR) $(USRBINDIR) $(MOREHELPDIR) $(MAN1DIR)
726f69e2
KZ
76 $(INSTALLBIN) $(BIN) $(BINDIR)
77 $(INSTALLBIN) $(USRBIN) $(USRBINDIR)
eb63b9b8 78 $(INSTALLDAT) $(MOREHELP) $(MOREHELPDIR)
726f69e2 79 $(INSTALLMAN) $(MAN1) $(MAN1DIR)
6dbe3af9
KZ
80
81.PHONY: clean distclean
82clean:
66ee8158 83 -rm -f *.o *~ core $(BIN) $(USRBIN) $(MAYBE)
6dbe3af9
KZ
84
85distclean: clean