summaryrefslogtreecommitdiff
path: root/dviware/umddvi/dvi/makefile
blob: 8bb89acff2a89c1b754a54ff40ce208159e8375d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Copyright (c) 1987 University of Maryland Department of Computer Science.
# All rights reserved.  Permission to copy for any purpose is hereby granted
# so long as this copyright notice remains intact.
#
# $Header: Makefile,v 1.2 87/06/16 17:19:18 chris Exp $
#
# Makefile for ctex/dvi (DVI-to-DVI conversion programs)
#
DESTDIR=
CFLAGS=	-O -R -I../h

# these are intended to be overridden by the definition in ../Makefile
# but just in case, it's included here too
BINDIR=	${DESTDIR}/usr/local/bin
MANDIR=	${DESTDIR}/usr/local/man

SRCS=	dviselect.c

all: dviselect

install: inst-dviselect

clean:
	rm -f core *.o dviselect *.bak

inst-dviselect: dviselect
	install -s dviselect ${BINDIR}/dviselect
	install -c -m 444 ../man/dviselect.1 ${MANDIR}/man1/dviselect.1

depend: ${SRCS}
	${CC} -M ${CFLAGS} ${SRCS} |\
	    awk '{ if ($$1 != prev) { if (rec != "" ) print rec;\
		rec = $$0; prev = $$1; }\
		else { if (length(rec $$2) > 78) { print rec; rec = $$0; }\
		else rec = rec " " $$2 } }\
		END { print rec }' >makedep
	echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
	echo '$$r makedep' >>eddep
	echo 'w' >>eddep
	cp Makefile Makefile.bak
	ed - Makefile <eddep
	rm eddep makedep
	echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >>Makefile
	echo '# see make depend above' >>Makefile

dviselect: dviselect.o ../lib/lib.a
	${CC} ${CFLAGS} -o dviselect dviselect.o ../lib/lib.a

lint: ${SRCS}
	lint -I../h -hbxuL ../lib/llib-lib dviselect.c

# DO NOT DELETE THIS LINE -- make depend uses it

dviselect.o: dviselect.c ../h/types.h ../h/dvi.h ../h/dviclass.h
dviselect.o: ../h/dvicodes.h ../h/fio.h ../h/search.h /usr/include/stdio.h
dviselect.o: /usr/include/ctype.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above