summaryrefslogtreecommitdiff
path: root/dviware/umddvi/dev/makefile.3b
blob: 487370252d6b48baef5750d905716b683c5eddda (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Makefile for device conversion programs
#
# You must run "make conf" to set up Makefile.local if you do not want
# the default `all' configuration (see the file "conf.sh").
DESTDIR=
CFLAGS=	-g -I../h -Dsys5
MAKE=	make
MCC=dmdcc
MCFLAGS= -g

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

# Make options
OPTS=	BINDIR=${BINDIR} MANDIR=${MANDIR} DESTDIR=${DESTDIR} CC="${CC}" \
	CFLAGS="${CFLAGS}" ${MFLAGS}

SRCS=	imagen1.c imagen1-sp.c verser1.c verser2.c dmd.c dmdhost.c dmd-sp.c

# First, the main entry used in the original Makefile.
# It is also enabled by a `conf none'; this is just so that the
# configurer will disable it in Makefile.local.
# Whenever you run `make' afterward, this entry will run
# make on your local Makefile.

# conf none
# first:
# 	@if [ -f Makefile.local ]; then :; else \
# 		echo "You should run \`make conf' first!"; \
# 		echo \
# "I will give you the default \`all' configuration for now."; \
# 		sh conf.sh all; \
# 	fi
# 	@${MAKE} -f Makefile.local ${OPTS}
# endconf none

# In Makefile.local, this is the default (if you just say `make').
# The `make' invocation will be commented out there.
all:
# conf none
# 	@${MAKE} -f Makefile.local ${OPTS} $@
# endconf none

# Likewise, but for `make install'.
install:
# conf none
# 	@${MAKE} -f Makefile.local ${OPTS} $@
# endconf none

# conf imagen
all: imagen1 dvidmd dvidmd.j dvidmd.m
install: inst-iptex inst-imagen1
# endconf imagen

# conf versatec
# all: verser1 verser2
# install: inst-dvipr inst-verser1 inst-verser2
# endconf versatec

# The rest of these are copied to Makefile.local, though many are
# unused.
conf:
	@sh conf.sh
	@echo "Remember to use \`make update' if you change the Makefile!"

clean:
	rm -f core *.o verser1 verser2 imagen1 dvidmd dvidmd.[jm]

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
	sh conf.sh update

update:
	@sh conf.sh update

inst-dvipr:
	install -c dvipr.sh ${BINDIR}/dvipr
	install -c -m 444 ../man/dvipr.1 ${MANDIR}/man1/dvipr.1
inst-verser1: verser1
	install -s verser1 ${BINDIR}/verser1
inst-verser2: verser2
	install -s verser2 ${BINDIR}/verser2

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

lint: ${SRCS}
	lint -hbxuL ../lib/llib-lib imagen1.c
	lint -hbxuL ../lib/llib-lib verser1.c
	lint -hbxuL ../lib/llib-lib verser2.c

dist:
	rm -f Makefile.bak Makefile.local Makefile.l.bak
	sh conf.sh all

dvidmd: dmd.o dmdhost.o dmd-sp.o
	${CC} ${CFLAGS} -o dvidmd dmd.o dmdhost.o dmd-sp.o ../lib/lib.a /usr/local/lib/libcompat.a -lm

dvidmd.m: dmdslave.c
	$(MCC) $(MCFLAGS) -o dvidmd.m dmdslave.c

dvidmd.j: dmdslave.c
	$(MCC) -J $(MCFLAGS) -o dvidmd.j dmdslave.c

imagen1: imagen1.o imagen1-sp.o
verser1: verser1.o
verser2: verser2.o

imagen1: ../lib/lib.a
	${CC} ${CFLAGS} -o imagen1 imagen1.o imagen1-sp.o ../lib/lib.a /usr/local/lib/libcompat.a -lm

imagen1 verser1 verser2: ../lib/lib.a
	${CC} ${CFLAGS} -o $@ $@.o ../lib/lib.a /usr/local/lib/libcompat.a

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

imagen1.o: imagen1.c /usr/include/stdio.h ../h/types.h ../h/conv.h ../h/dvi.h
imagen1.o: ../h/dviclass.h ../h/dvicodes.h ../h/fio.h ../h/font.h
imagen1.o: ../h/postamble.h ../h/search.h ../h/imagen.h ../h/imPcodes.h
verser1.o: verser1.c /usr/include/stdio.h ../h/types.h ../h/conv.h ../h/dvi.h
verser1.o: ../h/dviclass.h ../h/dvicodes.h ../h/fio.h ../h/font.h
verser1.o: ../h/postamble.h ../h/search.h ../h/verser.h
verser2.o: verser2.c /usr/include/errno.h /usr/include/setjmp.h
verser2.o: /usr/include/stdio.h /usr/include/sys/vcmd.h
verser2.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h
verser2.o: /usr/include/sys/ttydev.h ../h/types.h ../h/conv.h ../h/fio.h
verser2.o: ../h/font.h ../h/verser.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above