2011-10-05 22:15:45 +00:00
|
|
|
#
|
2012-05-21 11:12:37 +00:00
|
|
|
# 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/.
|
2011-10-05 22:15:45 +00:00
|
|
|
|
2012-08-04 18:26:44 +00:00
|
|
|
DEPTH = @DEPTH@
|
2011-10-05 22:15:45 +00:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = \
|
|
|
|
$(srcdir) \
|
2011-11-02 15:28:26 +00:00
|
|
|
$(srcdir)/android \
|
2011-12-20 19:31:53 +00:00
|
|
|
$(srcdir)/gonk \
|
2011-10-05 22:15:45 +00:00
|
|
|
$(srcdir)/fallback \
|
|
|
|
$(srcdir)/sandbox \
|
2011-11-03 10:33:31 +00:00
|
|
|
$(srcdir)/linux \
|
2011-12-05 10:34:27 +00:00
|
|
|
$(srcdir)/windows \
|
2012-03-21 06:36:17 +00:00
|
|
|
$(srcdir)/cocoa \
|
2011-10-05 22:15:45 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
MODULE = hal
|
|
|
|
LIBRARY_NAME = hal_s
|
|
|
|
FORCE_STATIC_LIB = 1
|
|
|
|
LIBXUL_LIBRARY = 1
|
|
|
|
EXPORT_LIBRARY = 1
|
2012-07-12 19:34:18 +00:00
|
|
|
FAIL_ON_WARNINGS = 1
|
2011-10-05 22:15:45 +00:00
|
|
|
|
|
|
|
EXPORTS_NAMESPACES = mozilla
|
|
|
|
EXPORTS_mozilla = \
|
|
|
|
Hal.h \
|
|
|
|
HalImpl.h \
|
|
|
|
HalSandbox.h \
|
2012-02-05 19:51:06 +00:00
|
|
|
HalSensor.h \
|
2012-02-02 06:09:00 +00:00
|
|
|
HalTypes.h \
|
2012-03-07 11:03:25 +00:00
|
|
|
HalWakeLock.h \
|
2011-10-05 22:15:45 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
Hal.cpp \
|
|
|
|
SandboxHal.cpp \
|
2011-12-17 21:04:26 +00:00
|
|
|
WindowIdentifier.cpp \
|
2012-03-07 11:03:25 +00:00
|
|
|
HalWakeLock.cpp \
|
2011-10-05 22:15:45 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2011-11-22 19:51:51 +00:00
|
|
|
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
2012-02-05 19:51:06 +00:00
|
|
|
CPPSRCS += \
|
|
|
|
AndroidHal.cpp \
|
|
|
|
AndroidSensor.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackPower.cpp \
|
2012-07-06 10:42:10 +00:00
|
|
|
FallbackAlarm.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
$(NULL)
|
2011-12-20 19:31:53 +00:00
|
|
|
else ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
2012-02-05 19:51:06 +00:00
|
|
|
CPPSRCS += \
|
|
|
|
GonkHal.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
LinuxPower.cpp \
|
2012-02-06 02:41:15 +00:00
|
|
|
GonkSensor.cpp \
|
2012-04-13 04:02:33 +00:00
|
|
|
UeventPoller.cpp \
|
2012-04-22 18:09:22 +00:00
|
|
|
GonkSwitch.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
$(NULL)
|
2011-11-03 10:33:31 +00:00
|
|
|
else ifeq (Linux,$(OS_TARGET))
|
2012-02-05 19:51:06 +00:00
|
|
|
CPPSRCS += \
|
2012-05-03 10:05:32 +00:00
|
|
|
LinuxPower.cpp \
|
2012-05-08 21:36:07 +00:00
|
|
|
FallbackScreenConfiguration.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
FallbackSensor.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackVibration.cpp \
|
2012-07-06 10:42:10 +00:00
|
|
|
FallbackAlarm.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
$(NULL)
|
2011-11-03 10:33:31 +00:00
|
|
|
ifdef MOZ_ENABLE_DBUS
|
|
|
|
CPPSRCS += UPowerClient.cpp
|
2012-05-03 10:05:32 +00:00
|
|
|
else
|
|
|
|
CPPSRCS += FallbackBattery.cpp
|
2011-11-03 10:33:31 +00:00
|
|
|
endif
|
2011-12-05 10:34:27 +00:00
|
|
|
else ifeq (WINNT,$(OS_TARGET))
|
2012-02-05 19:51:06 +00:00
|
|
|
CPPSRCS += \
|
|
|
|
WindowsBattery.cpp \
|
2012-05-01 03:04:30 +00:00
|
|
|
WindowsSensor.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackVibration.cpp \
|
2012-05-08 21:36:07 +00:00
|
|
|
FallbackScreenConfiguration.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackPower.cpp \
|
2012-07-06 10:42:10 +00:00
|
|
|
FallbackAlarm.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
$(NULL)
|
2012-03-21 06:36:17 +00:00
|
|
|
else ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
CPPSRCS += \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackBattery.cpp \
|
|
|
|
FallbackVibration.cpp \
|
|
|
|
FallbackPower.cpp \
|
2012-05-08 21:36:07 +00:00
|
|
|
FallbackScreenConfiguration.cpp \
|
2012-07-06 10:42:10 +00:00
|
|
|
FallbackAlarm.cpp \
|
2012-03-21 06:36:17 +00:00
|
|
|
$(NULL)
|
|
|
|
CMMSRCS += \
|
|
|
|
CocoaSensor.mm \
|
|
|
|
smslib.mm \
|
|
|
|
$(NULL)
|
2012-05-29 08:57:15 +00:00
|
|
|
else ifneq (,$(filter OpenBSD NetBSD FreeBSD DragonFlyBSD,$(OS_TARGET)))
|
|
|
|
CPPSRCS += \
|
|
|
|
FallbackSensor.cpp \
|
|
|
|
FallbackVibration.cpp \
|
|
|
|
FallbackPower.cpp \
|
|
|
|
FallbackScreenConfiguration.cpp \
|
2012-07-06 10:42:10 +00:00
|
|
|
FallbackAlarm.cpp \
|
2012-05-29 08:57:15 +00:00
|
|
|
$(NULL)
|
|
|
|
ifdef MOZ_ENABLE_DBUS
|
|
|
|
CPPSRCS += UPowerClient.cpp
|
|
|
|
else
|
|
|
|
CPPSRCS += FallbackBattery.cpp
|
|
|
|
endif
|
2011-11-02 15:28:26 +00:00
|
|
|
else
|
2012-02-05 19:51:06 +00:00
|
|
|
CPPSRCS += \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackBattery.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
FallbackSensor.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackVibration.cpp \
|
|
|
|
FallbackPower.cpp \
|
2012-05-08 21:36:07 +00:00
|
|
|
FallbackScreenConfiguration.cpp \
|
2012-07-06 10:42:10 +00:00
|
|
|
FallbackAlarm.cpp \
|
2012-02-05 19:51:06 +00:00
|
|
|
$(NULL)
|
2011-11-02 15:28:26 +00:00
|
|
|
endif
|
2011-10-05 22:15:45 +00:00
|
|
|
|
2012-05-03 10:05:32 +00:00
|
|
|
# Fallbacks for backends implemented on Gonk only.
|
2012-02-02 06:09:00 +00:00
|
|
|
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT)) #{
|
2012-04-16 22:35:33 +00:00
|
|
|
CPPSRCS += \
|
|
|
|
FallbackLights.cpp \
|
|
|
|
FallbackTime.cpp \
|
|
|
|
FallbackWakeLocks.cpp \
|
2012-04-22 18:09:22 +00:00
|
|
|
FallbackSwitch.cpp \
|
2012-05-03 10:05:32 +00:00
|
|
|
FallbackScreenPower.cpp \
|
2012-08-05 05:09:39 +00:00
|
|
|
FallbackProcessPriority.cpp \
|
2012-04-16 22:35:33 +00:00
|
|
|
$(NULL)
|
2012-02-02 06:09:00 +00:00
|
|
|
endif #}
|
|
|
|
|
2012-05-03 10:05:32 +00:00
|
|
|
# Fallbacks for backends implemented on Android only.
|
2012-03-20 13:09:45 +00:00
|
|
|
ifneq (android,$(MOZ_WIDGET_TOOLKIT))
|
2012-05-08 21:36:07 +00:00
|
|
|
CPPSRCS += FallbackNetwork.cpp
|
|
|
|
endif
|
|
|
|
|
2011-10-05 22:15:45 +00:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
2011-11-03 10:33:31 +00:00
|
|
|
|
|
|
|
CFLAGS += $(MOZ_DBUS_GLIB_CFLAGS)
|
2012-03-07 16:27:09 +00:00
|
|
|
CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS)
|
2012-05-08 21:36:07 +00:00
|
|
|
|
|
|
|
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
# So that we can call nsScreenManagerGonk::GetConfiguration().
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/gonk
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/xpwidgets
|
2012-07-06 10:42:10 +00:00
|
|
|
endif
|