Ticket #27724: libcudd-build_arch.diff

File libcudd-build_arch.diff, 7.1 KB (added by ryandesign (Ryan Carsten Schmidt), 14 years ago)

proposed patch

  • files/patch-Makefile.diff

     
    1 --- oldMakefile 2004-08-18 02:18:45.000000000 +0200
    2 +++ Makefile    2008-08-16 17:55:20.000000000 +0200
     1--- Makefile.orig       2004-08-17 19:18:45.000000000 -0500
     2+++ Makefile    2010-12-19 01:54:10.000000000 -0600
    33@@ -50,7 +50,7 @@
    44 # These four are typical settings for optimized code with gcc.  The
    55 # last two also work with icc/ecc.
     
    1818 # Gcc 3.2.2 or higher on i686.
    1919 #XCFLAGS       = -mcpu=pentium4 -malign-double -DHAVE_IEEE_754 -DBSD
    2020 # Icc on i686.
     21@@ -219,7 +219,7 @@
     22        @for dir in $(DIRS); do \
     23                (cd $$dir; \
     24                echo Making $$dir ...; \
     25-               make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
     26+               make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
     27        done
     28 
     29 nanotrav: build
     30@@ -229,7 +229,7 @@
     31        @for dir in mnemosyne $(DIRS); do \
     32                (cd $$dir; \
     33                echo Making $$dir ...; \
     34-               make CC=$(CC) RANLIB=$(RANLIB) MFLAG=$(MFLAG) MNEMLIB=$(MNEMLIB) ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" EXE="$(EXE)" )\
     35+               make CC="$(CC)" RANLIB=$(RANLIB) MFLAG=$(MFLAG) MNEMLIB=$(MNEMLIB) ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" EXE="$(EXE)" )\
     36        done
     37 
     38 optimize_dec:
     39@@ -237,7 +237,7 @@
     40        @for dir in $(DIRS); do \
     41                (cd $$dir; \
     42                echo Making $$dir ...; \
     43-               make CC=$(CC) RANLIB=$(RANLIB) XCFLAGS="$(XCFLAGS)" LDFLAGS="$(LDFLAGS)" optimize_dec )\
     44+               make CC="$(CC)" RANLIB=$(RANLIB) XCFLAGS="$(XCFLAGS)" LDFLAGS="$(LDFLAGS)" optimize_dec )\
     45        done
     46 
     47 lint:
     48@@ -245,7 +245,7 @@
     49        @for dir in $(DIRS) obj; do \
     50                (cd $$dir; \
     51                echo Making lint in $$dir ...; \
     52-               make CC=$(CC) lint )\
     53+               make CC="$(CC)" lint )\
     54        done
     55 
     56 tags:
     57@@ -253,7 +253,7 @@
     58        @for dir in $(DIRS) obj; do \
     59                (cd $$dir; \
     60                echo Making tags in $$dir ...; \
     61-               make CC=$(CC) tags )\
     62+               make CC="$(CC)" tags )\
     63        done
     64 
     65 all:
     66@@ -261,7 +261,7 @@
     67        @for dir in $(DIRS); do \
     68                (cd $$dir; \
     69                echo Making all in $$dir ...; \
     70-               make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" all )\
     71+               make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" all )\
     72        done
     73 
     74 testcudd:
     75@@ -269,18 +269,18 @@
     76        @for dir in util st mtr epd; do \
     77                (cd $$dir; \
     78                echo Making $$dir ...; \
     79-               make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
     80+               make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
     81        done
     82        @(cd cudd; \
     83        echo Making testcudd ...; \
     84-       make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testcudd$(EXE) )
     85+       make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testcudd$(EXE) )
     86 
     87 objlib:
     88        sh ./setup.sh
     89        @for dir in $(BDIRS); do \
     90                (cd $$dir; \
     91                echo Making $$dir ...; \
     92-               make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
     93+               make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" )\
     94        done
     95        @(cd obj; \
     96        echo Making obj ...; \
     97@@ -294,12 +294,12 @@
     98 testdddmp: build
     99        @(cd dddmp; \
     100        echo Making testdddmp ...; \
     101-       make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testdddmp$(EXE) )
     102+       make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testdddmp$(EXE) )
     103 
     104 testmtr: build
     105        @(cd mtr; \
     106        echo Making testmtr ...; \
     107-       make CC=$(CC) RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testmtr$(EXE) )
     108+       make CC="$(CC)" RANLIB=$(RANLIB) MFLAG= MNEMLIB= ICFLAGS="$(ICFLAGS)" XCFLAGS="$(XCFLAGS)" DDDEBUG="$(DDDEBUG)" MTRDEBUG="$(MTRDEBUG)" LDFLAGS="$(LDFLAGS)" PURE="$(PURE)" EXE="$(EXE)" testmtr$(EXE) )
     109 
     110 clean:
     111        @for dir in mnemosyne $(DIRS) obj; do   \
  • Portfile

     
    3232}
    3333
    3434build.target        build
    35 build.args          CC=${configure.cc} CXX=${configure.cxx} CPP=${configure.cxx}
     35build.args          CC="${configure.cc} ${configure.cc_archflags}" \
     36                    CXX="${configure.cxx} ${configure.cxx_archflags}" \
     37                    CPP="${configure.cxx} ${configure.cxx_archflags}"
    3638
    3739post-build {
    3840    # generate dylib for C interface
    39     exec /bin/sh -c "${configure.cc} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcudd.dylib -o ${worksrcpath}/libcudd.dylib `find ${worksrcpath}/cudd ${worksrcpath}/dddmp ${worksrcpath}/epd ${worksrcpath}/mtr ${worksrcpath}/st ${worksrcpath}/util -name '*.o'`"
     41    exec /bin/sh -c "${configure.cc} ${configure.cc_archflags} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcudd.dylib -o ${worksrcpath}/libcudd.dylib `find ${worksrcpath}/cudd ${worksrcpath}/dddmp ${worksrcpath}/epd ${worksrcpath}/mtr ${worksrcpath}/st ${worksrcpath}/util -name '*.o'`"
    4042
    4143    # compile the additional C++ interface
    42     system "cd ${worksrcpath}/obj && make distclean && make ${build.args}"
     44    system "cd ${worksrcpath}/obj && make distclean && make [join ${build.args}]"
    4345    # generate dylib for C++ interface
    44     exec /bin/sh -c "${configure.cxx} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
     46    exec /bin/sh -c "${configure.cxx} ${configure.cxx_archflags} -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
    4547}
    4648
    4749destroot {