Basilisk source code (http://basilisk.fr/src/)

root / src / Makefile

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
CFLAGS += -O2

# these are not tests
EXCLUDE = qcc.c include.c rotate.c qplot.c bview-server.c

all: links qcc qplot libkdt literatec draw_get.h
	@chmod +x ppm2mpeg ppm2mp4 ppm2ogv ppm2gif runtest \
		sequence bview.page bppm page2html
	@test -f xyz2kdt || ln -s kdt/xyz2kdt
	@test -f kdtquery || ln -s kdt/kdtquery

bview-servers: bview-server2D bview-server3D bview2D bview3D

libkdt:
	cd kdt && make

literatec:
	cd plugins && make literate-c codeblock

qcc: qcc.c include.o rotate.o config
	$(CC) $(CFLAGS) -DLIBDIR=\"`pwd`\" \
		-DCC99="\"$(CC99)\"" \
		-DCPP99="\"$(CPP99)\"" \
		-DCADNACC="\"$(CADNACC)\"" \
		-DBASILISK="\"$(BASILISK)\"" \
		qcc.c include.o rotate.o -o qcc

rotate.c: rotate.lex
	flex -P rot -o rotate.c rotate.lex

rotate: rotate.c
	$(CC) $(CFLAGS) -DTEST rotate.c -o rotate

rotate.o: rotate.c
	$(CC) $(CFLAGS) -c rotate.c

include.o: include.c
	$(CC) $(CFLAGS) -DLIBDIR=\"`pwd`\" -c include.c

qplot.o: qplot.c
	$(CC) $(CFLAGS) -c qplot.c

qplot: qplot.o
	$(CC) $(CFLAGS) qplot.o -o qplot

draw_get.h: draw.h params.awk
	awk -f params.awk < draw.h > draw_get.h

bview-server2D.d: bview-server.c qcc
	qcc -MD -o $@ $<

bview-server2D: bview-server.c bview-server2D.d draw_get.h
	qcc $(CFLAGS) bview-server.c -o $@ -Lgl -lglutils $(OPENGLIBS) -lm

bview-server3D.d: bview-server.c qcc
	qcc -grid=octree -MD -o $@ $<

bview-server3D: bview-server.c bview-server3D.d draw_get.h
	qcc -grid=octree $(CFLAGS) bview-server.c -o $@ \
		-Lgl -lglutils $(OPENGLIBS) -lm

bview2D:
	ln -s bview.page bview2D

bview3D:
	ln -s bview.page bview3D

include.c: include.lex
	flex -P inc -o include.c include.lex

qcc.c: qcc.lex Makefile
	flex -o qcc.c qcc.lex

alltags:
	cd navier-stokes && make tags
	cd ehd && make tags
	cd examples && make tags
	cd test && make tags
	make tags
	cd navier-stokes && make itags
	cd ehd && make itags
	cd examples && make itags
	cd test && make itags
	make itags

etags:
	etags *.h grid/*.h

allhtml: alltags
	for f in `find . -name '*.page'`; do 				\
		( cd `dirname $$f` && make -f $(BASILISK)/Makefile.defs \
			`basename $$f .page`.html ); 			\
	done;

checklinks:
	$(LINKCHECKER) 	$(BASILISK_URL)/src/README 		\
			$(BASILISK_URL)/src/test/README 	\
			$(BASILISK_URL)/src/examples/README | 	\
		tee checklinks.log

checklinksfast:
	wget --spider -nd -nv -r					\
		-X sandbox -X src/cgi-bin				\
			$(BASILISK_URL)/src/README 			\
			$(BASILISK_URL)/src/test/README 		\
			$(BASILISK_URL)/src/examples/README 2>&1 | 	\
		grep -v ^unlink: | tee checklinks.log

changelog:
	darcs changes > ChangeLog

dist:
	darcs dist

diff:
	cd .. && tar czvf src/diff.tgz `darcs whatsnew -s | \
		sed 's/. .\/.*\/$$//g' | awk '{print $$2}'`

-include bview-server3D.d
-include bview-server2D.d

include $(BASILISK)/Makefile.defs