Annotation of rpl/rplcas/Makefile.in, revision 1.44

1.1       bertrand    1: srcdir=@srcdir@
                      2: top_builddir=@abs_top_builddir@
1.12      bertrand    3: CFLAGS=@CFLAGS@
                      4: CXXFLAGS=@CXXFLAGS@
                      5: LDFLAGS=@LDFLAGS@
1.25      bertrand    6: OBJEXT=@OBJEXT@
1.12      bertrand    7: 
1.39      bertrand    8: .PHONY: configure clean distclean
1.3       bertrand    9: 
1.7       bertrand   10: all: lib/librplcas.a
1.2       bertrand   11: 
1.25      bertrand   12: lib/@LIB_PREFIX@gmp.a:
1.1       bertrand   13:    if [ ! -d @GMP@ ]; then \
                     14:        mkdir @GMP@; \
                     15:    fi
                     16:    if [ ! -f @GMP@/config.log ]; then \
1.12      bertrand   17:        (cd @GMP@ && \
1.13      bertrand   18:                CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
1.10      bertrand   19:                ../$(srcdir)/@GMP@/configure --with-readline=no \
1.28      bertrand   20:                --host=@HOST@ \
1.4       bertrand   21:                --disable-shared --enable-static \
                     22:                --prefix=$(top_builddir)/rplcas); \
1.1       bertrand   23:    fi
1.16      bertrand   24:    $(MAKE) -C @GMP@ $(AM_MAKEFLAGS) all && \
                     25:            $(MAKE) -C $(AM_MAKEFLAGS) @GMP@ install
1.3       bertrand   26: 
1.25      bertrand   27: lib/@LIB_PREFIX@mpfr.a: lib/@LIB_PREFIX@gmp.a
1.2       bertrand   28:    if [ ! -d @MPFR@ ]; then \
                     29:        mkdir @MPFR@ ; \
                     30:    fi
1.1       bertrand   31:    if [ ! -f @MPFR@/config.log ]; then \
1.28      bertrand   32:        if [ @BUILD@ = @HOST@ ]; then \
                     33:            (cd @MPFR@ && \
                     34:                    CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
                     35:                    ../$(srcdir)/@MPFR@/configure \
                     36:                    --with-gmp=$(top_builddir)/rplcas \
                     37:                    --disable-shared --enable-static \
                     38:                    --prefix=$(top_builddir)/rplcas); \
                     39:        else \
                     40:            (cd @MPFR@ && \
                     41:                    CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
                     42:                    ../$(srcdir)/@MPFR@/configure \
                     43:                    --host=@HOST@ \
                     44:                    --with-gmp=$(top_builddir)/rplcas \
                     45:                    --disable-shared --enable-static \
                     46:                    --prefix=$(top_builddir)/rplcas); \
                     47:        fi; \
1.1       bertrand   48:    fi
1.16      bertrand   49:    $(MAKE) -C @MPFR@ $(AM_MAKEFLAGS) all && \
                     50:            $(MAKE) -C @MPFR@ $(AM_MAKEFLAGS) install
1.3       bertrand   51: 
1.44    ! bertrand   52: lib/@LIB_PREFIX@mpfi.a: lib/@LIB_PREFIX@gmp.a lib/@LIB_PREFIX@mpfr.a
        !            53:    if [ ! -d @MPFI@ ]; then \
        !            54:        mkdir @MPFI@ ; \
        !            55:    fi
        !            56:    if [ ! -f @MPFI@/config.log ]; then \
        !            57:        if [ @BUILD@ = @HOST@ ]; then \
        !            58:            (cd @MPFI@ && \
        !            59:                    CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
        !            60:                    ../$(srcdir)/@MPFI@/configure \
        !            61:                    --with-gmp=$(top_builddir)/rplcas \
        !            62:                    --with-mpfr=$(top_builddir)/rplcas \
        !            63:                    --disable-shared --enable-static \
        !            64:                    --prefix=$(top_builddir)/rplcas); \
        !            65:        else \
        !            66:            (cd @MPFI@ && \
        !            67:                    CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
        !            68:                    ../$(srcdir)/@MPFI@/configure \
        !            69:                    --host=@HOST@ \
        !            70:                    --with-gmp=$(top_builddir)/rplcas \
        !            71:                    --with-mpfr=$(top_builddir)/rplcas \
        !            72:                    --disable-shared --enable-static \
        !            73:                    --prefix=$(top_builddir)/rplcas); \
        !            74:        fi; \
        !            75:    fi
        !            76:    $(MAKE) -C @MPFI@ $(AM_MAKEFLAGS) all && \
        !            77:            $(MAKE) -C @MPFI@ $(AM_MAKEFLAGS) install
        !            78: 
