File:  [local] / rpl / src / Makefile.am
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Thu Mar 4 10:09:31 2010 UTC (14 years, 1 month ago) by bertrand
Branches: MAIN
CVS tags: rpl-4_0_11, HEAD
Modifications des scripts de configuration pour Cygwin.

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

CVSweb interface <joel.bertrand@systella.fr>