]> git.ipfire.org Git - thirdparty/util-linux.git/blob - text-utils/Makefile
Imported from util-linux-2.9i tarball.
[thirdparty/util-linux.git] / text-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:11:15 1996 by faith@cs.unc.edu
4 # Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu)
5 #
6
7 include ../MCONFIG
8
9 # Where to put man pages?
10
11 MAN1= col.1 colcrt.1 colrm.1 column.1 hexdump.1 more.1 rev.1 \
12 ul.1
13
14 # Where to put binaries?
15 # See the "install" rule for the links. . .
16
17 BIN= more
18
19 USRBIN= col colcrt colrm column hexdump rev ul
20
21 # Where to put datebase files?
22
23 USRLIB= more.help
24
25 # Programs requiring special compilation
26
27 NEEDS_NCURSES= more ul
28
29 all: $(BIN) $(USRBIN)
30
31 $(NEEDS_NCURSES):
32 ifeq "$(HAVE_NCURSES)" "yes"
33 $(CC) $(LDFLAGS) $^ -o $@ $(LIBCURSES)
34 else
35 @echo $@ not made since it requires ncurses
36 endif
37
38 # Rules for hexdump
39
40 hexdump: hexdump.o conv.o display.o hexsyntax.o odsyntax.o parse.o
41 hexdump.o: hexdump.c hexdump.h
42 conv.o: conv.c hexdump.h
43 display.o: display.c hexdump.h
44 hexsyntax.o: hexsyntax.c hexdump.h
45 odsyntax.o: odsyntax.c hexdump.h
46 parse.o: parse.c hexdump.h
47
48 # Rules for everything else
49
50 col: col.o
51 colcrt: colcrt.o
52 colrm: colrm.o
53 column: column.o $(ERR_O)
54 more.o: more.c $(LIB)/pathnames.h
55 rev: rev.o
56
57 ifeq "$(HAVE_NCURSES)" "yes"
58 more: more.o
59 ul: ul.o
60 endif
61
62 install install.shadow install.text-utils: all
63 $(INSTALLDIR) $(BINDIR) $(USRBINDIR) $(USRLIBDIR) $(MAN1DIR)
64 $(INSTALLBIN) $(BIN) $(BINDIR)
65 $(INSTALLBIN) $(USRBIN) $(USRBINDIR)
66 $(INSTALLDAT) $(USRLIB) $(USRLIBDIR)
67 $(INSTALLMAN) $(MAN1) $(MAN1DIR)
68
69 .PHONY: clean distclean
70 clean:
71 -rm -f *.o *~ core $(BIN) $(USRBIN)
72
73 distclean: clean