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

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

CVSweb interface <joel.bertrand@systella.fr>