File:  [local] / rpl / src / Makefile.am
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Thu Mar 4 17:42:46 2010 UTC (14 years, 1 month ago) by bertrand
Branches: MAIN
CVS tags: HEAD
Ajout du fichier controle.c.

    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: include_libcrypto = -I$(top_builddir)/tools/@ICONV@/include
   18: 
   19: ldadd_libsqlite = $(top_builddir)/tools/@SQLITE@/.libs/libsqlite3.a
   20: include_libsqlite = -I$(top_builddir)/tools/@SQLITE@/include
   21: 
   22: date := -Dd_date_rpl="\"$(shell LC_ALL=fr_FR date +'%A %x, %X %Z' | \
   23:         awk '{ v=$$0; gsub(/^[ \t]+/, "", v); gsub(/[ \t]+$$/, "", v); \
   24:         printf("%s\n", v);}')\"" \
   25:         -Dd_date_en_rpl="\"$(shell LC_ALL=C date +'%A %x, %X %Z' | \
   26:         awk '{ v=$$0; gsub(/^[ \t]+/, "", v); gsub(/[ \t]+$$/, "", v); \
   27:         printf("%s\n", v);}')\""
   28: 
   29: SRCC=\
   30:     algebre_lineaire1.c\
   31:     algebre_lineaire2.c\
   32:     algebre_lineaire3.c\
   33:     algebre_lineaire4.c\
   34:     analyse.c\
   35:     analyse_notation_algebrique.c\
   36:     analyse_notation_rpn.c\
   37:     asprintf.c\
   38:     bibliotheques_externes.c\
   39:     calcul_differentiel.c\
   40:     calcul_integral.c\
   41:     chainage.c\
   42:     compilation.c\
   43:     completion.c\
   44:     controle.c \
   45:     daemon.c\
   46:     date.c\
   47:     depassements.c\
   48:     dft.c\
   49:     encart.c\
   50:     evaluation.c\
   51:     fonctions_trigonometriques.c\
   52:     formateur.c\
   53:     formateur_fichiers.c\
   54:     fusible.c\
   55:     generateurs_aleatoires.c\
   56:     gestion_fichiers.c\
   57:     gestion_interruptions.c\
   58:     gestion_niveaux.c\
   59:     gestion_objets.c\
   60:     gestion_pile.c\
   61:     gestion_pile_last.c\
   62:     gestion_pile_systeme.c\
   63:     gestion_processus.c\
   64:     gestion_threads.c\
   65:     gestion_variables.c\
   66:     gestion_variables_statiques.c\
   67:     gestion_variables_partagees.c\
   68:     indicateurs.c\
   69:     instructions_a1.c\
   70:     instructions_a2.c\
   71:     instructions_a3.c\
   72:     instructions_a4.c\
   73:     instructions_a5.c\
   74:     instructions_b1.c\
   75:     instructions_c1.c\
   76:     instructions_c2.c\
   77:     instructions_c3.c\
   78:     instructions_c4.c\
   79:     instructions_c5.c\
   80:     instructions_c6.c\
   81:     instructions_c7.c\
   82:     instructions_d1.c\
   83:     instructions_d2.c\
   84:     instructions_d3.c\
   85:     instructions_d4.c\
   86:     instructions_d5.c\
   87:     instructions_d6.c\
   88:     instructions_e1.c\
   89:     instructions_e2.c\
   90:     instructions_e3.c\
   91:     instructions_e4.c\
   92:     instructions_f1.c\
   93:     instructions_f2.c\
   94:     instructions_f3.c\
   95:     instructions_f4.c\
   96:     instructions_g1.c\
   97:     instructions_g2.c\
   98:     instructions_g3.c\
   99:     instructions_g4.c\
  100:     instructions_h1.c\
  101:     instructions_h2.c\
  102:     instructions_i1.c\
  103:     instructions_i2.c\
  104:     instructions_i3.c\
  105:     instructions_i4.c\
  106:     instructions_j1.c\
  107:     instructions_k1.c\
  108:     instructions_l1.c\
  109:     instructions_l2.c\
  110:     instructions_l3.c\
  111:     instructions_l4.c\
  112:     instructions_l5.c\
  113:     instructions_m1.c\
  114:     instructions_m2.c\
  115:     instructions_m3.c\
  116:     instructions_m4.c\
  117:     instructions_n1.c\
  118:     instructions_n2.c\
  119:     instructions_o1.c\
  120:     instructions_o2.c\
  121:     instructions_p1.c\
  122:     instructions_p2.c\
  123:     instructions_p3.c\
  124:     instructions_p4.c\
  125:     instructions_p5.c\
  126:     instructions_p6.c\
  127:     instructions_p7.c\
  128:     instructions_q1.c\
  129:     instructions_r1.c\
  130:     instructions_r2.c\
  131:     instructions_r3.c\
  132:     instructions_r4.c\
  133:     instructions_r5.c\
  134:     instructions_r6.c\
  135:     instructions_s1.c\
  136:     instructions_s2.c\
  137:     instructions_s3.c\
  138:     instructions_s4.c\
  139:     instructions_s5.c\
  140:     instructions_s6.c\
  141:     instructions_s7.c\
  142:     instructions_s8.c\
  143:     instructions_s9.c\
  144:     instructions_s10.c\
  145:     instructions_t1.c\
  146:     instructions_t2.c\
  147:     instructions_t3.c\
  148:     instructions_u1.c\
  149:     instructions_v1.c\
  150:     instructions_v2.c\
  151:     instructions_w1.c\
  152:     instructions_w2.c\
  153:     instructions_x1.c\
  154:     instructions_x2.c\
  155:     instructions_y1.c\
  156:     interface_gnuplot.c\
  157:     interface_tex.c\
  158:     interruptions.c\
  159:     messages.c\
  160:     occupation_memoire.c\
  161:     operations_atomiques.c\
  162:     operations_binaires.c\
  163:     optimisation.c\
  164:     profilage.c\
  165:     rpl.c\
  166:     rplcore.c\
  167:     sequenceur.c\
  168:     simplification.c\
  169:     sommations.c\
  170:     sql.c\
  171:     statistiques.c\
  172:     transliteration.c\
  173:     types.c
  174: 
  175: SRCH=\
  176:     completion.h\
  177:     convert.h\
  178:     copyright.h\
  179:     garanties.h\
  180:     gnuplot.h\
  181:     librpl.h\
  182:     licence.h\
  183:     rpl.h\
  184:     rplexternals.h\
  185:     rpltypes.h\
  186:     tex.h\
  187:     usages.h\
  188:     vim.h
  189: 
  190: SRCF=\
  191:     arithmetique.f\
  192:     bibliotheque_logarithmique.f\
  193:     bibliotheque_trigonometrique.f
  194: 
  195: SRCF90=\
  196:     combinaisons.F90\
  197:     distributions.F90\
  198:     fonctions_speciales.F90
  199: 
  200: SRCINC=\
  201:     rplftypes.inc
  202: 
  203: SRCXPM=\
  204:     rpl.xpm
  205: 
  206: INIT_EXE=init.c
  207: 
  208: INIT_LIB=librpl.c
  209: 
  210: LIB=-lz @LIBMTMALLOC@
  211: 
  212: bin_PROGRAMS = rpl
  213: lib_LIBRARIES = librpl.a
  214: 
  215: SRCCc=$(SRCC:.c=.conv.c)
  216: SRCHc=$(SRCH:.h=.conv.h)
  217: SRCFc=$(SRCF:.f=.conv.f)
  218: SRCF90c=$(SRCF90:.F90=.conv.F90)
  219: SRCINCc=$(SRCINC:.inc=.conv.inc)
  220: INIT_LIBc=$(INIT_LIB:.c=.conv.c)
  221: INIT_EXEc=$(INIT_EXE:.c=.conv.c)
  222: 
  223: %.conv.c: %.c
  224:     $(top_builddir)/rpliconv/rpliconv \
  225:             -f `$(top_builddir)/tools/@FILE@/src/rplfile \
  226:             -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
  227:             awk -F= '{print $$2;}'` \
  228:             -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
  229: 
  230: %.conv.h: %.h
  231:     $(top_builddir)/rpliconv/rpliconv \
  232:             -f `$(top_builddir)/tools/@FILE@/src/rplfile \
  233:             -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
  234:             awk -F= '{print $$2;}'` \
  235:             -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
  236: 
  237: %.conv.f: %.f
  238:     $(top_builddir)/rpliconv/rpliconv \
  239:             -f `$(top_builddir)/tools/@FILE@/src/rplfile \
  240:             -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
  241:             awk -F= '{print $$2;}'` \
  242:             -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
  243: 
  244: %.conv.F90: %.F90
  245:     $(top_builddir)/rpliconv/rpliconv \
  246:             -f `$(top_builddir)/tools/@FILE@/src/rplfile \
  247:             -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
  248:             awk -F= '{print $$2;}'` \
  249:             -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
  250: 
  251: %.conv.inc: %.inc
  252:     $(top_builddir)/rpliconv/rpliconv \
  253:             -f `$(top_builddir)/tools/@FILE@/src/rplfile \
  254:             -m $(top_builddir)/tools/@FILE@/magic/magic -i $< | \
  255:             awk -F= '{print $$2;}'` \
  256:             -t @FINAL_ENCODING@//TRANSLIT $< | expand -t 4 > $@
  257: 
  258: licences:
  259:     cat $(srcdir)/../COPYING > $(srcdir)/licence.h
  260:     echo >> $(srcdir)/licence.h
  261:     echo >> $(srcdir)/licence.h
  262:     echo "#ifndef INCLUSION_LICENCE" >> $(srcdir)/licence.h
  263:     echo "#   define INCLUSION_LICENCE" >> $(srcdir)/licence.h
  264:     echo "    unsigned char CeCILL_fr[] =" >> $(srcdir)/licence.h
  265:     sed -e '1,$$s/"/\\"/g' $(srcdir)/../Licence_CeCILL_V2-fr.txt | \
  266:             awk -F'\n' '{ printf("\"%s\\n\"\n", $$1);}' \
  267:             >> $(srcdir)/licence.h
  268:     echo "    ;" >> $(srcdir)/licence.h
  269:     echo "    unsigned char CeCILL_en[] =" >> $(srcdir)/licence.h
  270:     sed -e '1,$$s/"/\\"/g' $(srcdir)/../Licence_CeCILL_V2-en.txt | \
  271:             awk -F'\n' '{ printf("\"%s\\n\"\n", $$1);}' \
  272:             >> $(srcdir)/licence.h
  273:     echo "    ;" >> $(srcdir)/licence.h
  274:     echo "#endif" >> $(srcdir)/licence.h
  275:     echo >> $(srcdir)/licence.h
  276:     echo "// vim: ts=4" >> $(srcdir)/licence.h
  277:     for i in $(SRCC) $(SRCH) $(INIT_EXE) $(INIT_LIB); \
  278:     do \
  279:         cat $(srcdir)/../COPYING > $(srcdir)/tmp; \
  280:         echo >> $(srcdir)/tmp; \
  281:         echo >> $(srcdir)/tmp; \
  282:         awk -F'\n' 'BEGIN {d=0;} /^#/ {d=1;} {if(d==1) print $$1;}' \
  283:                 $(srcdir)/$$i >> $(srcdir)/tmp; \
  284:         mv -f $(srcdir)/tmp $(srcdir)/$$i; \
  285:     done
  286:     for i in $(SRCINC); \
  287:     do \
  288:         iconv -f `file -i $(srcdir)/../COPYING | awk -F= '{print $$2;}'` \
  289:                 $(srcdir)/../COPYING | \
  290:                 awk -F'\n' '! (/^\/\*/ || /^\*\//) \
  291:                 {printf("!%s\n", substr($$1,2));}' | \
  292:                 iconv -t `file -i $(srcdir)/../COPYING | \
  293:                 awk -F= '{print $$2;}'` > $(srcdir)/tmp; \
  294:         awk -F'\n' 'BEGIN {d=0;} ! /^!/ {d=1;} {if(d==1) print $$1;}' \
  295:                 $(srcdir)/$$i >> $(srcdir)/tmp; \
  296:         mv -f $(srcdir)/tmp $(srcdir)/$$i; \
  297:     done
  298:     for i in $(SRCF); \
  299:     do \
  300:         iconv -f `file -i $(srcdir)/../COPYING | awk -F= '{print $$2;}'` \
  301:                 $(srcdir)/../COPYING | \
  302:                 awk -F'\n' '! (/^\/\*/ || /^\*\//) \
  303:                 {printf("C%s\n", substr($$1,2));}' | \
  304:                 iconv -t `file -i $(srcdir)/../COPYING | \
  305:                 awk -F= '{print $$2;}'` > $(srcdir)/tmp; \
  306:         awk -F'\n' 'BEGIN {d=0;} ! /^C/ {d=1;} {if(d==1) print $$1;}' \
  307:                 $(srcdir)/$$i >> $(srcdir)/tmp; \
  308:         mv -f $(srcdir)/tmp $(srcdir)/$$i; \
  309:     done
  310:     for i in $(SRCF90); \
  311:     do \
  312:         iconv -f `file -i $(srcdir)/../COPYING | awk -F= '{print $$2;}'` \
  313:                 $(srcdir)/../COPYING | \
  314:                 awk -F'\n' '! (/^\/\*/ || /^\*\//) \
  315:                 {printf("!%s\n", substr($$1,2));}' | \
  316:                 iconv -t `file -i $(srcdir)/../COPYING | \
  317:                 awk -F= '{print $$2;}'` > $(srcdir)/tmp; \
  318:         awk -F'\n' 'BEGIN {d=0;} ! /^!/ {d=1;} {if(d==1) print $$1;}' \
  319:                 $(srcdir)/$$i >> $(srcdir)/tmp; \
  320:         mv -f $(srcdir)/tmp $(srcdir)/$$i; \
  321:     done
  322: 
  323: librplprototypes.h: rpl.h conversion.awk
  324:     awk -f $(srcdir)/conversion.awk $(srcdir)/rpl.h > \
  325:             $(top_builddir)/src/librplprototypes.h
  326: generateurs.c: generateurs_aleatoires.awk
  327:     awk -f $(srcdir)/generateurs_aleatoires.awk \
  328:             $(srcdir)/../tools/@GSL@/rng/gsl_rng.h > \
  329:             $(top_builddir)/src/generateurs.c
  330: 
  331: EXTRA_DIST = $(SRCC) $(SRCH) $(SRCF) $(SRCF90) $(SRCINC) \
  332:         $(INIT_EXE) $(INIT_LIB) $(SRCXPM) \
  333:         conversion.awk generateurs_aleatoires.awk
  334: BUILT_SOURCES = librplprototypes.h generateurs.c \
  335:         $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) \
  336:         $(INIT_LIBc) $(SRCINCc) $(INIT_EXEc)
  337: CLEANFILES= $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) $(SRCINCc) \
  338:         $(INIT_LIBc) $(INIT_EXEc) librplprototypes.h
  339: 
  340: nodist_rpl_SOURCES = $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) $(INIT_EXEc) \
  341:         $(SRCXPM) $(SRCINCc)
  342: #rpl_LDFLAGS = -g @PROFILAGE@ $(LIB) -rdynamic
  343: rpl_LDFLAGS = -g @PROFILAGE@ $(LIB) -export-dynamic
  344: 
  345: rpl_CFLAGS = $(AM_CFLAGS) -Wall -Wextra \
  346:              -Wno-pointer-sign -Wno-unused-parameter
  347: rpl_FFLAGS = $(AM_FFLAGS) -fno-f2c
  348: rpl_FCFLAGS = $(AM_FCFLAGS) -fno-second-underscore -fno-f2c
  349: 
  350: nodist_librpl_a_SOURCES = $(SRCCc) $(SRCHc) $(SRCFc) $(SRCF90c) $(INIT_LIBc) \
  351:          $(SRCXPM) $(SRCINCc)
  352: librpl_a_CFLAGS = $(AM_CFLAGS) -DLIBRPL \
  353:         -Wall -Wextra -Wno-pointer-sign -Wno-unused-parameter
  354: librpl_a_FFLAGS = $(AM_FFLAGS) -ff2c
  355: librpl_a_FCFLAGS = $(AM_FCLAGS) -fno-second-underscore
  356: 
  357: include_HEADERS = rplexternals.h rpltypes.h rpl.h librpl.h
  358: 
  359: INCLUDES = -I$(srcdir) -I$(top_builddir) \
  360:         $(include_libreadline) $(include_libncurses) $(include_libgsl) \
  361:         $(include_libiconv) $(include_libcrypto) $(include_libsqlite)\
  362:         @includeX@ @libMySQLinc@ @libPgSQLinc@
  363: DEFS = -DHAVE_CONFIG_H -Dd_version_rpl=\"@VERSION@\" \
  364:         -Dd_exec_path=\"@RUNPATH@\" @FORCE_GNUPLOT_PATH@ @DEBUG@ \
  365:         @MOTIF_SUPPORT@ @POSTSCRIPT_SUPPORT@ @GNUPLOT_SUPPORT@ \
  366:         @VIM_SUPPORT@ @MYSQL_SUPPORT@ @POSTGRESQL_SUPPORT@ \
  367:         @EXPERIMENTAL_CODE@ $(date) -g @PROFILAGE@ \
  368:         -Dd_locale=\"$(shell locale charmap)\" \
  369:         -D@OS@
  370: rpl_LDADD = $(top_builddir)/lapack/lapack/liblapack.a \
  371:         $(top_builddir)/lapack/blas/libblas.a \
  372:         $(ldadd_libhistory) $(ldadd_libreadline) $(ldadd_libncurses) \
  373:         $(ldadd_libiconv) $(ldadd_libcrypto) $(ldadd_libsqlite) \
  374:         $(ldadd_libgsl) @libX@ @libMySQLlib@ @libPgSQLlib@
  375: 
  376: always: $(top_builddir)/src/rpl.conv.c
  377:     touch $(top_builddir)/src/rpl.conv.c; \
  378:     (cd $(srcdir); ctags $(SRCC) $(SRCF) $(SRCF90) $(SRCH) $(SRCINC) \
  379:             $(INIT_LIB) $(INIT_EXE) 2>&1 /dev/null);
  380: 
  381: .PHONY: always librpl licences
  382: 
  383: all-local: always
  384: 
  385: install-exec-local: librpl
  386: 
  387: librpl: install-libLIBRARIES
  388:     echo \
  389:         open $(libdir)/librpl.a+ \
  390:         addlib $(top_builddir)/lapack/lapack/liblapack.a+ \
  391:         addlib $(top_builddir)/lapack/blas/libblas.a+ \
  392:         addlib $(ldadd_libhistory)+ \
  393:         addlib $(ldadd_libreadline)+ \
  394:         addlib $(ldadd_libncurses)+ \
  395:         addlib $(ldadd_libgsl)+ \
  396:         addlib $(ldadd_libiconv)+ \
  397:         addlib $(ldadd_libcrypto)+ \
  398:         addlib $(ldadd_libsqlite)+ \
  399:         save+ \
  400:         end \
  401:     | tr '+' '\n' | ar -M; \
  402:     $(RANLIB) $(libdir)/librpl.a

CVSweb interface <joel.bertrand@systella.fr>