b=477727; add WINCE_WINDOWS_MOBILE define and associated configure flag; r=ted
authorVladimir Vukicevic <vladimir@pobox.com>
Thu, 12 Feb 2009 18:26:01 -0800
changeset 24969 b0d84b409d1b3224c4a06395b623f23ce46c78c4
parent 24968 ecac68597c75e867aae46fd7cdd1b834273db94b
child 24970 ab5109cc5e979ccc282bfb81eaf83591933c1dc6
push id5332
push uservladimir@mozilla.com
push dateFri, 13 Feb 2009 02:28:10 +0000
treeherdermozilla-central@bdffc0e8fcd8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs477727
milestone1.9.2a1pre
b=477727; add WINCE_WINDOWS_MOBILE define and associated configure flag; r=ted
config/autoconf.mk.in
configure.in
intl/build/Makefile.in
js/src/shell/Makefile.in
js/src/xpconnect/shell/Makefile.in
toolkit/library/Makefile.in
xpcom/build/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -617,17 +617,18 @@ MOZ_PYTHON_VER_DOTTED = @MOZ_PYTHON_VER_
 MOZ_PYTHON_VER = @MOZ_PYTHON_VER@
 
 # Codesighs tools option, enables win32 mapfiles.
 MOZ_MAPINFO	= @MOZ_MAPINFO@
 
 MOZ_PHOENIX	= @MOZ_PHOENIX@
 MOZ_XULRUNNER	= @MOZ_XULRUNNER@
 WINCE		= @WINCE@
-WINCE_SDK_DIR      = @WINCE_SDK_DIR@
+WINCE_SDK_DIR   = @WINCE_SDK_DIR@
+WINCE_WINDOWS_MOBILE = @WINCE_WINDOWS_MOBILE@
 
 MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_ID@
 
 NS_OSSO 	= @NS_OSSO@
 MOZ_PLATFORM_HILDON = @MOZ_PLATFORM_HILDON@
 
 LIBHILDONMIME_CFLAGS	= @LIBHILDONMIME_CFLAGS@
 LIBHILDONMIME_LIBS	= @LIBHILDONMIME_LIBS@
--- a/configure.in
+++ b/configure.in
@@ -230,35 +230,51 @@ dnl ====================================
 if test "$COMPILE_ENVIRONMENT"; then
 
 dnl Do some special WinCE toolchain stuff
 case "$target" in
 *wince)
 
     MOZ_ARG_WITH_STRING(wince-sdk,
     [  --with-wince-sdk=WINCE_SDK_DIR
-                        The path to the windows mobile sdk],
+                        The path to the Windows CE SDK],
     WINCE_SDK_DIR=$withval)
 
+    dnl Default to Windows Mobile components enabled
+    WINCE_WINDOWS_MOBILE=1
+
+    MOZ_ARG_DISABLE_BOOL(windows-mobile-components,
+    [  --disable-windows-mobile-components
+         Disable Windows Mobile specific components from CE build],
+    WINCE_WINDOWS_MOBILE=,
+    WINCE_WINDOWS_MOBILE=1)
+
+    if test "$WINCE_WINDOWS_MOBILE"; then
+        AC_DEFINE(WINCE_WINDOWS_MOBILE)
+    fi
+
+    AC_SUBST(WINCE_WINDOWS_MOBILE)
+
     export WINCE=1
 
     echo -----------------------------------------------------------------------------
     echo Building Windows CE Shunt Library and Tool Chain
     echo Using SDK in:
     echo $WINCE_SDK_DIR
 
     ac_exeext=.exe
 
     _pwdw=`pwd -W`
     _pwd=`pwd`
     make WINCE_SDK_DIR="$WINCE_SDK_DIR" TOPSRCDIR="$srcdir" OBJDIR="$_pwdw" -C $srcdir/build/wince/tools
 
     CC="$_pwd/dist/sdk/bin/arm-wince-gcc"
     CXX="$_pwd/dist/sdk/bin/arm-wince-gcc"
-    CPP="$_pwd/dist/sdk/bin/arm-wince-gcc"
+    CPP="$_pwd/dist/sdk/bin/arm-wince-gcc -E -nologo"
+    CXXCPP="$_pwd/dist/sdk/bin/arm-wince-gcc -TP -E -nologo"
     LD="$_pwd/dist/sdk/bin/arm-wince-link"
     AR="$_pwd/dist/sdk/bin/arm-wince-lib"
     AS="$_pwd/dist/sdk/bin/arm-wince-as"
     RC="$_pwd/dist/sdk/bin/arm-wince-res"
 
 
     echo -----------------------------------------------------------------------------
 
