Bug 709776 - Move tri-licensed Android library parts under mozglue/. r=blassey,a=blassey
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 12 Dec 2011 16:22:25 +0100
changeset 85107 3352a89d2dde958559295f8abc7622fe3d64430d
parent 85106 185d4aa163bce923be44f4e5ca5c6ae69d2e9c62
child 85108 43ece237bceb4404955c7608c8091a3c705fb871
push idunknown
push userunknown
push dateunknown
reviewersblassey, blassey
bugs709776
milestone11.0a2
Bug 709776 - Move tri-licensed Android library parts under mozglue/. r=blassey,a=blassey
allmakefiles.sh
mozglue/Makefile.in
mozglue/android/APKOpen.cpp
mozglue/android/APKOpen.h
mozglue/android/Makefile.in
mozglue/android/nsGeckoUtils.cpp
mozglue/build/Makefile.in
other-licenses/android/APKOpen.cpp
other-licenses/android/APKOpen.h
other-licenses/android/Makefile.in
other-licenses/android/nsGeckoUtils.cpp
--- a/allmakefiles.sh
+++ b/allmakefiles.sh
@@ -82,16 +82,17 @@ if [ ! "$LIBXUL_SDK" ]; then
     add_makefiles "
       memory/jemalloc/Makefile
     "
   fi
   if [ "$MOZ_WIDGET_TOOLKIT" = "android" ]; then
     add_makefiles "
       other-licenses/android/Makefile
       other-licenses/skia-npapi/Makefile
+      mozglue/android/Makefile
     "
   fi
 fi
 
 if [ "$OS_ARCH" = "WINNT" ]; then
   add_makefiles "
     build/win32/Makefile
     build/win32/crashinjectdll/Makefile
--- a/mozglue/Makefile.in
+++ b/mozglue/Makefile.in
@@ -37,11 +37,16 @@
 
 DEPTH		= ..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = build
+DIRS =
+ifeq (android,$(MOZ_WIDGET_TOOLKIT))
+DIRS += android
+endif
+
+DIRS += build
 
 include $(topsrcdir)/config/rules.mk
rename from other-licenses/android/APKOpen.cpp
rename to mozglue/android/APKOpen.cpp
rename from other-licenses/android/APKOpen.h
rename to mozglue/android/APKOpen.h
copy from other-licenses/android/Makefile.in
copy to mozglue/android/Makefile.in
--- a/other-licenses/android/Makefile.in
+++ b/mozglue/android/Makefile.in
@@ -42,58 +42,25 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE           = android
 LIBRARY_NAME     = android
 FORCE_STATIC_LIB = 1
 
 DEFINES += \
-  -DLINKER_DEBUG=0 \
-  -DMOZ_LINKER \
-  -DLINKER_TEXT_BASE=0xB0001000 \
-  -DLINKER_AREA_SIZE=0x01000000 \
   -DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
   $(NULL)
 
-ifeq ($(CPU_ARCH),arm)
-DEFINES += -DANDROID_ARM_LINKER
-else
-ifeq ($(CPU_ARCH),x86)
-DEFINES += -DANDROID_X86_LINKER
-endif
-endif
-
 CPPSRCS = \
   nsGeckoUtils.cpp \
   APKOpen.cpp \
   $(NULL)
 
-CSRCS = \
-  ba.c \
-  debugger.c \
-  dlfcn.c \
-  ev_streams.c \
-  ev_timers.c \
-  getaddrinfo.c \
-  linker.c \
-  linker_format.c \
-  ns_name.c \
-  ns_netint.c \
-  ns_parse.c \
-  ns_print.c \
-  ns_samedomain.c \
-  ns_ttl.c \
-  res_comp.c \
-  res_data.c \
-  res_debug.c \
-  res_init.c \
-  res_mkquery.c \
-  res_send.c \
-  res_state.c \
-  rt.c \
-  $(NULL)
-
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/startup
+LOCAL_INCLUDES += -I$(topsrcdir)/other-licenses/android
+ifeq ($(CPU_ARCH),arm)
+DEFINES += -DANDROID_ARM_LINKER
+endif
 
 EXPORTS = APKOpen.h
 
 include $(topsrcdir)/config/rules.mk
rename from other-licenses/android/nsGeckoUtils.cpp
rename to mozglue/android/nsGeckoUtils.cpp
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -79,16 +79,17 @@ ifneq (,$(filter -DEFAULTLIB:mozcrt,$(MO
 NO_INSTALL_IMPORT_LIBRARY = 1
 endif
 endif
 
 ifeq (android, $(MOZ_WIDGET_TOOLKIT))
 # Add Android linker
 EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
 SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,$(DEPTH)/other-licenses/android)
+SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,../android)
 endif
 
 ifeq (Android, $(OS_TARGET))
 WRAP_LDFLAGS =
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/other-licenses/android/Makefile.in
+++ b/other-licenses/android/Makefile.in
@@ -46,32 +46,26 @@ MODULE           = android
 LIBRARY_NAME     = android
 FORCE_STATIC_LIB = 1
 
 DEFINES += \
   -DLINKER_DEBUG=0 \
   -DMOZ_LINKER \
   -DLINKER_TEXT_BASE=0xB0001000 \
   -DLINKER_AREA_SIZE=0x01000000 \
-  -DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
   $(NULL)
 
 ifeq ($(CPU_ARCH),arm)
 DEFINES += -DANDROID_ARM_LINKER
 else
 ifeq ($(CPU_ARCH),x86)
 DEFINES += -DANDROID_X86_LINKER
 endif
 endif
 
-CPPSRCS = \
-  nsGeckoUtils.cpp \
-  APKOpen.cpp \
-  $(NULL)
-
 CSRCS = \
   ba.c \
   debugger.c \
   dlfcn.c \
   ev_streams.c \
   ev_timers.c \
   getaddrinfo.c \
   linker.c \
@@ -87,13 +81,9 @@ CSRCS = \
   res_debug.c \
   res_init.c \
   res_mkquery.c \
   res_send.c \
   res_state.c \
   rt.c \
   $(NULL)
 
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/startup
-
-EXPORTS = APKOpen.h
-
 include $(topsrcdir)/config/rules.mk