options (CFLAGS...) for make in port without autoconf/cmake

Lawrence Velázquez larryv at macports.org
Wed Nov 26 13:20:36 PST 2014


On Nov 26, 2014, at 11:55 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:

> I'm making a Portfile for qtchooser (github.com/qtproject/qtchooser) and wonder how I can pass in options like the correct CFLAGS etc. to make. This project doesn't use autoconf or cmake, just a very simple prefab Makefile.

The contents of `build.args` are passed to `build.cmd` as command-line arguments. An example, from llvm-gcc42:

build.env \
    LIBRARY_PATH="/usr/lib" \
    CPATH="/usr/include" \
    PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
    LANGUAGES="c,c++,objc,obj-c++" \
    AR_FOR_TARGET=${prefix}/bin/ar \
    AS_FOR_TARGET=${prefix}/bin/as \
    LD_FOR_TARGET=${prefix}/bin/ld \
    NM_FOR_TARGET=${prefix}/bin/nm \
    OBJDUMP_FOR_TARGET=${prefix}/bin/objdump \
    RANLIB_FOR_TARGET=${prefix}/bin/ranlib \
    STRIP_FOR_TARGET=${prefix}/bin/strip \
    DSYMUTIL_FOR_HOST=${prefix}/bin/dsymutil \
    RANLIB_FOR_HOST=${prefix}/bin/ranlib \
    STRIP_FOR_HOST=${prefix}/bin/strip \
    OTOOL=${prefix}/bin/otool \
    OTOOL64=${prefix}/bin/otool

vq


More information about the macports-users mailing list