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

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

CVSweb interface <joel.bertrand@systella.fr>