xref: /original-bsd/usr.bin/more/Makefile (revision c02b9ad6)
1#
2# Copyright (c) 1988 Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation, advertising
8# materials, and other materials related to such redistribution and
9# use acknowledge that the software was developed by the University
10# of California, Berkeley.  The name of the University may not be
11# used to endorse or promote products derived from this software
12# without specific prior written permission.  THIS SOFTWARE IS PROVIDED
13# ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
14# WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
15# FITNESS FOR A PARTICULAR PURPOSE.
16#
17# @(#)Makefile	5.2 (Berkeley) 09/23/88
18#
19
20DEFS=	-DHELPFILE=\"/usr/lib/less.help\" -DEDIT_PGM=\"/usr/ucb/vi\" -DRECOMP
21CFLAGS=	-O ${DEFS}
22LIBC=	/lib/libc.a
23SRCS=	ch.c command.c decode.c help.c input.c line.c linenum.c main.c \
24	option.c os.c output.c position.c prim.c prompt.c screen.c \
25	signal.c tags.c ttyin.c
26OBJS=	ch.o command.o decode.o help.o input.o line.o linenum.o main.o \
27	option.o os.o output.o position.o prim.o prompt.o screen.o \
28	signal.o tags.o ttyin.o
29MAN=	less.0
30
31all: less
32
33less: ${OBJS} ${LIBC}
34	${CC} -o $@ ${CFLAGS} ${OBJS} -ltermcap
35
36#funcs.h: ${SRCS}
37funcs.h:
38	awk -f mkfuncs.awk ${SRCS} > funcs.h
39
40clean:
41	rm -f ${OBJS} core less lesskey
42
43cleandir: clean
44	rm -f ${MAN} tags .depend
45
46depend: ${SRCS} funcs.h
47	mkdep ${CFLAGS} ${SRCS}
48
49install: ${MAN}
50	install -s -o bin -g bin -m 755 less ${DESTDIR}/usr/ucb/less
51	install -o bin -g bin -m 444 less.0 ${DESTDIR}/usr/man/cat1/less.0
52	install -c -o bin -g bin -m 444 less.help ${DESTDIR}/usr/lib/less.help
53
54lint: ${SRCS}
55	lint ${CFLAGS} ${SRCS}
56
57tags: ${SRCS}
58	ctags ${SRCS}
59