File: Makefile

package info (click to toggle)
cweb 3.4g-15
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 804 kB
  • ctags: 413
  • sloc: ansic: 2,247; lisp: 442; makefile: 188; sh: 4
file content (57 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (8)
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
#
# generic Makefile to use when you've got CWEB
# (add it to, or add to it, whatever you like)
#
#======================================================================

CFLAGS = -g
MLIB = -lm
RM = /bin/rm -f
WFILES = extex.w treeprint.w wc.w wmerge.w wordtest.w oemacs.w

#======================================================================

.SUFFIXES: .tex .dvi .w

.w.tex:
	cweave $*

.tex.dvi:	
	tex $<

.w.dvi:
	make $*.tex
	make $*.dvi

.w.c:
	ctangle $*

.w.o:
	make $*.c
	make $*.o

.c.o:
	cc $(CFLAGS) -c $*.c

.w:
	make $*.c
	cc $(CFLAGS) $*.c -o $*

#======================================================================

all: $(WFILES: .w=) excweb

excweb: extex
	ln extex excweb

oemacs: oemacs.c
	cc $(CFLAGS) -I/usr/openwin/include oemacs.c \
             -o oemacs -lxview -lolgx -lX11

doc: $(WFILES:.w=.dvi)

clean:
	$(RM) *~ \#~ .\#* *.o *.log *.dvi *.toc core a.out

clobber: clean
	$(RM) $(WFILES:.w=) $(WFILES:.w=.c) $(WFILES:.w=.tex)