Bug 674741 - Part 6: NFC Build System Changes. r=khuey

--HG--
extra : rebase_source : 259fbadf1e2dad187d2704a34ec94f883c25baeb
This commit is contained in:
Garner Lee 2013-11-12 10:11:39 -08:00
parent 09fec71ba0
commit 28ef93aa8d
9 changed files with 104 additions and 0 deletions

View File

@ -189,6 +189,9 @@
@BINPATH@/components/dom_geolocation.xpt @BINPATH@/components/dom_geolocation.xpt
@BINPATH@/components/dom_media.xpt @BINPATH@/components/dom_media.xpt
@BINPATH@/components/dom_network.xpt @BINPATH@/components/dom_network.xpt
#ifdef MOZ_NFC
@BINPATH@/components/dom_nfc.xpt
#endif
@BINPATH@/components/dom_notification.xpt @BINPATH@/components/dom_notification.xpt
@BINPATH@/components/dom_html.xpt @BINPATH@/components/dom_html.xpt
@BINPATH@/components/dom_indexeddb.xpt @BINPATH@/components/dom_indexeddb.xpt
@ -494,6 +497,13 @@
@BINPATH@/components/webvtt.xpt @BINPATH@/components/webvtt.xpt
@BINPATH@/components/WebVTT.manifest @BINPATH@/components/WebVTT.manifest
@BINPATH@/components/WebVTTParserWrapper.js @BINPATH@/components/WebVTTParserWrapper.js
#ifdef MOZ_NFC
@BINPATH@/components/nsNfc.manifest
@BINPATH@/components/nsNfc.js
@BINPATH@/components/Nfc.manifest
@BINPATH@/components/Nfc.js
@BINPATH@/components/NfcContentHelper.js
#endif
#ifdef MOZ_ENABLE_DBUS #ifdef MOZ_ENABLE_DBUS
@BINPATH@/components/@DLL_PREFIX@dbusservice@DLL_SUFFIX@ @BINPATH@/components/@DLL_PREFIX@dbusservice@DLL_SUFFIX@
#endif #endif

View File

@ -223,6 +223,7 @@ if test -n "$gonkdir" ; then
GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib -I$gonkdir/dalvik/libnativehelper/include/nativehelper" GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib -I$gonkdir/dalvik/libnativehelper/include/nativehelper"
MOZ_B2G_BT=1 MOZ_B2G_BT=1
MOZ_B2G_BT_BLUEZ=1 MOZ_B2G_BT_BLUEZ=1
MOZ_NFC=1
MOZ_B2G_CAMERA=1 MOZ_B2G_CAMERA=1
MOZ_OMX_DECODER=1 MOZ_OMX_DECODER=1
AC_SUBST(MOZ_OMX_DECODER) AC_SUBST(MOZ_OMX_DECODER)
@ -239,6 +240,7 @@ if test -n "$gonkdir" ; then
MOZ_B2G_BT_BLUEDROID=1 MOZ_B2G_BT_BLUEDROID=1
fi fi
MOZ_NFC=1
MOZ_B2G_CAMERA=1 MOZ_B2G_CAMERA=1
MOZ_OMX_DECODER=1 MOZ_OMX_DECODER=1
AC_SUBST(MOZ_OMX_DECODER) AC_SUBST(MOZ_OMX_DECODER)
@ -7306,6 +7308,18 @@ AC_SUBST(MOZ_B2G_BT)
AC_SUBST(MOZ_B2G_BT_BLUEZ) AC_SUBST(MOZ_B2G_BT_BLUEZ)
AC_SUBST(MOZ_B2G_BT_BLUEDROID) AC_SUBST(MOZ_B2G_BT_BLUEDROID)
dnl ========================================================
dnl = Enable NFC Interface for B2G (Gonk usually)
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(b2g-nfc,
[ --enable-nfc Set compile flags necessary for compiling NFC API ],
MOZ_NFC=1,
MOZ_NFC= )
if test -n "$MOZ_NFC"; then
AC_DEFINE(MOZ_NFC)
fi
AC_SUBST(MOZ_NFC)
dnl ======================================================== dnl ========================================================
dnl = Enable Pico Speech Synthesis (Gonk usually) dnl = Enable Pico Speech Synthesis (Gonk usually)
dnl ======================================================== dnl ========================================================

View File

