-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
109 lines (88 loc) · 2.94 KB
/
Makefile
File metadata and controls
109 lines (88 loc) · 2.94 KB
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
-include CONFIGURE
CFLAGS ?= -Wall -ILAProof/C/include
LDOC= lua util/ldoc.lua
DOCS= docs/quadrules.qmd \
docs/shapes.qmd \
docs/mesh.qmd \
docs/matrix.qmd \
docs/fem.qmd \
docs/element.qmd
OBJS= obj/alloc.o \
obj/quadrules.o \
obj/shapes.o \
obj/densemat.o \
obj/bandmat.o \
obj/mesh.o \
obj/matrix.o \
obj/fem.o \
obj/element.o
TESTS= exe/test_quad.x \
exe/test_shapes.x \
exe/test_mesh.x \
exe/test_densemat.x \
exe/test_bandmat.x \
exe/test_assemble.x \
exe/test_fem1d.x \
exe/test_fem2d.x
.PHONY: all doc test depend clean
all:
objs: $(OBJS)
obj/alloc.o: LAProof/C/src/alloc.c
$(CC) $(CFLAGS) -c $< -o $@
obj/densemat.o: LAProof/C/src/densemat.c
$(CC) $(CFLAGS) -c $< -o $@
obj/bandmat.o: LAProof/C/src/bandmat.c
$(CC) $(CFLAGS) -c $< -o $@
obj/%.o: src/%.c
$(CC) $(CFLAGS) -c $< -o $@
obj/%.o: test/%.c
$(CC) $(CFLAGS) -Isrc -c $< -o $@
exe/%.x: obj/%.o $(OBJS)
$(CC) $(CFLAGS) -o $@ $^
docs/%.qmd: src/%.h src/%.c
$(LDOC) -highlight c -p quarto -o $@ $^
docs/index.html: docs/index.qmd $(DOCS)
( cd docs ; quarto render index.qmd --to html )
docs/index.pdf: docs/index.qmd $(DOCS)
( cd docs ; quarto render index.qmd --to pdf )
doc: docs/index.pdf docs/index.html
DOCFILES= index_files index.html index.pdf
publish: docs/index.pdf docs/index.html
echo "THIS PUBLISHES ONLY THE C PROGRAM. To publish the proofs: cd proof; make publish"
cd gh-pages; git submodule update
cd gh-pages; git rm -rf $(DOCFILES)
cd docs; cp -R $(DOCFILES) ../gh-pages
cd gh-pages; git add $(DOCFILES); git commit -m "Publishing C program"
cd gh-pages; git push
# ( cd docs ; quarto publish gh-pages index.qmd )
test: $(TESTS)
( for f in exe/test*.x ; do echo "Running test" $$f; $$f ; done )
depend:
makedepend -Isrc src/*.c src/*.h test/*.c
clean:
rm -f src/*~ test/*~ Makefile.bak
rm -f $(TESTS) $(OBJS) $(DOCS)
# Generated by makedepend
# DO NOT DELETE
src/matrix.o: src/matrix.h src/densemat.h src/bandmat.h
src/bandmat.o: src/densemat.h src/bandmat.h
src/densemat.o: src/densemat.h
src/element.o: src/shapes.h src/quadrules.h src/matrix.h src/densemat.h
src/element.o: src/bandmat.h src/mesh.h src/fem.h src/element.h
src/fem.o: src/alloc.h src/matrix.h src/densemat.h src/bandmat.h
src/fem.o: src/element.h src/mesh.h src/shapes.h src/fem.h
src/mesh.o: src/densemat.h src/mesh.h src/shapes.h
src/quadrules.o: src/quadrules.h
src/shapes.o: src/shapes.h
src/matrix.o: src/densemat.h src/bandmat.h
src/mesh.o: src/shapes.h
test/test_assemble.o: src/densemat.h src/bandmat.h src/matrix.h
test/test_bandmat.o: src/densemat.h src/bandmat.h
test/test_densemat.o: src/densemat.h
test/test_fem1d.o: src/densemat.h src/bandmat.h src/mesh.h src/shapes.h
test/test_fem1d.o: src/matrix.h src/element.h src/fem.h
test/test_fem2d.o: src/densemat.h src/bandmat.h src/mesh.h src/shapes.h
test/test_fem2d.o: src/matrix.h src/element.h src/fem.h
test/test_mesh.o: src/mesh.h src/shapes.h
test/test_quad.o: src/quadrules.h
test/test_shapes.o: src/densemat.h src/shapes.h