Rev 13448 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
10 | reyssat | 1 | # @configure_input@ |
2 | |||
3828 | kbelabas | 3 | # Buildoption reminders. |
10 | reyssat | 4 | # withwimsd=@with_wimsd@ |
5 | |||
6 | wims_home=.. |
||
7 | PACKAGE_BUGREPORT=@PACKAGE_BUGREPORT@ |
||
8 | PACKAGE_NAME=@PACKAGE_NAME@ |
||
9 | PACKAGE_VERSION=@PACKAGE_VERSION@ |
||
10 | PACKAGE_STRING=@PACKAGE_STRING@ |
||
11 | cc=@CC@ |
||
12 | cflags=@CFLAGS@ -Wall |
||
6776 | georgesk | 13 | LDFLAGS=@LDFLAGS@ |
14 | CPPFLAGS=@CPPFLAGS@ |
||
15 | |||
10 | reyssat | 16 | cpp=@CPP@ |
17 | defines=@DEFINES@ |
||
18 | STRIP=@STRIP@ |
||
19 | rpath= |
||
20 | libtype=static |
||
21 | |||
22 | defs=$(defines) @D_CASE_INSENSITIVE_FS@ |
||
23 | NETLIBS=@NETLIBS@ |
||
24 | CRYPTLIB=@CRYPTLIB@ |
||
25 | lopt=-L$(wims_home)/lib $(NETLIBS) $(CRYPTLIB) -lwims -lm $(rpath) |
||
26 | |||
27 | wimsd=@BUILD_WIMSD@ |
||
8218 | bpr | 28 | O=auth.o calc.o cleaning.o compare.o config.o evalue.o exam.o exec.o files.o html.o insmath.o lines.o log.o mathfonts.o mathml.o matrix.o pedia.o rawmath.o score.o texmath.o test.o var.o variables.o wims.o |
10 | reyssat | 29 | |
8185 | bpr | 30 | |
4430 | bpr | 31 | all:: lib$(libtype) progs setupwims mkindex |
8165 | bpr | 32 | allwims:: lib$(libtype) progs setupwims |
6772 | georgesk | 33 | # that line is for the debian package: |
34 | all-debianpkg:: lib$(libtype) progs setupwims |
||
10 | reyssat | 35 | |
7436 | bpr | 36 | progs:: flydraw texgif mathml interfaces oef2wims msg2wims misc module $(wimsd) wimslogd wims |
10 | reyssat | 37 | |
38 | distconfig: configure.in |
||
3803 | kbelabas | 39 | autoconf |
40 | autoheader |
||
10 | reyssat | 41 | |
8218 | bpr | 42 | %.o: %.c *.h |
17887 | georgesk | 43 | $(cc) -o $@ $(cflags) $(CPPFLAGS) $(defines) -c $< |
8185 | bpr | 44 | |
10 | reyssat | 45 | clean:: |
8185 | bpr | 46 | rm -f wims *.o Common/*.o 2>/dev/null |
10 | reyssat | 47 | cd Wimsd; make clean |
48 | cd Wimslogd; make clean |
||
49 | cd Lib; make clean |
||
50 | cd Interfaces; make clean |
||
51 | cd Misc; make clean |
||
8148 | bpr | 52 | cd OefMsg2wims; make clean |
10 | reyssat | 53 | cd Flydraw; make clean |
54 | cd Texgif; make clean |
||
55 | cd Module; make clean |
||
5521 | bpr | 56 | cd Mathml; make clean |
8940 | bpr | 57 | make cleangcov |
6772 | georgesk | 58 | |
10 | reyssat | 59 | # preserves some generated files in log/, sessions/ and tmp/. Intended. |
60 | distclean:: |
||
3890 | kbelabas | 61 | rm -f wims wims.o Common/*.o $(wims_home)/public_html/wims |
62 | rm -f ../public_html/bases/sys/defaults.conf |
||
63 | rm -f ../public_html/html/Changelog |
||
3895 | bpr | 64 | rm -f ../log/classes/.teacher-cls |
65 | rm -f ../log/classes/.supervisor-supercls |
||
66 | rm -f ../log/classes/.supervisor-portal |
||
67 | rm -f ../log/classes/.teacher-supercls |
||
68 | rm -f ../log/classes/.teacher-portal |
||
69 | rm -f ../log/classes/.index |
||
10 | reyssat | 70 | cd Wimsd; make distclean |
71 | cd Wimslogd; make distclean |
||
72 | cd Lib; make distclean |
||
73 | cd Interfaces; make distclean |
||
74 | cd Misc; make distclean |
||
8148 | bpr | 75 | cd OefMsg2wims; make distclean |
10 | reyssat | 76 | cd Flydraw; make distclean |
77 | cd Texgif; make distclean |
||
78 | cd Module; make distclean |
||
79 | $(wims_home)/public_html/mathfonts/clean |
||
7436 | bpr | 80 | rm -rf autom4te.cache |
6780 | georgesk | 81 | rm -f config.h config.log config.status Makefile |
6772 | georgesk | 82 | # clean files which were installed in unusual fashions |
83 | rm -f ../bin/msg2wims |
||
84 | rm -f ../log/classes/.teacher-cls |
||
85 | rm -f ../log/classes/.supervisor-supercls |
||
86 | rm -f ../log/classes/.supervisor-portal |
||
87 | rm -f ../log/classes/.teacher-supercls |
||
88 | rm -f ../log/classes/.teacher-portal |
||
89 | rm -f ../other/bin/lceb_dynopt |
||
90 | rm -f ../public_html/bin/symtext |
||
91 | rm -f ../tmp/log/wimslogd.new |
||
92 | rm -f ../public_html/wims.cgi |
||
93 | rm -f ../log/unsecure |
||
94 | rm -f ../log/update-version |
||
95 | rm -f ../log/classes/.index |
||
96 | rm -f ../public_html/html/Changelog |
||
97 | rm -f ../public_html/scripts/help/cn/flydraw.phtml |
||
98 | rm -f ../public_html/scripts/help/en/flydraw.phtml |
||
99 | rm -f ../public_html/scripts/help/fr/flydraw.phtml |
||
100 | # clean files which should be removed by some other Makefile |
||
101 | rm -f Misc/checkmol/checkmol |
||
102 | rm -f Misc/lceb/lceb_dynopt |
||
103 | rm -f Misc/lceb/lceb_dyn |
||
104 | rm -f Misc/lceb/lceb_rec |
||
105 | rm -f Misc/lceb/lceb_bigsum |
||
106 | rm -f Misc/lceb/lceb_easiest |
||
107 | rm -f Misc/symtext/symtext |
||
108 | rm -f Misc/passcrypt |
||
109 | rm -f Flydraw/nametab.c |
||
110 | find . -name Makefile | xargs rm -f |
||
111 | find .. -name .wimshome | xargs rm -f |
||
10 | reyssat | 112 | |
13448 | georgesk | 113 | # This target is specific for builds launched during debian packaging. |
114 | # As an official debian package must always be built from bare sources, |
||
115 | # calling distclean is mandatory. However rebuilding the complete set |
||
116 | # of images used to render formulas (in non-mathml mode) is expensive, |
||
117 | # and GIF files can be considered as harmless binaries, since they are |
||
118 | # data rather than code. Also, each of those files is human-readable |
||
119 | # (it is a character, rendered at some scale), so the call to |
||
120 | # mathfonts/clean can be disabled. |
||
121 | distclean_debuild:: |
||
122 | rm -f wims wims.o Common/*.o $(wims_home)/public_html/wims |
||
123 | rm -f ../public_html/bases/sys/defaults.conf |
||
124 | rm -f ../public_html/html/Changelog |
||
125 | rm -f ../log/classes/.teacher-cls |
||
126 | rm -f ../log/classes/.supervisor-supercls |
||
127 | rm -f ../log/classes/.supervisor-portal |
||
128 | rm -f ../log/classes/.teacher-supercls |
||
129 | rm -f ../log/classes/.teacher-portal |
||
130 | rm -f ../log/classes/.index |
||
131 | cd Wimsd; make distclean |
||
132 | cd Wimslogd; make distclean |
||
133 | cd Lib; make distclean |
||
134 | cd Interfaces; make distclean |
||
135 | cd Misc; make distclean |
||
136 | cd OefMsg2wims; make distclean |
||
137 | cd Flydraw; make distclean |
||
138 | cd Texgif; make distclean |
||
139 | cd Module; make distclean |
||
140 | ## DISABLED ## $(wims_home)/public_html/mathfonts/clean |
||
141 | rm -rf autom4te.cache |
||
142 | rm -f config.h config.log config.status Makefile |
||
143 | # clean files which were installed in unusual fashions |
||
144 | rm -f ../bin/msg2wims |
||
145 | rm -f ../log/classes/.teacher-cls |
||
146 | rm -f ../log/classes/.supervisor-supercls |
||
147 | rm -f ../log/classes/.supervisor-portal |
||
148 | rm -f ../log/classes/.teacher-supercls |
||
149 | rm -f ../log/classes/.teacher-portal |
||
150 | rm -f ../other/bin/lceb_dynopt |
||
151 | rm -f ../public_html/bin/symtext |
||
152 | rm -f ../tmp/log/wimslogd.new |
||
153 | rm -f ../public_html/wims.cgi |
||
154 | rm -f ../log/unsecure |
||
155 | rm -f ../log/update-version |
||
156 | rm -f ../log/classes/.index |
||
157 | rm -f ../public_html/html/Changelog |
||
158 | rm -f ../public_html/scripts/help/cn/flydraw.phtml |
||
159 | rm -f ../public_html/scripts/help/en/flydraw.phtml |
||
160 | rm -f ../public_html/scripts/help/fr/flydraw.phtml |
||
161 | # clean files which should be removed by some other Makefile |
||
162 | rm -f Misc/checkmol/checkmol |
||
163 | rm -f Misc/lceb/lceb_dynopt |
||
164 | rm -f Misc/lceb/lceb_dyn |
||
165 | rm -f Misc/lceb/lceb_rec |
||
166 | rm -f Misc/lceb/lceb_bigsum |
||
167 | rm -f Misc/lceb/lceb_easiest |
||
168 | rm -f Misc/symtext/symtext |
||
169 | rm -f Misc/passcrypt |
||
170 | rm -f Flydraw/nametab.c |
||
171 | find . -name Makefile | xargs rm -f |
||
172 | find .. -name .wimshome | xargs rm -f |
||
173 | |||
8616 | bpr | 174 | wims: $(O) Lib/libwims.o libwims |
8800 | bpr | 175 | $(cc) $(LDFLAGS) $(cflags) Lib/libwims.o $(O) $(lopt) -o wims |
10 | reyssat | 176 | $(STRIP) wims |
177 | ./wims table |
||
178 | |||
7436 | bpr | 179 | setupwims:: wims wimslogd |
3890 | kbelabas | 180 | ./wims defaults > ../public_html/bases/sys/defaults.conf |
8255 | bpr | 181 | ./define.sh > ../public_html/bases/sys/define.conf |
3890 | kbelabas | 182 | cp wims ../public_html/ |
183 | cp Changelog ../public_html/html |
||
184 | chmod a+s ../public_html/wims |
||
185 | rm -f ../public_html/wims.cgi ../tmp/log/wimslogd.pid ../sessions/.wimslogd |
||
186 | ln -s wims ../public_html/wims.cgi |
||
187 | ../bin/update |
||
188 | chmod a+rx ../public_html . |
||
189 | |||
8616 | bpr | 190 | libwims:: |
191 | cd Lib; make all |
||
192 | |||
12095 | georgesk | 193 | wimslogd:: lib$(libtype) |
10 | reyssat | 194 | cd Wimslogd; make all |
195 | |||
12095 | georgesk | 196 | wimsd:: lib$(libtype) |
10 | reyssat | 197 | -cd Wimsd; make all |
198 | |||
12095 | georgesk | 199 | oef2wims:: lib$(libtype) |
8148 | bpr | 200 | cd OefMsg2wims; make oef2wims |
10 | reyssat | 201 | |
12095 | georgesk | 202 | msg2wims:: lib$(libtype) |
8148 | bpr | 203 | cd OefMsg2wims; make msg2wims |
10 | reyssat | 204 | |
12095 | georgesk | 205 | interfaces:: lib$(libtype) |
10 | reyssat | 206 | cd Interfaces; make all |
207 | |||
12095 | georgesk | 208 | misc:: lib$(libtype) |
10 | reyssat | 209 | cd Misc; make all |
11652 | bpr | 210 | mkdir -p $(wims_home)/public_html/gifs/WIMSchem |
4953 | bpr | 211 | cp $(wims_home)/src/Misc/applets/WIMSchem/src/images/*.png $(wims_home)/public_html/gifs/WIMSchem/ |
10836 | bpr | 212 | ##cat $(wims_home)/src/Misc/canvasdraw/canvasdraw.html | sed 's/<\/html>//' | sed 's/<\/body>//' | sed 's/<\/center>//'|sed 's/<center>//'| sed 's/<h3>/<h2 class="wimscenter">/' | sed 's/\/h3>/\/h2>/g' | tail +10 > $(wims_home)/public_html/scripts/help/en/canvasdraw.phtml |
10 | reyssat | 213 | |
12095 | georgesk | 214 | module:: lib$(libtype) |
10 | reyssat | 215 | cd Module; make all |
216 | |||
12095 | georgesk | 217 | flydraw:: lib$(libtype) |
10 | reyssat | 218 | cd Flydraw; make all |
219 | |||
12095 | georgesk | 220 | texgif:: lib$(libtype) |
10 | reyssat | 221 | cd Texgif; make all |
222 | |||
12095 | georgesk | 223 | mathml:: lib$(libtype) |
5521 | bpr | 224 | cd Mathml; make all ; make install |
225 | |||
10 | reyssat | 226 | libstatic:: |
227 | rm -f $(wims_home)/lib/libwims.so 2>/dev/null |
||
228 | cd Lib; make static |
||
229 | |||
4289 | bpr | 230 | maintainer:: |
4355 | bpr | 231 | # make fonts (need convert, Tex) |
10 | reyssat | 232 | ./mkmathfonts |
4355 | bpr | 233 | # need convert |
4289 | bpr | 234 | $(wims_home)/public_html/scripts/data/spuzzle/makepieces |
235 | $(wims_home)/public_html/scripts/data/qpuzzle/makepieces |
||
4355 | bpr | 236 | # make icons and create icon css file (need convert, identify) |
237 | $(wims_home)/public_html/gifs/themes/mkindex |
||
4928 | bpr | 238 | # make circuits images in gifs/symbols |
239 | $(wims_home)/public_html/scripts/data/circuits/mksymbols |
||
6286 | bpr | 240 | cd $(wims_home)/public_html/themes ; ./mkcss.pl |
10 | reyssat | 241 | |
242 | install:: |
||
243 | $(wims_home)/bin/wrapuid |
||
244 | |||
3856 | bpr | 245 | mkindex:: |
4289 | bpr | 246 | cd $(wims_home) ; bin/mkindex |
8807 | bpr | 247 | |
248 | cleangcov:: |
||
249 | find . -name '*.gcno' -exec rm '{}' \; |
||
250 | find . -name '*.gcda' -exec rm '{}' \; |
||
251 | find . -name '*.gcov' -exec rm '{}' \; |