1: ldadd_libncurses = $(top_builddir)/tools/@NCURSES@/lib/libncurses.a
2: include_libncurses = -I$(top_builddir)/tools/@NCURSES@/include \
3: -I$(top_srcdir)/tools/@NCURSES@/include
4:
5: ldadd_libhistory = $(top_builddir)/tools/@READLINE@/libhistory.a
6: ldadd_libreadline = $(top_builddir)/tools/@READLINE@/libreadline.a
7: include_libreadline = -I$(top_srcdir)/tools/@READLINE@ \
8: -I$(top_builddir)/tools/@READLINE@ -DREADLINE_LIBRARY
9:
10: ldadd_libgsl = $(top_builddir)/tools/@GSL@/.libs/libgsl.a
11: include_libgsl = -I$(top_builddir)/tools/@GSL@
12:
13: ldadd_libiconv = $(top_builddir)/tools/@ICONV@/lib/.libs/libiconv.a
14: include_libiconv = -I$(top_builddir)/tools/@ICONV@/include
15:
16: ldadd_libcrypto = $(top_builddir)/tools/@OPENSSL@/libcrypto.a
17: ldadd_libssl = $(top_builddir)/tools/@OPENSSL@/libssl.a
18: include_libcrypto = -I$(top_builddir)/tools/@OPENSSL@/include
19:
20: ldadd_libsqlite = $(top_builddir)/tools/@SQLITE@/.libs/libsqlite3.a
21: include_libsqlite = -I$(top_srcdir)/tools/@SQLITE@
22:
23: date = -Dd_date_rpl="\"$(shell LC_ALL=fr_FR date +'%A %x, %X %Z' | \
24: $(AWK) '{ v=$$0; gsub(/^[ \t]+/, "", v); gsub(/[ \t]+$$/, "", v); \
25: printf("%s\n", v);}')\"" \
26: -Dd_date_en_rpl="\"$(shell LC_ALL=C date +'%A %x, %X %Z' | \
27: $(AWK) '{ v=$$0; gsub(/^[ \t]+/, "", v); gsub(/[ \t]+$$/, "", v); \
28: printf("%s\n", v);}')\""
29:
30:
31: hash = -Drplpp_md5="\"$(shell $(top_builddir)/rplsums/rplmd5sum$(EXEEXT) \
32: $(top_builddir)/tools/@GPP@/src/gpp$(EXEEXT))\"" \
33: -Drplpp_sha1="\"$(shell $(top_builddir)/rplsums/rplsha1sum$(EXEEXT) \
34: $(top_builddir)/tools/@GPP@/src/gpp$(EXEEXT))\"" \
35: -Drplfile_md5="\"$(shell $(top_builddir)/rplsums/rplmd5sum$(EXEEXT) \
36: $(top_builddir)/tools/@FILE@/src/rplfile$(EXEEXT))\"" \
37: -Drplfile_sha1="\"$(shell $(top_builddir)/rplsums/rplsha1sum$(EXEEXT) \
38: $(top_builddir)/tools/@FILE@/src/rplfile$(EXEEXT))\"" \
39: -Drpliconv_md5="\"$(shell $(top_builddir)/rplsums/rplmd5sum$(EXEEXT) \
40: $(top_builddir)/rpliconv/rpliconv$(EXEEXT))\"" \
41: -Drpliconv_sha1="\"$(shell $(top_builddir)/rplsums/rplsha1sum$(EXEEXT) \
42: $(top_builddir)/rpliconv/rpliconv$(EXEEXT))\"" \
43: -Drplawk_md5="\"$(shell $(top_builddir)/rplsums/rplmd5sum$(EXEEXT) \
44: $(top_builddir)/rplawk/rplawk$(EXEEXT))\"" \
45: -Drplawk_sha1="\"$(shell $(top_builddir)/rplsums/rplsha1sum$(EXEEXT) \
46: $(top_builddir)/rplawk/rplawk$(EXEEXT))\"" \
47: -Drplconvert_md5="\"$(shell $(top_builddir)/rplsums/rplmd5sum$(EXEEXT) \
48: $(top_builddir)/tools/@UNITS@/units$(EXEEXT))\"" \
49: -Drplconvert_sha1="\"$(shell $(top_builddir)/rplsums/rplsha1sum$(EXEEXT) \
50: $(top_builddir)/tools/@UNITS@/units$(EXEEXT))\""
51:
52: SRCC=\
53: algebre_lineaire1.c\
54: algebre_lineaire2.c\
55: algebre_lineaire3.c\
56: algebre_lineaire4.c\
57: analyse.c\
58: analyse_notation_algebrique.c\
59: analyse_notation_rpn.c\
60: asprintf.c\
61: bibliotheques_externes.c\
62: calcul_differentiel.c\
63: calcul_integral.c\
64: chainage.c\
65: compilation.c\
66: completion.c\
67: controle.c \
68: daemon.c\
69: date.c\
70: depassements.c\
71: dft.c\
72: encart.c\
73: evaluation.c\
74: fonctions_trigonometriques.c\
75: formateur.c\
76: formateur_fichiers.c\
77: formateur_flux.c\
78: fusible.c\
79: generateurs_aleatoires.c\
80: gestion_fichiers.c\
81: gestion_interruptions.c\
82: gestion_niveaux.c\
83: gestion_objets.c\
84: gestion_pile.c\
85: gestion_pile_last.c\
86: gestion_pile_systeme.c\
87: gestion_processus.c\
88: gestion_threads.c\
89: gestion_variables.c\
90: gestion_variables_statiques.c\
91: gestion_variables_partagees.c\
92: getaddrinfo.c\
93: indicateurs.c\
94: instructions_a1.c\
95: instructions_a2.c\
96: instructions_a3.c\
97: instructions_a4.c\
98: instructions_a5.c\
99: instructions_b1.c\
100: instructions_c1.c\
101: instructions_c2.c\
102: instructions_c3.c\
103: instructions_c4.c\
104: instructions_c5.c\
105: instructions_c6.c\
106: instructions_c7.c\
107: instructions_d1.c\
108: instructions_d2.c\
109: instructions_d3.c\
110: instructions_d4.c\
111: instructions_d5.c\
112: instructions_d6.c\
113: instructions_e1.c\
114: instructions_e2.c\
115: instructions_e3.c\
116: instructions_e4.c\
117: instructions_f1.c\
118: instructions_f2.c\
119: instructions_f3.c\
120: instructions_f4.c\
121: instructions_g1.c\
122: instructions_g2.c\
123: instructions_g3.c\
124: instructions_g4.c\
125: instructions_h1.c\
126: instructions_h2.c\
127: instructions_i1.c\
128: instructions_i2.c\
129: instructions_i3.c\
130: instructions_i4.c\
131: instructions_j1.c\
132: instructions_k1.c\
133: instructions_l1.c\
134: instructions_l2.c\
135: instructions_l3.c\
136: instructions_l4.c\
137: instructions_l5.c\
138: instructions_m1.c\
139: instructions_m2.c\
140: instructions_m3.c\
141: instructions_m4.c\
142: instructions_m5.c\
143: instructions_n1.c\
144: instructions_n2.c\
145: instructions_o1.c\
146: instructions_o2.c\
147: instructions_p1.c\
148: instructions_p2.c\
149: instructions_p3.c\
150: instructions_p4.c\
151: instructions_p5.c\
152: instructions_p6.c\
153: instructions_p7.c\
154: instructions_q1.c\
155: instructions_r1.c\
156: instructions_r2.c\
157: instructions_r3.c\
158: instructions_r4.c\
159: instructions_r5.c\
160: instructions_r6.c\
161: instructions_s1.c\
162: instructions_s2.c\
163: instructions_s3.c\
164: instructions_s4.c\
165: instructions_s5.c\
166: instructions_s6.c\
167: instructions_s7.c\
168: instructions_s8.c\
169: instructions_s9.c\
170: instructions_s10.c\
171: instructions_t1.c\
172: instructions_t2.c\
173: instructions_t3.c\
174: instructions_u1.c\
175: instructions_v1.c\
176: instructions_v2.c\
177: instructions_w1.c\
178: instructions_w2.c\
179: instructions_x1.c\
180: instructions_x2.c\
181: instructions_y1.c\
182: interface_gnuplot.c\
183: interface_tex.c\
184: interruptions.c\
185: messages.c\
186: occupation_memoire.c\
187: operations_atomiques.c\
188: operations_binaires.c\
189: optimisation.c\
190: profilage.c\
191: rpl.c\
192: rplcore.c\
193: semaphores.c\
194: sequenceur.c\
195: siginfo.c\
196: simplification.c\
197: sommations.c\
198: sql.c\
199: statistiques.c\
200: transliteration.c\
201: types.c
202:
203: SRCH=\
204: completion.h\
205: convert.h\
206: copyright.h\
207: garanties.h\
208: getaddrinfo.h\
209: gnuplot.h\
210: librpl.h\
211: licence.h\
212: rpl.h\
213: rplexternals.h\
214: rpltypes.h\
215: tex.h\
216: usages.h\
217: vim.h
218:
219: SRCF=\
220: arithmetique.f\
221: bibliotheque_logarithmique.f\
222: bibliotheque_trigonometrique.f
223:
224: SRCF90=\
225: combinaisons.F90\
226: distributions.F90\
227: fonctions_speciales.F90
228:
229: SRCINC=\
230: rplftypes.inc
231:
232: SRCXPM=\
233: rpl.xpm
234:
235: INIT_EXE=init.c
236:
237: INIT_LIB=librpl.c
238:
239: LIB=-lz @MALLOC@
240:
241: bin_PROGRAMS = rpl
242: lib_LIBRARIES = librpl.a
243:
244: SRCCc=$(SRCC:.c=-conv.c)
245: SRCHc=$(SRCH:.h=-conv.h)
246: SRCFc=$(SRCF:.f=-conv.f)
247: SRCF90c=$(SRCF90:.F90=-conv.F90)
248: SRCINCc=$(SRCINC:.inc=-conv.inc)
249: INIT_LIBc=$(INIT_LIB:.c=-conv.c)
250: INIT_EXEc=$(INIT_EXE:.c=-conv.c)
251:
252: %-conv.c: %.c
253: $(top_builddir)/rpliconv/rpliconv \
254: -f `$(top_builddir)/tools/@FILE@/src/rplfile \
255: -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
256: $(AWK) -F= '{print $$2;}'` \
257: -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
258:
259: %-conv.h: %.h
260: $(top_builddir)/rpliconv/rpliconv \
261: -f `$(top_builddir)/tools/@FILE@/src/rplfile \
262: -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
263: $(AWK) -F= '{print $$2;}'` \
264: -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
265:
266: %-conv.f: %.f
267: $(top_builddir)/rpliconv/rpliconv \
268: -f `$(top_builddir)/tools/@FILE@/src/rplfile \
269: -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
270: $(AWK) -F= '{print $$2;}'` \
271: -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
272:
273: %-conv.F90: %.F90
274: $(top_builddir)/rpliconv/rpliconv \
275: -f `$(top_builddir)/tools/@FILE@/src/rplfile \
276: -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
277: $(AWK) -F= '{print $$2;}'` \
278: -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
279:
280: %-conv.inc: %.inc
281: $(top_builddir)/rpliconv/rpliconv \
282: -f `$(top_builddir)/tools/@FILE@/src/rplfile \
283: -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
284: $(AWK) -F= '{print $$2;}'` \
285: -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
286:
287: licences:
288: cat $(srcdir)/../COPYING > $(srcdir)/licence.h
289: echo >> $(srcdir)/licence.h
290: echo >> $(srcdir)/licence.h
291: echo "#ifndef INCLUSION_LICENCE" >> $(srcdir)/licence.h
292: echo "# define INCLUSION_LICENCE" >> $(srcdir)/licence.h
293: echo " unsigned char CeCILL_fr[] =" >> $(srcdir)/licence.h
294: sed -e '1,$$s/"/\\"/g' $(srcdir)/../Licence_CeCILL_V2-fr.txt | \
295: $(AWK) -F'\n' '{ printf("\"%s\\n\"\n", $$1);}' \
296: >> $(srcdir)/licence.h
297: echo " ;" >> $(srcdir)/licence.h
298: echo " unsigned char CeCILL_en[] =" >> $(srcdir)/licence.h
299: sed -e '1,$$s/"/\\"/g' $(srcdir)/../Licence_CeCILL_V2-en.txt | \
300: $(AWK) -F'\n' '{ printf("\"%s\\n\"\n", $$1);}' \
301: >> $(srcdir)/licence.h
302: echo " ;" >> $(srcdir)/licence.h
303: echo "#endif" >> $(srcdir)/licence.h
304: echo >> $(srcdir)/licence.h
305: echo "// vim: ts=4" >> $(srcdir)/licence.h
306: for i in $(SRCC) $(SRCH) $(INIT_EXE) $(INIT_LIB); \
307: do \
308: cat $(srcdir)/../COPYING > $(srcdir)/tmp; \
309: echo >> $(srcdir)/tmp; \
310: echo >> $(srcdir)/tmp; \
311: $(AWK) -F'\n' 'BEGIN {d=0;} /^#/ {d=1;} {if(d==1) print $$1;}' \
312: $(srcdir)/$$i >> $(srcdir)/tmp; \
313: mv -f $(srcdir)/tmp $(srcdir)/$$i; \
314: done
315: for i in $(SRCINC); \
316: do \
317: iconv -f `file -i $(srcdir)/../COPYING | $(AWK) -F= '{print $$2;}'` \
318: $(srcdir)/../COPYING | \
319: $(AWK) -F'\n' '! (/^\/\*/ || /^\*\//) \
320: {printf("!%s\n", substr($$1,2));}' | \
321: iconv -t `file -i $(srcdir)/../COPYING | \
322: $(AWK) -F= '{print $$2;}'` > $(srcdir)/tmp; \
323: $(AWK) -F'\n' 'BEGIN {d=0;} ! /^!/ {d=1;} {if(d==1) print $$1;}' \
324: $(srcdir)/$$i >> $(srcdir)/tmp; \
325: mv -f $(srcdir)/tmp $(srcdir)/$$i; \
326: done
327: for i in $(SRCF); \
328: do \
329: iconv -f `file -i $(srcdir)/../COPYING | $(AWK) -F= '{print $$2;}'` \
330: $(srcdir)/../COPYING | \
331: $(AWK) -F'\n' '! (/^\/\*/ || /^\*\//) \
332: {printf("C%s\n", substr($$1,2));}' | \
333: iconv -t `file -i $(srcdir)/../COPYING | \
334: $(AWK) -F= '{print $$2;}'` > $(srcdir)/tmp; \
335: $(AWK) -F'\n' 'BEGIN {d=0;} ! /^C/ {d=1;} {if(d==1) print $$1;}' \
336: $(srcdir)/$$i >> $(srcdir)/tmp; \
337: mv -f $(srcdir)/tmp $(srcdir)/$$i; \
338: done
339: for i in $(SRCF90); \
340: do \
341: iconv -f `file -i $(srcdir)/../COPYING | $(AWK) -F= '{print $$2;}'` \
342: $(srcdir)/../COPYING | \
343: $(AWK) -F'\n' '! (/^\/\*/ || /^\*\//) \
344: {printf("!%s\n", substr($$1,2));}' | \
345: iconv -t `file -i $(srcdir)/../COPYING | \
346: $(AWK) -F= '{print $$2;}'` > $(srcdir)/tmp; \
347: $(AWK) -F'\n' 'BEGIN {d=0;} ! /^!/ {d=1;} {if(d==1) print $$1;}' \
348: $(srcdir)/$$i >> $(srcdir)/tmp; \
349: mv -f $(srcdir)/tmp $(srcdir)/$$i; \
350: done
351:
352: librplprototypes.h: rpl.h conversion.awk
353: $(AWK) -f $(srcdir)/conversion.awk $(srcdir)/rpl.h > \
354: $(top_builddir)/src/librplprototypes.h
355:
356: generateurs.c: generateurs_aleatoires.awk
357: $(AWK) -f $(srcdir)/generateurs_aleatoires.awk \
358: $(srcdir)/../tools/@GSL@/rng/gsl_rng.h > \
359: $(top_builddir)/src/generateurs.c
360:
361: rpl.inc:
362: echo BUILDPATH=$(top_builddir)/.. > $@
363: echo COMPILE=$(DEFS) | sed -e '1,$$s/"/\\"/g' | \
364: sed -e '1,$$s/=\\"/="\\"/g' | sed -e '1,$$s/\\" /\\"" /g' >> $@
365: echo LINK=@libX@ @libMySQLlib@ @libPgSQLlib@ -lz >> $@
366: echo OBJECTS=$(SRCCc:.c=.$(OBJEXT)) $(SRCFc:.f=.$(OBJEXT)) \
367: $(SRCF90c:.F90=.$(OBJEXT)) \
368: librpl-conv.$(OBJEXT) >> $@
369: echo EXTOBJECTS= @EXT_SQL@ \
370: $(top_builddir)/lapack/lapack/liblapack.a \
371: $(top_builddir)/lapack/blas/libblas.a \
372: $(ldadd_libhistory) \
373: $(ldadd_libreadline) \
374: $(ldadd_libncurses) \
375: $(ldadd_libgsl) \
376: $(ldadd_libiconv) \
377: $(ldadd_libcrypto) \
378: $(ldadd_libssl) \
379: $(ldadd_libsqlite) \
380: >> $@
381:
382: EXTRA_DIST = $(SRCC) $(SRCH) $(SRCF) $(SRCF90) $(SRCINC) \
383: $(INIT_EXE) $(INIT_LIB) $(SRCXPM) \
384: conversion.awk generateurs_aleatoires.awk
385: BUILT_SOURCES = librplprototypes.h generateurs.c \
386: $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) \
387: $(INIT_LIBc) $(SRCINCc) $(INIT_EXEc) \
388: rpl.inc
389: CLEANFILES= $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) $(SRCINCc) \
390: $(INIT_LIBc) $(INIT_EXEc) librplprototypes.h generateurs.c \
391: rpl.inc rpl-librpl-conv.$(OBJEXT)
392:
393: nodist_rpl_SOURCES = \
394: $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) $(INIT_EXEc) \
395: $(SRCXPM) $(SRCINCc)
396: rpl_LDFLAGS = -g @PROFILAGE@ $(LIB) @EXPORT_DYNAMIC@
397: rpl_CFLAGS = $(AM_CFLAGS) @C_STANDARD@ -Wall -Wextra -Wno-unused-function \
398: -Wno-pointer-sign -Wno-unused-parameter @NESTED_FUNCTIONS@
399: rpl_FFLAGS = $(AM_FFLAGS) -fno-f2c
400: rpl_FCFLAGS = $(AM_FCFLAGS) -fno-second-underscore -fno-f2c
401:
402: nodist_librpl_a_SOURCES = \
403: $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) $(INIT_LIBc) \
404: $(SRCXPM) $(SRCINCc)
405: librpl_a_CFLAGS = $(AM_CFLAGS) @C_STANDARD@ -Wall -Wextra -Wno-unused-function \
406: -Wno-pointer-sign -Wno-unused-parameter @NESTED_FUNCTIONS@
407: librpl_a_FFLAGS = $(AM_FFLAGS) -ff2c
408: librpl_a_FCFLAGS = $(AM_FCLAGS) -fno-second-underscore
409:
410: include_HEADERS = rplexternals.h rpltypes.h rpl.h librpl.h rpl.inc \
411: librplprototypes.h
412:
413: INCLUDES = -I$(srcdir) -I$(top_builddir) \
414: $(include_libreadline) $(include_libncurses) $(include_libgsl) \
415: $(include_libiconv) $(include_libcrypto) $(include_libsqlite)\
416: @includeX@ @libMySQLinc@ @libPgSQLinc@
417: DEFS = -DHAVE_CONFIG_H -Dd_version_rpl=\"@VERSION@\" @BROKEN_SIGINFO@ \
418: -Dd_exec_path=\"@RUNPATH@\" @FORCE_GNUPLOT_PATH@ @DEBUG@ \
419: @MOTIF_SUPPORT@ @POSTSCRIPT_SUPPORT@ @GNUPLOT_SUPPORT@ \
420: @VIM_SUPPORT@ @MYSQL_SUPPORT@ @POSTGRESQL_SUPPORT@ \
421: @SEMAPHORES_NOMMES@ @IPCS_SYSV@ @SEMUN@ @IPV6@ \
422: @EXPERIMENTAL_CODE@ $(date) $(hash) -g @PROFILAGE@ \
423: -Dd_locale=\"@FINAL_ENCODING@\" \
424: -D@OS@ @BSH_PATH@
425: rpl_LDADD = \
426: $(top_builddir)/lapack/lapack/liblapack.a \
427: $(top_builddir)/lapack/blas/libblas.a \
428: $(ldadd_libhistory) $(ldadd_libreadline) $(ldadd_libncurses) \
429: $(ldadd_libiconv) $(ldadd_libcrypto) $(ldadd_libssl) \
430: $(ldadd_libsqlite) \
431: $(ldadd_libgsl) @libX@ @libMySQLlib@ @libPgSQLlib@
432:
433: always: $(top_builddir)/src/rpl-conv.c
434: touch $<; \
435: if [ x$(shell which ctags) != x ]; then \
436: (cd $(srcdir); ctags $(SRCC) $(SRCF) $(SRCF90) \
437: $(INIT_LIB) $(INIT_EXE) 2>&1 /dev/null); \
438: fi;
439:
440: .PHONY: always librpl licences rpl.inc
441:
442: all-local: always
443:
444: install-exec-local: librpl
445:
446: librpl: install-libLIBRARIES
447: if [ -d $(top_builddir)/librpl ]; then \
448: rm -rf $(top_builddir)/librpl; \
449: fi
450: mkdir -p $(top_builddir)/librpl; \
451: for i in $(top_builddir)/src/librpl.a \
452: $(ldadd_libhistory) $(ldadd_libreadline) \
453: $(top_builddir)/lapack/lapack/liblapack.a \
454: $(top_builddir)/lapack/blas/libblas.a \
455: $(ldadd_libncurses) $(ldadd_libgsl) $(ldadd_libiconv) \
456: $(ldadd_libcrypto) $(ldadd_libssl) $(ldadd_libsqlite); \
457: do \
458: cp -f $$i $(top_builddir)/librpl; \
459: done
460: (cd $(top_builddir)/librpl && n=0 && \
461: echo Building standalone librpl.a; \
462: for i in *.a; \
463: do echo Extracting $$i; ar x $$i; \
464: for j in `ar t $$i`; \
465: do cp -f $$j $$n-$$j; \
466: rm -f $$j; \
467: done; \
468: n=`expr $$n + 1`; \
469: rm -f $$i; \
470: done; \
471: L="start"; \
472: while test -n "$$L"; \
473: do \
474: echo -n "Remaining files "; \
475: find . -name "*.$(OBJEXT)" | wc -l; \
476: L=""; j=0; \
477: for i in `find . -name "*.$(OBJEXT)"`; \
478: do \
479: k=`echo $$i | wc -c`; \
480: j=`expr $$j + $$k + 1`; \
481: if test $$j -le 5000; then \
482: L="$$L $$i"; \
483: else \
484: break; \
485: fi; \
486: done; \
487: if test -n "$$L"; then \
488: echo -n "Adding files to librpl.a archive... "; \
489: ar cru librpl.a $$L; \
490: rm -f $$L; \
491: echo "done"; \
492: fi; \
493: done; \
494: echo Archive created; \
495: ar s librpl.a; \
496: if [ @OS@ != OS2 ]; then \
497: echo Stripping librpl.a && strip -d librpl.a; \
498: fi;); \
499: $(INSTALL_DATA) $(top_builddir)/librpl/librpl.a $(DESTDIR)$(libdir)/librpl.a
500:
CVSweb interface <joel.bertrand@systella.fr>