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

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.3       bertrand    8: .PHONY: configure clean
                      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.18      bertrand   52: lib/ntl.a:
1.28    ! bertrand   53:    if [ @BUILD@ = @HOST@ ]; then \
        !            54:        (cd @NTL@/src && ./configure GMP_PREFIX=$(top_builddir)/rplcas \
        !            55:                SHARED=off CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"); \
        !            56:    else \
        !            57:        (cd @NTL@/src && ./configure GMP_PREFIX=$(top_builddir)/rplcas \
        !            58:                SHARED=off CC=@HOST@-gcc CXX=@HOST@-g++ \
        !            59:                CFLAGS="$(CFLAGS)" CXXFLAGS="@SYSROOT@ $(CXXFLAGS)" \
        !            60:                LDFLAGS="-L@SYSROOT2@/usr/lib"); \
        !            61:    fi
        !            62:    (cd @NTL@/src && $(MAKE) $(AM_MAKEFLAGS) -f makefile)
1.4       bertrand   63:    cp @NTL@/src/ntl.a lib/ntl.a
                     64:    cp @NTL@/src/ntl.a lib/ntl.a
                     65:    cp -R @NTL@/include/NTL include
1.3       bertrand   66: 
1.25      bertrand   67: lib/libcocoa.a: lib/@LIB_PREFIX@gmp.a
1.2       bertrand   68:    if [ ! -f @COCOA@/configuration/autoconf.mk ]; then \
1.28    ! bertrand   69:        if [ @BUILD@ = @HOST@ ]; then \
        !            70:            (cd @COCOA@ && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
        !            71:                    ./configure --with-libgmp=../lib/libgmp.a \
        !            72:                    --with-libgsl=../../tools/@GSL@/.libs/libgsl.a); \
        !            73:        else \
        !            74:            (cd @COCOA@ && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
        !            75:                    ./configure --with-libgmp=../lib/libgmp.a \
        !            76:                    --with-cxx=@HOST@-g++ \
        !            77:                    --with-cxxflags="@SYSROOT@ $(CXXFLAGS)" \
        !            78:                    --with-libgsl=../../tools/@GSL@/.libs/libgsl.a); \
        !            79:        fi; \
1.2       bertrand   80:    fi
1.16      bertrand   81:    $(MAKE) -C @COCOA@ $(AM_MAKEFLAGS) library
1.4       bertrand   82:    cp @COCOA@/lib/libcocoa.a lib/libcocoa.a
                     83:    cp -R @COCOA@/include/CoCoA include
1.3       bertrand   84: 
1.25      bertrand   85: lib/libpari.a: lib/@LIB_PREFIX@gmp.a
1.4       bertrand   86:    if [ ! -f @PARI@/configured ]; then \
1.28    ! bertrand   87:        if [ @BUILD@ = @HOST@ ]; then \
        !            88:            (cd @PARI@ && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
        !            89:                    LDFLAGS="$(LDFLAGS)" \
        !            90:                    ./Configure --prefix=$(top_builddir)/rplcas \
        !            91:                    --with-gmp=../lib/libgmp.a \
        !            92:                    --without-readline --graphic=none -s); \
        !            93:        else \
        !            94:            (cd @PARI@ && CC=@HOST@-gcc LD=@HOST@-ld \
        !            95:                    CFLAGS="@SYSROOT@ $(CFLAGS)" \
        !            96:                    CXXFLAGS="$(CXXFLAGS)" \
        !            97:                    LDFLAGS="-L@SYSROOT2@/usr/lib $(LDFLAGS)" \
        !            98:                    ./Configure --prefix=$(top_builddir)/rplcas \
        !            99:                    --with-gmp=../lib/libgmp.a \
        !           100:                    --without-readline --graphic=none -s); \
        !           101:        fi; \
1.4       bertrand  102:        touch @PARI@/configured; \
                    103:    fi
1.28    ! bertrand  104:    $(MAKE) -C @PARI@ $(AM_MAKEFLAGS) gp && \
1.16      bertrand  105:            $(MAKE) -C @PARI@ $(AM_MAKEFLAGS) install
1.4       bertrand  106: 
1.25      bertrand  107: lib/@LIB_PREFIX@giac.a: lib/@LIB_PREFIX@gmp.a lib/@LIB_PREFIX@mpfr.a lib/ntl.a \
1.4       bertrand  108:        lib/libcocoa.a lib/libpari.a
                    109:    if [ ! -d @GIAC@ ]; then \
                    110:        mkdir @GIAC@ ; \
                    111:    fi
1.18      bertrand  112:    if [ ! -f @GIAC@/Makefile2 ]; then \
1.28    ! bertrand  113:        if [ @BUILD@ = @HOST@ ]; then \
        !           114:            (cd @GIAC@ && \
        !           115:                    CPPFLAGS="-I$(top_builddir)/rplcas/include -I$(top_builddir)/tools/@GSL@ $(CPPFLAGS)" \
        !           116:                    LDFLAGS="-L$(top_builddir)/rplcas/lib $(LDFLAGS)" \
        !           117:                    ../$(srcdir)/@GIAC@/configure --prefix=$(top_builddir)/rplcas \
        !           118:                    --enable-pari=$(top_builddir)/rplcas \
        !           119:                    --enable-ntl=$(top_builddir)/rplcas \
        !           120:                    --enable-cocoa=$(top_builddir)/rplcas \
        !           121:                    --enable-gsl=$(top_builddir)/tools/@GSL@/.libs/libgsl.a \
        !           122:                    --disable-shared --enable-static \
        !           123:                    --disable-gui --without-x && \
        !           124:                    sed 's/SUBDIRS = src check intl po debianold debian doc examples/SUBDIRS = src check intl po debianold debian/g' Makefile \
        !           125:                    > Makefile2); \
        !           126:        else \
        !           127:            (cd @GIAC@ && \
        !           128:                    CPPFLAGS="-I$(top_builddir)/rplcas/include -I$(top_builddir)/tools/@GSL@ @SYSROOT@ $(CPPFLAGS)" \
        !           129:                    LDFLAGS="-L$(top_builddir)/rplcas/lib -L@SYSROOT2@/usr/lib $(LDFLAGS)" \
        !           130:                    ../$(srcdir)/@GIAC@/configure --prefix=$(top_builddir)/rplcas \
        !           131:                    --host=@HOST@ \
        !           132:                    --enable-pari=$(top_builddir)/rplcas \
        !           133:                    --enable-ntl=$(top_builddir)/rplcas \
        !           134:                    --enable-cocoa=$(top_builddir)/rplcas \
        !           135:                    --enable-gsl=$(top_builddir)/tools/@GSL@/.libs/libgsl.a \
        !           136:                    --disable-shared --enable-static \
        !           137:                    --disable-gui --without-x && \
        !           138:                    sed 's/SUBDIRS = src check intl po debianold debian doc examples/SUBDIRS = src check intl po debianold debian/g' Makefile \
        !           139:                    > Makefile2); \
        !           140:        fi; \
1.7       bertrand  141:        (cd @GIAC@/src && \
                    142:                mv -f config.h config.h.orig && \
                    143:                sed -e 's/#define HAVE_LIBPNG 1//' config.h.orig | \
1.8       bertrand  144:                sed -e 's/#define HAVE_PNG_H 1//' > config.h && \
1.28    ! bertrand  145:                rm -f config.h.orig); \
1.5       bertrand  146:    fi
1.16      bertrand  147:    $(MAKE) -C @GIAC@ $(AM_MAKEFLAGS) -f Makefile2
1.23      bertrand  148:    if [ x$(srcdir) != x. ]; then \
                    149:        for i in mkinstalldirs xcas.xpm xcas.desktop xcas.applications; \
                    150:                do cp $(srcdir)/@GIAC@/$$i @GIAC@/$$i; done; \
                    151:    fi
1.16      bertrand  152:    $(MAKE) -C @GIAC@ $(AM_MAKEFLAGS) install -f Makefile2
1.1       bertrand  153: 
1.25      bertrand  154: lib/librplcas.a: lib/@LIB_PREFIX@giac.a lib/@LIB_PREFIX@gmp.a \
                    155:        lib/@LIB_PREFIX@mpfr.a lib/ntl.a lib/libcocoa.a lib/libpari.a
1.7       bertrand  156:    if [ ! -d tmp ]; then mkdir tmp; fi
1.26      bertrand  157:    @(cd tmp && n=0 && \
1.25      bertrand  158:            rm -f * && \
                    159:            echo Building standalone librplcas.a; \
                    160:            for i in ../lib/@LIB_PREFIX@gmp.a \
                    161:                    ../lib/@LIB_PREFIX@mpfr.a \
                    162:                    ../lib/libcocoa.a \
                    163:                    ../lib/libpari.a \
                    164:                    ../lib/ntl.a \
                    165:                    ../lib/@LIB_PREFIX@giac.a; \
                    166:                do echo Extracting $$i; ar x $$i; \
                    167:                for j in `ar t $$i`; \
                    168:                do cp -f $$j $$n-$$j; \
                    169:                    rm -f $$j; \
                    170:                done; \
                    171:                n=`expr $$n + 1`; \
                    172:            done; \
                    173:            L="start"; \
                    174:            while test -n "$$L"; \
                    175:            do \
                    176:                echo -n "Remaining files "; \
                    177:                find . -name "*.$(OBJEXT)" | wc -l; \
                    178:                L=""; j=0; \
                    179:                for i in `find . -name "*.$(OBJEXT)"`; \
                    180:                do \
                    181:                    k=`echo $$i | wc -c`; \
                    182:                    j=`expr $$j + $$k + 1`; \
                    183:                    if test $$j -le 8000; then \
                    184:                        L="$$L $$i"; \
                    185:                    else \
                    186:                        break; \
                    187:                    fi; \
                    188:                done; \
                    189:                if test -n "$$L"; then \
                    190:                    echo -n "Adding files to librplcas.a archive... "; \
                    191:                    ar cru ../lib/librplcas.a $$L; \
                    192:                    rm -f $$L; \
                    193:                    echo "done"; \
                    194:                fi; \
                    195:            done; \
                    196:            echo Archive created; \
                    197:            ar s ../lib/librplcas.a; \
                    198:            if [ @OS@ != OS2 -a @OS@ != Darwin ]; then \
                    199:                echo Stripping librplcas.a && strip -d ../lib/librplcas.a; \
                    200:            fi;)
                    201:    rmdir tmp
1.7       bertrand  202: 
1.14      bertrand  203: install:
1.1       bertrand  204: 
1.24      bertrand  205: uninstall:
                    206: 
1.3       bertrand  207: clean:
1.8       bertrand  208:    \rm -f $(top_builddir)/rplcas/lib/lib*
1.2       bertrand  209: 
                    210: distdir:

CVSweb interface <joel.bertrand@systella.fr>