@ -97,6 +97,9 @@ if CONFIG['MOZ_PAY']:
if CONFIG['MOZ_GAMEPAD']: if CONFIG['MOZ_GAMEPAD']:
PARALLEL_DIRS += ['gamepad'] PARALLEL_DIRS += ['gamepad']
if CONFIG['MOZ_NFC']:
PARALLEL_DIRS += ['nfc']
# bindings/test is here, because it needs to build after bindings/, and # bindings/test is here, because it needs to build after bindings/, and
# we build subdirectories before ourselves. # we build subdirectories before ourselves.
TEST_DIRS += [ TEST_DIRS += [

25
dom/nfc/moz.build Normal file
View File

@ -0,0 +1,25 @@
# 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/.
#
# Copyright © 2013 Deutsche Telekom, Inc.
if CONFIG['MOZ_NFC']:
MODULE = 'dom'
EXPORTS.mozilla.dom += [
'MozNdefRecord.h',
]
SOURCES += [
'MozNdefRecord.cpp',
]
EXTRA_COMPONENTS += [
'nsNfc.js',
'nsNfc.manifest',
]
FAIL_ON_WARNINGS = True
LIBRARY_NAME = 'dom_nfc_s'
LIBXUL_LIBRARY = True

8
dom/nfc/nsNfc.manifest Normal file
View File

@ -0,0 +1,8 @@
component {6ff2b290-2573-11e3-8224-0800200c9a66} nsNfc.js
contract @mozilla.org/navigatorNfc;1 {6ff2b290-2573-11e3-8224-0800200c9a66}
component {4e1e2e90-3137-11e3-aa6e-0800200c9a66} nsNfc.js
contract @mozilla.org/nfc/NFCTag;1 {4e1e2e90-3137-11e3-aa6e-0800200c9a66}
component {c1b2bcf0-35eb-11e3-aa6e-0800200c9a66} nsNfc.js
contract @mozilla.org/nfc/NFCPeer;1 {c1b2bcf0-35eb-11e3-aa6e-0800200c9a66}

View File

@ -0,0 +1,15 @@
# 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/.
#
# Copyright © 2013 Deutsche Telekom, Inc.
# Nfc.js
component {2ff24790-5e74-11e1-b86c-0800200c9a66} Nfc.js
contract @mozilla.org/nfc;1 {2ff24790-5e74-11e1-b86c-0800200c9a66}
category profile-after-change Nfc @mozilla.org/nfc;1
# NfcContentHelper.js
component {4d72c120-da5f-11e1-9b23-0800200c9a66} NfcContentHelper.js
contract @mozilla.org/nfc/content-helper;1 {4d72c120-da5f-11e1-9b23-0800200c9a66}
category profile-after-change NfcContentHelper @mozilla.org/nfc/content-helper;1

View File

@ -85,6 +85,20 @@ if CONFIG['MOZ_B2G_RIL']:
'ril_worker.js', 'ril_worker.js',
] ]
if CONFIG['MOZ_NFC']:
XPIDL_SOURCES += [
'nsINfcContentHelper.idl',
]
EXTRA_COMPONENTS += [
'Nfc.js',
'Nfc.manifest',
'NfcContentHelper.js',
]
EXTRA_JS_MODULES += [
'nfc_consts.js',
'nfc_worker.js',
]
FAIL_ON_WARNINGS = True FAIL_ON_WARNINGS = True
LIBXUL_LIBRARY = True LIBXUL_LIBRARY = True
@ -97,6 +111,7 @@ LOCAL_INCLUDES += [
'/content/events/src', '/content/events/src',
'/dom/base', '/dom/base',
'/dom/bluetooth', '/dom/bluetooth',
'/dom/nfc',
'/dom/src/geolocation', '/dom/src/geolocation',
'/dom/wifi', '/dom/wifi',
] ]

View File

@ -18,6 +18,16 @@ SOURCES += [
'nsLayoutStatics.cpp', 'nsLayoutStatics.cpp',
] ]
if CONFIG['MOZ_NFC']:
SHARED_LIBRARY_LIBS += [
'%s/dom/nfc/%sdom_nfc_s.%s' % (TOPOBJDIR, CONFIG['LIB_PREFIX'], CONFIG['LIB_SUFFIX'])
]
if CONFIG['MOZ_NFC']:
LOCAL_INCLUDES += [
'/dom/nfc'
]
FAIL_ON_WARNINGS = True FAIL_ON_WARNINGS = True
LIBXUL_LIBRARY = True LIBXUL_LIBRARY = True

View File

@ -117,6 +117,10 @@ ifdef MOZ_B2G_CAMERA #{
OS_LIBS += -lstagefright -lstagefright_omx OS_LIBS += -lstagefright -lstagefright_omx
endif #} endif #}
ifdef MOZ_NFC #{
STATIC_LIBS += moznfc_s
endif #}
ifdef MOZ_IPDL_TESTS ifdef MOZ_IPDL_TESTS
STATIC_LIBS += ipdlunittest_s STATIC_LIBS += ipdlunittest_s
endif endif