xpcom/reflect/xptcall/src/md/unix/moz.build
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 07 Nov 2013 10:37:45 +0900
changeset 169439 2eb99b1ad61f79fc78c075618aab6e55cec975f3
parent 168511 a4cb4a7c7595e6255a944b2a19c54226f34e701f
child 171742 7161a2d28363197b76f4090900393cb19f201de4
permissions -rw-r--r--
Bug 862770 - Fix --disable-compile-environment a little. r=gps

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

MODULE = 'xpcom'

if CONFIG['OS_ARCH'] == 'Darwin':
    SOURCES += [
        'xptcinvoke_darwin.cpp',
        'xptcstubs_darwin.cpp',
    ]
    if CONFIG['OS_TEST'] == 'powerpc':
        SOURCES += [
            'xptcinvoke_asm_ppc_rhapsody.s',
        ]
        GENERATED_SOURCES += [
            'xptcstubs_asm_ppc_darwin.s',
        ]

if CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD', 'GNU'):
    if CONFIG['CPU_ARCH'] == 'x86':
        SOURCES += [
            'xptcinvoke_gcc_x86_unix.cpp',
            'xptcstubs_gcc_x86_unix.cpp'
        ]

if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD') or \
   CONFIG['OS_ARCH'].startswith('GNU_'):
    if CONFIG['OS_TEST'] == 'x86_64':
        SOURCES += [
            'xptcinvoke_x86_64_unix.cpp',
            'xptcstubs_x86_64_linux.cpp',
        ]
    elif CONFIG['OS_TEST'].find('86') != -1:
        SOURCES += [
            'xptcinvoke_gcc_x86_unix.cpp',
            'xptcstubs_gcc_x86_unix.cpp'
        ]

if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
    if CONFIG['OS_TEST'].find('ia64') != -1:
        SOURCES += [
            'xptcinvoke_asm_ipf64.s',
            'xptcinvoke_ipf64.cpp',
            'xptcstubs_asm_ipf64.s',
            'xptcstubs_ipf64.cpp'
        ]

if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'x86_64':
    SOURCES += [
        'xptcinvoke_amd64_openbsd.cpp',
        'xptcstubs_amd64_openbsd.cpp'
    ]

if CONFIG['OS_TARGET'] == 'NTO':
    if CONFIG['OS_TEST'] == 'x86':
        SOURCES += [
            'xptcinvoke_gcc_x86_unix.cpp',
            'xptcstubs_gcc_x86_unix.cpp',
        ]
    elif CONFIG['CPU_ARCH'] == 'arm':
        SOURCES += [
            'xptcinvoke_nto_arm.cpp',
            'xptcstubs_nto_arm.cpp',
        ]
    elif CONFIG['OS_TEST'] == 'sh':
        SOURCES += [
            'xptcinvoke_nto_shle.cpp',
            'xptcstubs_asm_shle.s',
            'xptcstubs_nto_shle.cpp'
        ]

if CONFIG['OS_ARCH'] == 'SunOS':
    if CONFIG['OS_TEST'] == 'x86_64':
        if CONFIG['GNU_CC']:
            SOURCES += [
                'xptcinvoke_x86_64_unix.cpp',
                'xptcstubs_x86_64_linux.cpp'
            ]
        else:
            SOURCES += [
                'xptcinvoke_x86_64_solaris.cpp',
                'xptcstubs_asm_x86_64_solaris_SUNW.s',
                'xptcstubs_x86_64_solaris.cpp',
            ]
    elif CONFIG['OS_TEST'].find('86') != -1:
        if CONFIG['GNU_CC']:
            SOURCES += [
                'xptcinvoke_gcc_x86_unix.cpp',
                'xptcstubs_gcc_x86_unix.cpp'
            ]
        else:
            SOURCES += [
                'xptcinvoke_asm_x86_solaris_SUNW.s',
                'xptcinvoke_x86_solaris.cpp',
                'xptcstubs_asm_x86_solaris_SUNW.s',
                'xptcstubs_x86_solaris.cpp'
            ]

