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)
6 include ..
/make_include
9 # Where to put man pages?
11 MAN1
= col
.1 colcrt
.1 colrm
.1 column
.1 hexdump
.1 more
.1 rev
.1
13 # Where to put binaries?
14 # See the "install" rule for the links. . .
18 USRBIN
= col colcrt colrm column hexdump rev
20 ifeq "$(HAVE_NCURSES)" "yes"
25 # Where to put datebase files?
28 MOREHELPFILE
=$(MOREHELPDIR
)/$(MOREHELP
)
29 # MOREHELPDIR set in ../MCONFIG
30 CFLAGS
:=$(CFLAGS
) -DMOREHELPFILE
=\"$(MOREHELPFILE
)\"
34 # more and ul use curses - maybe we can't compile them
35 ifeq "$(HAVE_NCURSES)" "yes"
36 # Have ncurses - make more and ul
38 $(CC
) $(CFLAGS
) $(LDFLAGS
) $^
-o
$@
$(LIBCURSES
)
42 # Do not have ncurses - give up on ul
44 @echo
$@ not made since it requires ncurses
45 ifeq "$(HAVE_TERMCAP)" "yes"
47 $(CC
) $(CFLAGS
) $(LDFLAGS
) $^
-o
$@
$(LIBTERMCAP
)
50 @echo
$@ not made since it requires ncurses or termcap
55 hexdump
: hexdump.o conv.o display.o hexsyntax.o odsyntax.o parse.o
56 hexdump.o
: hexdump.c hexdump.h
57 conv.o
: conv.c hexdump.h
58 display.o
: display.c hexdump.h
59 hexsyntax.o
: hexsyntax.c hexdump.h
60 odsyntax.o
: odsyntax.c hexdump.h
61 parse.o
: parse.c hexdump.h
63 # Rules for everything else
67 column.o
: $(LIB
)/errs.h
68 column
: column.o
$(ERR_O
)
69 more.o
: more.c
$(LIB
)/pathnames.h
72 install install.shadow
install.text-utils
: all
73 $(INSTALLDIR
) $(BINDIR
) $(USRBINDIR
) $(MOREHELPDIR
) $(MAN1DIR
)
74 $(INSTALLBIN
) $(BIN
) $(BINDIR
)
75 $(INSTALLBIN
) $(USRBIN
) $(USRBINDIR
)
76 $(INSTALLDAT
) $(MOREHELP
) $(MOREHELPDIR
)
77 $(INSTALLMAN
) $(MAN1
) $(MAN1DIR
)
79 .PHONY
: clean distclean
81 -rm -f
*.o
*~ core
$(BIN
) $(USRBIN
)