On Fri, May 25, 2012 at 2:41 PM, Kyle McKay <mack...@gmail.com> wrote:
> cd /tmp
> git clone git://libusbx.git.sourceforge.net/gitroot/libusbx/libusbx
> cd libusbx
> git log -1 --oneline
> # a544e59 Misc: Ensure all sources are UTF-8
> ./autogen.sh
> CFLAGS='-O2 -arch x86_64 -arch i386 -arch ppc' \
> ./configure --disable-dependency-tracking
> make
> lipo -detailed_info libusb/.libs/libusb-1.0.0.dylib
>
> The magic configure option you must not forget when doing this is
> --disable-dependency-tracking.  Add an "LDFLAGS='-Wl,-force_cpusubtype_ALL'"
> if you want to force the ppc subtype to be CPU_SUBTYPE_POWERPC_ALL instead.
>

Great. Under Mac OS X Lion, it seems to me I need to remove
"-arch ppc". Other than that, it works nicely.

mymacmini:build_universal xiaofanc$ CFLAGS='-O2 -arch x86_64 -arch
i386' ../libusbx/configure --prefix=/usr/local/Cellar/libusb/HEAD
--enable-maintainer-mode --disable-dependency-tracking
--enable-examples-build

mymacmini:build_universal xiaofanc$ lipo -detailed_info
libusb/.libs/libusb-1.0.0.dylib
Fat header in: libusb/.libs/libusb-1.0.0.dylib
fat_magic 0xcafebabe
nfat_arch 2
architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    offset 4096
    size 76084
    align 2^12 (4096)
architecture i386
    cputype CPU_TYPE_I386
    cpusubtype CPU_SUBTYPE_I386_ALL
    offset 81920
    size 66992
    align 2^12 (4096)

mymacmini:build_universal xiaofanc$ lipo -detailed_info
examples/.libs/listdevs Fat header in: examples/.libs/listdevs
fat_magic 0xcafebabe
nfat_arch 2
architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    offset 4096
    size 9316
    align 2^12 (4096)
architecture i386
    cputype CPU_TYPE_I386
    cpusubtype CPU_SUBTYPE_I386_ALL
    offset 16384
    size 9252
    align 2^12 (4096)



-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to