if CONFIG['OS_TEST'] == 'alpha':
    if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD'):
        SOURCES += [
            'xptcinvoke_linux_alpha.cpp',
            'xptcstubs_linux_alpha.cpp',
        ]
    elif CONFIG['OS_ARCH'] == 'OpenBSD':
        SOURCES += [
            'xptcinvoke_alpha_openbsd.cpp',
            'xptcstubs_alpha_openbsd.cpp',
        ]

if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['OS_TEST'] == 'sa110':
    if CONFIG['OS_ARCH'] == 'Linux':
        SOURCES += [
            'xptcinvoke_arm.cpp',
            'xptcstubs_arm.cpp'
        ]
    elif CONFIG['OS_ARCH'] == 'NetBSD':
        SOURCES += [
            'xptcinvoke_arm_netbsd.cpp',
            'xptcstubs_arm_netbsd.cpp',
        ]

if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] == 'OpenBSD':
    SOURCES += [
        'xptcinvoke_arm_openbsd.cpp',
        'xptcstubs_arm_openbsd.cpp',
    ]

if CONFIG['OS_ARCH'] == 'HP-UX':
    if CONFIG['CC'] != 'gcc':
        if CONFIG['OS_TEST'] == 'ia64':
            SOURCES += [
                'xptcinvoke_asm_ipf32.s',
                'xptcinvoke_ipf32.cpp',
                'xptcstubs_asm_ipf32.s',
                'xptcstubs_ipf32.cpp',
            ]
        else:
            SOURCES += [
                'xptcinvoke_asm_pa32.s',
                'xptcinvoke_pa32.cpp',
                'xptcstubs_asm_pa32.s',
                'xptcstubs_pa32.cpp'
            ]

if CONFIG['OS_ARCH'] == 'Linux':
    if CONFIG['OS_TEST'] in ('hppa', 'hppa2.0', 'hppa1.1'):
        if CONFIG['GNU_CXX']:
            SOURCES += [
                'xptcinvoke_asm_parisc_linux.s',
                'xptcinvoke_pa32.cpp',
                'xptcstubs_asm_parisc_linux.s',
                'xptcstubs_pa32.cpp',
            ]
        elif CONFIG['COMPILE_ENVIRONMENT']:
            error('Unknown C++ compiler, xptcall assembly will probably be incorrect.')

if CONFIG['OS_ARCH'] == 'NetBSD':
    if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k',
                             'next68k', 'sun3', 'sun3x', 'x68k'):
        SOURCES += [
            'xptcinvoke_netbsd_m68k.cpp',
            'xptcstubs_netbsd_m68k.cpp'
        ]

if CONFIG['OS_ARCH'] == 'Linux':
    if CONFIG['OS_TEST'] == 'm68k':
        SOURCES += [
            'xptcinvoke_linux_m68k.cpp',
            'xptcstubs_linux_m68k.cpp',
        ]
    if CONFIG['OS_TEST'].find('mips') != -1:
        if CONFIG['OS_TEST'].find('mips64') != -1:
            SOURCES += [
                'xptcinvoke_asm_mips64.S',
                'xptcinvoke_mips64.cpp',
                'xptcstubs_asm_mips64.S',
                'xptcstubs_mips64.cpp',
            ]
        else:
            SOURCES += [
                'xptcinvoke_asm_mips.S',
                'xptcinvoke_mips.cpp',
                'xptcstubs_asm_mips.S',
                'xptcstubs_mips.cpp',
            ]

if CONFIG['OS_ARCH'] == 'AIX':
    if CONFIG['HAVE_64BIT_OS']:
        SOURCES += [
            'xptcinvoke_asm_ppc_aix64.s',
            'xptcinvoke_ppc_aix64.cpp',
            'xptcstubs_ppc_aix64.cpp',
        ]
        GENERATED_SOURCES += [
            'xptcstubs_asm_ppc_aix64.s',
        ]
    else:
        SOURCES += [
            'xptcinvoke_ppc_aix.cpp',
            'xptcstubs_ppc_aix.cpp',
        ]
        if CONFIG['AIX_OBJMODEL'] == 'ibm':
            SOURCES += [
                'xptcinvoke_asm_ppc_ibmobj_aix.s',
            ]
        else:
            SOURCES += [
                'xptcinvoke_asm_ppc_aix.s',
            ]
        GENERATED_SOURCES += [
            'xptcstubs_asm_ppc_aix.s',
        ]

