Subversion Repositories wimsdev

Rev

Rev 11652 | Rev 13448 | Go to most recent revision | 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
8185 bpr 43
	$(cc) -o $@ $(cflags) $(defines) -c $<
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
 
8616 bpr 113
wims: $(O) Lib/libwims.o libwims
8800 bpr 114
	$(cc) $(LDFLAGS) $(cflags) Lib/libwims.o $(O) $(lopt) -o wims
10 reyssat 115
	$(STRIP) wims
116
	./wims table
117
 
7436 bpr 118
setupwims:: wims wimslogd
3890 kbelabas 119
	./wims defaults > ../public_html/bases/sys/defaults.conf
8255 bpr 120
	./define.sh > ../public_html/bases/sys/define.conf
3890 kbelabas 121
	cp wims ../public_html/
122
	cp Changelog ../public_html/html
123
	chmod a+s ../public_html/wims
124
	rm -f ../public_html/wims.cgi ../tmp/log/wimslogd.pid ../sessions/.wimslogd
125
	ln -s wims ../public_html/wims.cgi
126
	../bin/update
127
	chmod a+rx ../public_html .
128
 
8616 bpr 129
libwims::
130
	cd Lib; make all
131
 
12095 georgesk 132
wimslogd::  lib$(libtype)
10 reyssat 133
	cd Wimslogd; make all
134
 
12095 georgesk 135
wimsd:: lib$(libtype)
10 reyssat 136
	-cd Wimsd; make all
137
 
12095 georgesk 138
oef2wims:: lib$(libtype)
8148 bpr 139
	cd OefMsg2wims; make oef2wims
10 reyssat 140
 
12095 georgesk 141
msg2wims:: lib$(libtype)
8148 bpr 142
	cd OefMsg2wims; make msg2wims
10 reyssat 143
 
12095 georgesk 144
interfaces:: lib$(libtype)
10 reyssat 145
	cd Interfaces; make all
146
 
12095 georgesk 147
misc:: lib$(libtype)
10 reyssat 148
	cd Misc; make all
11652 bpr 149
	mkdir -p $(wims_home)/public_html/gifs/WIMSchem
4953 bpr 150
	cp $(wims_home)/src/Misc/applets/WIMSchem/src/images/*.png $(wims_home)/public_html/gifs/WIMSchem/
10836 bpr 151
	##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 152
 
12095 georgesk 153
module:: lib$(libtype)
10 reyssat 154
	cd Module; make all
155
 
12095 georgesk 156
flydraw:: lib$(libtype)
10 reyssat 157
	cd Flydraw; make all
158
 
12095 georgesk 159
texgif:: lib$(libtype)
10 reyssat 160
	cd Texgif; make all
161
 
12095 georgesk 162
mathml:: lib$(libtype)
5521 bpr 163
	cd Mathml; make all ; make install
164
 
10 reyssat 165
libstatic::
166
	rm -f $(wims_home)/lib/libwims.so 2>/dev/null
167
	cd Lib; make static
168
 
4289 bpr 169
maintainer::
4355 bpr 170
#  make fonts (need convert, Tex)
10 reyssat 171
	./mkmathfonts
4355 bpr 172
#  need convert
4289 bpr 173
	$(wims_home)/public_html/scripts/data/spuzzle/makepieces
174
	$(wims_home)/public_html/scripts/data/qpuzzle/makepieces
4355 bpr 175
#  make icons and create icon css file (need convert, identify)
176
	$(wims_home)/public_html/gifs/themes/mkindex
4928 bpr 177
#  make circuits images in gifs/symbols
178
	$(wims_home)/public_html/scripts/data/circuits/mksymbols
6286 bpr 179
	cd $(wims_home)/public_html/themes ; ./mkcss.pl
10 reyssat 180
 
181
install::
182
	$(wims_home)/bin/wrapuid
183
 
3856 bpr 184
mkindex::
4289 bpr 185
	cd $(wims_home) ; bin/mkindex
8807 bpr 186
 
187
cleangcov::
188
	find . -name '*.gcno' -exec rm '{}' \;
189
	find . -name '*.gcda' -exec rm '{}' \;
190
	find . -name '*.gcov' -exec rm '{}' \;