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
22 ifeq "$(HAVE_NCURSES)" "yes"
27 # Where to put datebase files?
30 MOREHELPFILE
=$(MOREHELPDIR
)/$(MOREHELP
)
31 # MOREHELPDIR set in ../MCONFIG
32 CFLAGS
:=$(CFLAGS
) -DMOREHELPFILE
=\"$(MOREHELPFILE
)\"
36 # more and ul use curses - maybe we can't compile them
37 ifeq "$(HAVE_NCURSES)" "yes"
38 # Have ncurses - make more and ul
40 $(CC
) $(CFLAGS
) $(LDFLAGS
) $^
-o
$@
$(LIBCURSES
)
44 # Do not have ncurses - give up on ul
46 @echo
$@ not made since it requires ncurses
47 ifeq "$(HAVE_TERMCAP)" "yes"
49 $(CC
) $(CFLAGS
) $(LDFLAGS
) $^
-o
$@
$(LIBTERMCAP
)
52 @echo
$@ not made since it requires ncurses or termcap
57 hexdump
: hexdump.o conv.o display.o hexsyntax.o odsyntax.o parse.o
58 hexdump.o
: hexdump.c hexdump.h
59 conv.o
: conv.c hexdump.h
60 display.o
: display.c hexdump.h
61 hexsyntax.o
: hexsyntax.c hexdump.h
62 odsyntax.o
: odsyntax.c hexdump.h
63 parse.o
: parse.c hexdump.h
65 # Rules for everything else
69 column.o
: $(LIB
)/errs.h
70 column
: column.o
$(ERR_O
)
71 more.o
: more.c
$(LIB
)/pathnames.h
74 install install.shadow
install.text-utils
: all
75 $(INSTALLDIR
) $(BINDIR
) $(USRBINDIR
) $(MOREHELPDIR
) $(MAN1DIR
)
76 $(INSTALLBIN
) $(BIN
) $(BINDIR
)
77 $(INSTALLBIN
) $(USRBIN
) $(USRBINDIR
)
78 $(INSTALLDAT
) $(MOREHELP
) $(MOREHELPDIR
)
79 $(INSTALLMAN
) $(MAN1
) $(MAN1DIR
)
81 .PHONY
: clean distclean
83 -rm -f
*.o
*~ core
$(BIN
) $(USRBIN
) $(MAYBE
)