if CONFIG['OS_TEST'] == 'powerpc':
    if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
        SOURCES += [
            'xptcinvoke_asm_ppc_linux.S',
            'xptcinvoke_ppc_linux.cpp',
            'xptcstubs_asm_ppc_linux.S',
            'xptcstubs_ppc_linux.cpp',
        ]

if CONFIG['OS_TEST'] == 'powerpc64':
    if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
          SOURCES += [
              'xptcinvoke_asm_ppc64_linux.s',
              'xptcinvoke_ppc64_linux.cpp',
              'xptcstubs_asm_ppc64_linux.s',
              'xptcstubs_ppc64_linux.cpp',
          ]

if CONFIG['OS_TEST'] in ('macppc', 'bebox', 'ofppc', 'prep', 'amigappc'):
    if CONFIG['OS_ARCH'] == 'NetBSD':
        SOURCES += [
            'xptcinvoke_asm_ppc_netbsd.s',
            'xptcinvoke_ppc_netbsd.cpp',
            'xptcstubs_asm_ppc_netbsd.s',
            'xptcstubs_ppc_netbsd.cpp',
        ]

if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc':
    SOURCES += [
        'xptcinvoke_asm_ppc_openbsd.s',
        'xptcinvoke_ppc_openbsd.cpp',
        'xptcstubs_asm_ppc_openbsd.s',
        'xptcstubs_ppc_openbsd.cpp',
    ]

if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'].find('sparc') != -1:
    SOURCES += [
        'xptcinvoke_asm_sparc_linux_GCC3.s',
        'xptcinvoke_sparc_solaris.cpp',
        'xptcstubs_asm_sparc_solaris.s',
        'xptcstubs_sparc_solaris.cpp',
    ]

if CONFIG['OS_ARCH'] == 'NetBSD' and CONFIG['OS_TEST'] == 'sparc':
    SOURCES += [
        'xptcinvoke_asm_sparc_netbsd.s',
        'xptcinvoke_sparc_netbsd.cpp',
        'xptcstubs_asm_sparc_netbsd.s',
        'xptcstubs_sparc_netbsd.cpp',
    ]

if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc':
    SOURCES += [
        'xptcinvoke_asm_sparc_openbsd.s',
        'xptcinvoke_sparc_openbsd.cpp',
        'xptcstubs_asm_sparc_openbsd.s',
        'xptcstubs_sparc_openbsd.cpp',
    ]

if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc64':
    SOURCES += [
        'xptcinvoke_asm_sparc64_openbsd.s',
        'xptcinvoke_sparc64_openbsd.cpp',
        'xptcstubs_asm_sparc64_openbsd.s',
        'xptcstubs_sparc64_openbsd.cpp',
    ]

if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1:
    if CONFIG['HAVE_64BIT_OS']:
        SOURCES += [
            'xptcinvoke_sparcv9_solaris.cpp',
            'xptcstubs_sparcv9_solaris.cpp',
        ]
    else:
        SOURCES += [
            'xptcinvoke_sparc_solaris.cpp',
            'xptcstubs_sparc_solaris.cpp',
        ]
    if CONFIG['GNU_CC']:
        SOURCES += [
            'xptcinvoke_asm_sparc_solaris_GCC3.s',
            'xptcstubs_asm_sparc_solaris.s',
        ]
    else:
        if CONFIG['HAVE_64BIT_OS']:
            SOURCES += [
                'xptcinvoke_asm_sparcv9_solaris_SUNW.s',
                'xptcstubs_asm_sparcv9_solaris.s',
            ]
        else:
            SOURCES += [
                'xptcinvoke_asm_sparc_solaris_SUNW.s',
                'xptcstubs_asm_sparc_solaris.s',
            ]

if CONFIG['OS_ARCH'] == 'Linux':
    if CONFIG['OS_TEST'] == 's390':
        SOURCES += [
            'xptcinvoke_linux_s390.cpp',
            'xptcstubs_linux_s390.cpp',
        ]
    elif CONFIG['OS_TEST'] == 's390x':
        SOURCES += [
            'xptcinvoke_linux_s390x.cpp',
            'xptcstubs_linux_s390x.cpp',
        ]

LIBRARY_NAME = 'xptcmd'

# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = True