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

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
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.18      bertrand  126:    if [ ! -f @GIAC@/Makefile2 ]; then \
1.28      bertrand  127:        if [ @BUILD@ = @HOST@ ]; then \
                    128:            (cd @GIAC@ && \
1.34    ! bertrand  129:                    CXX=@CXX@ \
1.28      bertrand  130:                    CPPFLAGS="-I$(top_builddir)/rplcas/include -I$(top_builddir)/tools/@GSL@ $(CPPFLAGS)" \
1.29      bertrand  131:                    CXXFLAGS="$(CXXFLAGS) -fpermissive" \
1.28      bertrand  132:                    LDFLAGS="-L$(top_builddir)/rplcas/lib $(LDFLAGS)" \
                    133:                    ../$(srcdir)/@GIAC@/configure --prefix=$(top_builddir)/rplcas \
                    134:                    --enable-pari=$(top_builddir)/rplcas \
                    135:                    --enable-ntl=$(top_builddir)/rplcas \
                    136:                    --enable-cocoa=$(top_builddir)/rplcas \
                    137:                    --enable-gsl=$(top_builddir)/tools/@GSL@/.libs/libgsl.a \
                    138:                    --disable-shared --enable-static \
                    139:                    --disable-gui --without-x && \
                    140:                    sed 's/SUBDIRS = src check intl po debianold debian doc examples/SUBDIRS = src check intl po debianold debian/g' Makefile \
                    141:                    > Makefile2); \
                    142:        else \
                    143:            (cd @GIAC@ && \
                    144:                    CPPFLAGS="-I$(top_builddir)/rplcas/include -I$(top_builddir)/tools/@GSL@ @SYSROOT@ $(CPPFLAGS)" \
1.29      bertrand  145:                    CXXFLAGS="$(CXXFLAGS) -fpermissive" \
1.28      bertrand  146:                    LDFLAGS="-L$(top_builddir)/rplcas/lib -L@SYSROOT2@/usr/lib $(LDFLAGS)" \
                    147:                    ../$(srcdir)/@GIAC@/configure --prefix=$(top_builddir)/rplcas \
                    148:                    --host=@HOST@ \
                    149:                    --enable-pari=$(top_builddir)/rplcas \
                    150:                    --enable-ntl=$(top_builddir)/rplcas \
                    151:                    --enable-cocoa=$(top_builddir)/rplcas \
                    152:                    --enable-gsl=$(top_builddir)/tools/@GSL@/.libs/libgsl.a \
                    153:                    --disable-shared --enable-static \
                    154:                    --disable-gui --without-x && \
                    155:                    sed 's/SUBDIRS = src check intl po debianold debian doc examples/SUBDIRS = src check intl po debianold debian/g' Makefile \
                    156:                    > Makefile2); \
                    157:        fi; \
1.7       bertrand  158:        (cd @GIAC@/src && \
                    159:                mv -f config.h config.h.orig && \
                    160:                sed -e 's/#define HAVE_LIBPNG 1//' config.h.orig | \
1.8       bertrand  161:                sed -e 's/#define HAVE_PNG_H 1//' > config.h && \
1.28      bertrand  162:                rm -f config.h.orig); \
1.5       bertrand  163:    fi
1.16      bertrand  164:    $(MAKE) -C @GIAC@ $(AM_MAKEFLAGS) -f Makefile2
1.23      bertrand  165:    if [ x$(srcdir) != x. ]; then \
                    166:        for i in mkinstalldirs xcas.xpm xcas.desktop xcas.applications; \
                    167:                do cp $(srcdir)/@GIAC@/$$i @GIAC@/$$i; done; \
                    168:    fi
1.16      bertrand  169:    $(MAKE) -C @GIAC@ $(AM_MAKEFLAGS) install -f Makefile2
1.1       bertrand  170: 
1.25      bertrand  171: lib/librplcas.a: lib/@LIB_PREFIX@giac.a lib/@LIB_PREFIX@gmp.a \
                    172:        lib/@LIB_PREFIX@mpfr.a lib/ntl.a lib/libcocoa.a lib/libpari.a
1.7       bertrand  173:    if [ ! -d tmp ]; then mkdir tmp; fi
1.26      bertrand  174:    @(cd tmp && n=0 && \
1.25      bertrand  175:            rm -f * && \
                    176:            echo Building standalone librplcas.a; \
                    177:            for i in ../lib/@LIB_PREFIX@gmp.a \
                    178:                    ../lib/@LIB_PREFIX@mpfr.a \
                    179:                    ../lib/libcocoa.a \
                    180:                    ../lib/libpari.a \
                    181:                    ../lib/ntl.a \
                    182:                    ../lib/@LIB_PREFIX@giac.a; \
                    183:                do echo Extracting $$i; ar x $$i; \
                    184:                for j in `ar t $$i`; \
                    185:                do cp -f $$j $$n-$$j; \
                    186:                    rm -f $$j; \
                    187:                done; \
                    188:                n=`expr $$n + 1`; \
                    189:            done; \
                    190:            L="start"; \
                    191:            while test -n "$$L"; \
                    192:            do \
                    193:                echo -n "Remaining files "; \
                    194:                find . -name "*.$(OBJEXT)" | wc -l; \
                    195:                L=""; j=0; \
                    196:                for i in `find . -name "*.$(OBJEXT)"`; \
                    197:                do \
                    198:                    k=`echo $$i | wc -c`; \
                    199:                    j=`expr $$j + $$k + 1`; \
                    200:                    if test $$j -le 8000; then \
                    201:                        L="$$L $$i"; \
                    202:                    else \
                    203:                        break; \
                    204:                    fi; \
                    205:                done; \
                    206:                if test -n "$$L"; then \
                    207:                    echo -n "Adding files to librplcas.a archive... "; \
                    208:                    ar cru ../lib/librplcas.a $$L; \
                    209:                    rm -f $$L; \
                    210:                    echo "done"; \
                    211:                fi; \
                    212:            done; \
                    213:            echo Archive created; \
                    214:            ar s ../lib/librplcas.a; \
                    215:            if [ @OS@ != OS2 -a @OS@ != Darwin ]; then \
                    216:                echo Stripping librplcas.a && strip -d ../lib/librplcas.a; \
                    217:            fi;)
                    218:    rmdir tmp
1.7       bertrand  219: 
1.14      bertrand  220: install:
1.1       bertrand  221: 
1.24      bertrand  222: uninstall:
                    223: 
1.3       bertrand  224: clean:
1.8       bertrand  225:    \rm -f $(top_builddir)/rplcas/lib/lib*
1.2       bertrand  226: 
                    227: distdir:

CVSweb interface <joel.bertrand@systella.fr>