File: Makefile

package info (click to toggle)
et 80b2-8
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 1,068 kB
  • ctags: 1,074
  • sloc: ansic: 10,313; tcl: 2,633; makefile: 179; sh: 19
file content (147 lines) | stat: -rw-r--r-- 3,607 bytes parent folder | download | duplicates (2)
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
# Generated automatically from Makefile.in by configure.
#
# This is the Makefile for ET.  If its name is Makefile.in, then it is
# a template for the makefile and must first be processed using the
# "configure" script
#

#
# Name of the ET library source file
#
ET_SRC = et80.c

#
# Flags passed to the "et2c" program
#
ET2CFLAGS = 
# ET2CFLAGS = -dynamic

#
# Flags for the C compiler
#
CFLAGS = -O  -I/home/drh/tcltk/tcl8.0/generic -I/home/drh/tcltk/tk8.0/generic

CC = cc
LIBS =  -ltk8.0 -ltcl8.0 -ldl  -L/home/drh/tcltk/tcl8.0/unix -L/home/drh/tcltk/tk8.0/unix -L/usr/X11R6/lib -lX11 -lm -lc

all:	et2c et.o examples docs

docs:	
	@cd doc; make

examples:	bell browser color dclock etwish fontchooser hello \
                httpd runscript tkdiff tkedit

et.o:	${ET_SRC} et2c
	./et2c ${ET2CFLAGS} -I/home/drh/tcltk/tcl8.0/library -I/home/drh/tcltk/tk8.0/library ${ET_SRC} >et.c
	${CC} ${CFLAGS} -c et.c -o $@

et2c:	et2c.c
	${CC} ${CFLAGS} -o $@ et2c.c

bell:	bell.o et.o
	${CC} ${CFLAGS} -o $@ bell.o et.o ${LIBS}

bell.o:	bell.c et2c
	./et2c ${ET2CFLAGS} bell.c >temp.c
	${CC} ${CFLAGS} -c temp.c -o $@
	rm -f temp.c
	
browser:	browser.o et.o
	${CC} ${CFLAGS} -o $@ browser.o et.o ${LIBS}

browser.o:	browser.c et2c browser.tcl
	./et2c ${ET2CFLAGS} browser.c >temp.c
	${CC} ${CFLAGS} -c temp.c -o $@
	rm -f temp.c
	
help2tk:	help2tk.c
	${CC} ${CFLAGS} -o $@ help2tk.c

color:	color.o et.o
	${CC} ${CFLAGS} -o $@ color.o et.o ${LIBS}

color.o:	color.c color.tcl colorhelp.tcl et2c
	./et2c ${ET2CFLAGS} color.c >temp.c
	${CC} ${CFLAGS} -c temp.c -o $@
	rm -f temp.c

colorhelp.tcl:	color.help help2tk
	./help2tk color.help >colorhelp.tcl

dclock:	dclock.c et2c et.o
	./et2c ${ET2CFLAGS} dclock.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

etwish:	etwish.c et2c et.o
	./et2c ${ET2CFLAGS} etwish.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

fontchooser:	fontchooser.c fontchooser.tcl et2c et.o
	./et2c ${ET2CFLAGS} fontchooser.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

hello:	hello.c et2c et.o
	./et2c ${ET2CFLAGS} hello.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

httpd:	httpd.c httpd.tcl et2c et.o
	./et2c ${ET2CFLAGS} httpd.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

linuxstat:	linuxstat.c linuxstat.tcl et2c et.o
	./et2c ${ET2CFLAGS} linuxstat.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

runscript:	runscript.c et2c et.o
	./et2c ${ET2CFLAGS} runscript.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

tkdiff:	tkdiff.c tkdiff.tcl et2c et.o
	./et2c ${ET2CFLAGS} tkdiff.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

tkedit:	tkedit.c tkedit.tcl et2c et.o
	./et2c ${ET2CFLAGS} tkedit.c >temp.c
	${CC} ${CFLAGS} -o $@ temp.c et.o ${LIBS}
	rm -f temp.c

tkterm:	tkterm.o getpty.o et.o
	${CC} ${CFLAGS} -o $@ tkterm.o getpty.o et.o ${LIBS}

tkterm.o:	tkterm.c tkterm.tcl et2c
	./et2c ${ET2CFLAGS} tkterm.c >temp.c
	${CC} ${CFLAGS} -c temp.c -o $@
	rm -f temp.c

getpty.o:	getpty.c
	${CC} ${CFLAGS} -c getpty.c -o $@

Makefile:	Makefile.in
	$(SHELL) config.status

localclean:
	rm -f *.a *.o et.c core errs *~ \#* TAGS *.E a.out errors \
		et2c bell browser color colorhelp.tcl help2tk \
		dclock etwish fontchooser hello httpd linuxstat runscript \
		tkdiff tkedit tkterm

clean:	localclean
	@cd doc; make clean

distclean: localclean
	rm -f Makefile config.status config.cache config.log prototype
	@cd doc; make distclean

dist:	
	cd ..; \
	tar cf et1.7/et17.tar `cat et1.7/filelist | sed 's,^,et1.7/,'`
	gzip et17.tar