1.18      bertrand   79: lib/ntl.a:
1.28      bertrand   80:    if [ @BUILD@ = @HOST@ ]; then \
                     81:        (cd @NTL@/src && ./configure GMP_PREFIX=$(top_builddir)/rplcas \
                     82:                SHARED=off CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"); \
                     83:    else \
                     84:        (cd @NTL@/src && ./configure GMP_PREFIX=$(top_builddir)/rplcas \
                     85:                SHARED=off CC=@HOST@-gcc CXX=@HOST@-g++ \
                     86:                CFLAGS="$(CFLAGS)" CXXFLAGS="@SYSROOT@ $(CXXFLAGS)" \
                     87:                LDFLAGS="-L@SYSROOT2@/usr/lib"); \
                     88:    fi
1.30      bertrand   89:    (cd @NTL@/src && \
1.32      bertrand   90:        if [ -z '$(make -v | grep "^GNU Make")' -a $(shell uname) != Linux ]; \
                     91:                    then \
1.30      bertrand   92:                sed 's/make /gmake /g' makefile > makefile2 && \
                     93:                \mv -f makefile2 makefile && \
                     94:                sed 's/make /gmake /g' WizardAux > WizardAux2 && \
1.32      bertrand   95:                \mv -f WizardAux2 WizardAux; \
1.30      bertrand   96:        fi && \
                     97:        $(MAKE) $(AM_MAKEFLAGS) -f makefile)
1.4       bertrand   98:    cp @NTL@/src/ntl.a lib/ntl.a
                     99:    cp @NTL@/src/ntl.a lib/ntl.a
                    100:    cp -R @NTL@/include/NTL include
1.3       bertrand  101: 
1.25      bertrand  102: lib/libcocoa.a: lib/@LIB_PREFIX@gmp.a
1.33      bertrand  103:    sed '1,1s/^#!\/bin\/bash/#!@BASH@/g' @COCOA@/configure > @COCOA@/configure2
1.31      bertrand  104:    mv -f @COCOA@/configure2 @COCOA@/configure
                    105:    chmod 755 @COCOA@/configure
1.2       bertrand  106:    if [ ! -f @COCOA@/configuration/autoconf.mk ]; then \
1.28      bertrand  107:        if [ @BUILD@ = @HOST@ ]; then \
                    108:            (cd @COCOA@ && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
                    109:                    ./configure --with-libgmp=../lib/libgmp.a \
                    110:                    --with-libgsl=../../tools/@GSL@/.libs/libgsl.a); \
                    111:        else \
                    112:            (cd @COCOA@ && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
                    113:                    ./configure --with-libgmp=../lib/libgmp.a \
                    114:                    --with-cxx=@HOST@-g++ \
                    115:                    --with-cxxflags="@SYSROOT@ $(CXXFLAGS)" \
                    116:                    --with-libgsl=../../tools/@GSL@/.libs/libgsl.a); \
                    117:        fi; \
1.2       bertrand  118:    fi
1.33      bertrand  119:    sed 's/^SHELL=\/bin\/bash/SHELL=@BASH@/g' @COCOA@/configuration/autoconf.mk \
1.31      bertrand  120:            > @COCOA@/configuration/autoconf.mk2
                    121:    mv -f @COCOA@/configuration/autoconf.mk2 @COCOA@/configuration/autoconf.mk
1.16      bertrand  122:    $(MAKE) -C @COCOA@ $(AM_MAKEFLAGS) library
1.4       bertrand  123:    cp @COCOA@/lib/libcocoa.a lib/libcocoa.a
                    124:    cp -R @COCOA@/include/CoCoA include
1.3       bertrand  125: 
1.25      bertrand  126: lib/libpari.a: lib/@LIB_PREFIX@gmp.a
1.4       bertrand  127:    if [ ! -f @PARI@/configured ]; then \
1.28      bertrand  128:        if [ @BUILD@ = @HOST@ ]; then \
                    129:            (cd @PARI@ && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
                    130:                    LDFLAGS="$(LDFLAGS)" \
                    131:                    ./Configure --prefix=$(top_builddir)/rplcas \
                    132:                    --with-gmp=../lib/libgmp.a \
                    133:                    --without-readline --graphic=none -s); \
                    134:        else \
                    135:            (cd @PARI@ && CC=@HOST@-gcc LD=@HOST@-ld \
                    136:                    CFLAGS="@SYSROOT@ $(CFLAGS)" \
                    137:                    CXXFLAGS="$(CXXFLAGS)" \
                    138:                    LDFLAGS="-L@SYSROOT2@/usr/lib $(LDFLAGS)" \
                    139:                    ./Configure --prefix=$(top_builddir)/rplcas \
                    140:                    --with-gmp=../lib/libgmp.a \
                    141:                    --without-readline --graphic=none -s); \
                    142:        fi; \
1.4       bertrand  143:        touch @PARI@/configured; \
                    144:    fi
1.28      bertrand  145:    $(MAKE) -C @PARI@ $(AM_MAKEFLAGS) gp && \
1.16      bertrand  146:            $(MAKE) -C @PARI@ $(AM_MAKEFLAGS) install
1.4       bertrand  147: 
1.25      bertrand  148: lib/@LIB_PREFIX@giac.a: lib/@LIB_PREFIX@gmp.a lib/@LIB_PREFIX@mpfr.a lib/ntl.a \
1.44    ! bertrand  149:        lib/libcocoa.a lib/libpari.a lib/@LIB_PREFIX@mpfi.a
1.4       bertrand  150:    if [ ! -d @GIAC@ ]; then \
                    151:        mkdir @GIAC@ ; \
                    152:    fi
1.37      bertrand  153:    if [ @BUILD@ = @HOST@ ]; then \
                    154:        (cd @GIAC@ && \
                    155:                CXX=@CXX@ \
                    156:                CPPFLAGS="-I$(top_builddir)/rplcas/include -I$(top_builddir)/tools/@GSL@ $(CPPFLAGS)" \
                    157:                CXXFLAGS="$(CXXFLAGS) -fpermissive" \
1.44    ! bertrand  158:                LDFLAGS="$(top_builddir)/rplcas/lib/libpari.a $(top_builddir)/rplcas/lib/ntl.a $(top_builddir)/rplcas/lib/libcocoa.a $(top_builddir)/tools/@GSL@/.libs/libgsl.a $(top_builddir)/rplcas/lib/@LIB_PREFIX@gmp.a $(top_builddir)/rplcas/lib/@LIB_PREFIX@mpfr.a $(top_builddir)/rplcas/lib/@LIB_PREFIX@mpfi.a $(LDFLAGS)" \
1.37      bertrand  159:                ../$(srcdir)/@GIAC@/configure --prefix=$(top_builddir)/rplcas \
1.43      bertrand  160:                --enable-pari \
                    161:                --enable-ntl \
                    162:                --enable-cocoa \
                    163:                --enable-gsl \
1.37      bertrand  164:                --disable-shared --enable-static \
                    165:                --disable-gui --without-x); \
                    166:    else \
                    167:        (cd @GIAC@ && \
                    168:                CPPFLAGS="-I$(top_builddir)/rplcas/include -I$(top_builddir)/tools/@GSL@ @SYSROOT@ $(CPPFLAGS)" \
                    169:                CXXFLAGS="$(CXXFLAGS) -fpermissive" \
1.44    ! bertrand  170:                LDFLAGS="$(top_builddir)/rplcas/lib/libpari.a $(top_builddir)/rplcas/lib/ntl.a $(top_builddir)/rplcas/lib/libcocoa.a $(top_builddir)/tools/@GSL@/.libs/libgsl.a $(top_builddir)/rplcas/lib/@LIB_PREFIX@gmp.a $(top_builddir)/rplcas/lib/@LIB_PREFIX@mpfr.a $(top_builddir)/rplcas/lib/@LIB_PREFIX@mpfi.a $(LDFLAGS)" \
1.37      bertrand  171:                ../$(srcdir)/@GIAC@/configure --prefix=$(top_builddir)/rplcas \
                    172:                --host=@HOST@ \
1.43      bertrand  173:                --enable-pari \
                    174:                --enable-ntl \
                    175:                --enable-cocoa \
                    176:                --enable-gsl \
1.37      bertrand  177:                --disable-shared --enable-static \
                    178:                --disable-gui --without-x); \
                    179:    fi; \
                    180:    (cd @GIAC@/src && \
                    181:            mv -f config.h config.h.orig && \
                    182:            sed -e 's/#define HAVE_LIBPNG 1//' config.h.orig | \
                    183:            sed -e 's/#define HAVE_PNG_H 1//' > config.h && \
                    184:            rm -f config.h.orig); \
1.44    ! bertrand  185:    (cd @GIAC@/src && \
        !           186:            mv -f Makefile Makefile.orig && \
        !           187:            sed -e 's/-lntl//' Makefile.orig | \
        !           188:            sed -e 's/-lgmp//' | \
        !           189:            sed -e 's/-lmpfr//' > Makefile && \
        !           190:            rm -f Makefile.orig); \
1.37      bertrand  191:    $(MAKE) -C @GIAC@ $(AM_MAKEFLAGS)
1.23      bertrand  192:    if [ x$(srcdir) != x. ]; then \
                    193:        for i in mkinstalldirs xcas.xpm xcas.desktop xcas.applications; \
                    194:                do cp $(srcdir)/@GIAC@/$$i @GIAC@/$$i; done; \
1.38      bertrand  195:        cp -R $(srcdir)/@GIAC@/icons @GIAC@; \
1.23      bertrand  196:    fi
1.37      bertrand  197:    $(MAKE) -C @GIAC@ $(AM_MAKEFLAGS) install
1.1       bertrand  198: 
1.25      bertrand  199: lib/librplcas.a: lib/@LIB_PREFIX@giac.a lib/@LIB_PREFIX@gmp.a \
1.44    ! bertrand  200:        lib/@LIB_PREFIX@mpfr.a lib/ntl.a lib/libcocoa.a lib/libpari.a \
        !           201:        lib/@LIB_PREFIX@mpfi.a
1.7       bertrand  202:    if [ ! -d tmp ]; then mkdir tmp; fi
1.26      bertrand  203:    @(cd tmp && n=0 && \
1.25      bertrand  204:            rm -f * && \
                    205:            echo Building standalone librplcas.a; \
                    206:            for i in ../lib/@LIB_PREFIX@gmp.a \
                    207:                    ../lib/@LIB_PREFIX@mpfr.a \
1.44    ! bertrand  208:                    ../lib/@LIB_PREFIX@mpfi.a \
1.25      bertrand  209:                    ../lib/libcocoa.a \
                    210:                    ../lib/libpari.a \
                    211:                    ../lib/ntl.a \
                    212:                    ../lib/@LIB_PREFIX@giac.a; \
                    213:                do echo Extracting $$i; ar x $$i; \
                    214:                for j in `ar t $$i`; \
                    215:                do cp -f $$j $$n-$$j; \
                    216:                    rm -f $$j; \
                    217:                done; \
                    218:                n=`expr $$n + 1`; \
                    219:            done; \
                    220:            L="start"; \
                    221:            while test -n "$$L"; \
                    222:            do \
                    223:                echo -n "Remaining files "; \
                    224:                find . -name "*.$(OBJEXT)" | wc -l; \
                    225:                L=""; j=0; \
                    226:                for i in `find . -name "*.$(OBJEXT)"`; \
                    227:                do \
                    228:                    k=`echo $$i | wc -c`; \
                    229:                    j=`expr $$j + $$k + 1`; \
                    230:                    if test $$j -le 8000; then \
                    231:                        L="$$L $$i"; \
                    232:                    else \
                    233:                        break; \
                    234:                    fi; \
                    235:                done; \
                    236:                if test -n "$$L"; then \
                    237:                    echo -n "Adding files to librplcas.a archive... "; \
1.42      bertrand  238:                    ar cr ../lib/librplcas.a $$L; \
1.25      bertrand  239:                    rm -f $$L; \
                    240:                    echo "done"; \
                    241:                fi; \
                    242:            done; \
                    243:            echo Archive created; \
                    244:            ar s ../lib/librplcas.a; \
                    245:            if [ @OS@ != OS2 -a @OS@ != Darwin ]; then \
                    246:                echo Stripping librplcas.a && strip -d ../lib/librplcas.a; \
                    247:            fi;)
1.44    ! bertrand  248:    rm -rf tmp
1.7       bertrand  249: 
1.14      bertrand  250: install:
1.1       bertrand  251: 
1.24      bertrand  252: uninstall:
                    253: 
1.3       bertrand  254: clean:
1.8       bertrand  255:    \rm -f $(top_builddir)/rplcas/lib/lib*
1.2       bertrand  256: 
                    257: distdir:

CVSweb interface <joel.bertrand@systella.fr>