@@ -2019,16 +2035,22 @@ case "$target" in
     TARGET_MD_ARCH=win32
     _PLATFORM_DEFAULT_TOOLKIT='windows'
     BIN_SUFFIX='.exe'
     USE_SHORT_LIBNAME=1
     MOZ_ENABLE_POSTSCRIPT=
     MOZ_USER_DIR="Mozilla"
 
     MOZ_GFX_OPTIMIZE_MOBILE=1
+
+    # Sanity check for WINCE_WINDOWS_MOBILE
+    if test "$WINCE_WINDOWS_MOBILE"; then
+       AC_CHECK_HEADER(tpcshell.h, [],
+            AC_MSG_ERROR([Can't find tpcshell.h in your SDK; are you sure you don't need --disable-windos-mobile-components?]))
+    fi
 ;;
 
 
 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
     DSO_CFLAGS=
     DSO_PIC_CFLAGS=
     DLL_SUFFIX=.dll
     RC=rc.exe
--- a/intl/build/Makefile.in
+++ b/intl/build/Makefile.in
@@ -104,10 +104,12 @@ include $(topsrcdir)/config/rules.mk
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 EXTRA_DSO_LDOPTS += \
 		$(MOZ_PANGO_LIBS) \
 		$(NULL)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+ifndef WINCE
 OS_LIBS += $(call EXPAND_LIBNAME,usp10)
 endif
+endif
--- a/js/src/shell/Makefile.in
+++ b/js/src/shell/Makefile.in
@@ -48,16 +48,22 @@ PROGRAM         = js$(BIN_SUFFIX)
 CPPSRCS		= js.cpp
 
 DEFINES         += -DEXPORT_JS_API
 
 LIBS      = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX)
 
 LOCAL_INCLUDES += -I$(topsrcdir) -I..
 
+ifdef _MSC_VER
+ifdef WINCE
+WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
+endif
+endif
+
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_SHARK
 CFLAGS += -F/System/Library/PrivateFrameworks
 CXXFLAGS += -F/System/Library/PrivateFrameworks
 LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
 endif
 
--- a/js/src/xpconnect/shell/Makefile.in
+++ b/js/src/xpconnect/shell/Makefile.in
@@ -63,16 +63,22 @@ LIBS		= \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
 		$(LIBXUL_LIBS) \
 		$(MOZ_JS_LIBS) \
 		$(NSPR_LIBS) \
 		$(NULL)
 
 NSDISTMODE = copy
 
+ifdef _MSC_VER
+ifdef WINCE
+WIN32_EXE_LDFLAGS += -ENTRY:mainACRTStartup
+endif
+endif
+
 include $(topsrcdir)/config/rules.mk
 
 DEFINES		+= -DJS_THREADSAFE
 
 ifdef MOZ_SHARK
 DEFINES += -DMOZ_SHARK
 CFLAGS += -F/System/Library/PrivateFrameworks
 LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -204,17 +204,17 @@ EXTRA_DSO_LDOPTS += \
 	-framework IOKit \
 	-lcrypto \
 	$(TK_LIBS) \
 	$(NULL)
 
 ifdef MOZ_SYDNEYAUDIO
 EXTRA_DSO_LDOPTS += \
 	-framework CoreAudio \
- 	-framework AudioToolbox \
+	-framework AudioToolbox \
 	-framework AudioUnit \
 	$(NULL)
 endif
 endif
 
 ifdef MOZ_PLATFORM_HILDON
 EXTRA_DSO_LDOPTS += $(LIBHILDONMIME_LIBS)
 endif 
@@ -257,17 +257,20 @@ endif
 
 ifeq ($(OS_ARCH),WINNT)
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32)
 ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
 endif
 endif # WINNT
 ifeq ($(OS_ARCH),WINCE)
-EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell cellcore uuid ole32 oleaut32 Ws2)
+EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell uuid ole32 oleaut32 Ws2)
+ifdef WINCE_WINDOWS_MOBILE
+EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, cellcore)
+endif
 endif
 
 
 ifdef MOZ_JPROF
 EXTRA_DSO_LDOPTS += -ljprof
 endif
 
 ifdef MOZ_ENABLE_QT
--- a/xpcom/build/Makefile.in
+++ b/xpcom/build/Makefile.in
@@ -187,10 +187,14 @@ endif
 
 ifeq ($(OS_ARCH),WINNT)
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version)
 ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
 endif
 endif # WINNT
 
+ifeq ($(OS_ARCH),WINCE)
+EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,ole32)
+endif # WINCE
+
 export:: $(XPCOM_GLUE_SRC_CSRCS) $(XPCOM_GLUE_SRC_CPPSRCS) $(XPCOM_GLUENS_SRC_CPPSRCS)
 	$(INSTALL) $^ .