make xpcom typelib tools build on wince. r/a=benjamin

This commit is contained in:
dougt%meer.net 2005-07-05 17:02:20 +00:00
parent a66757316c
commit b0171845f9
8 changed files with 45 additions and 34 deletions

View File

@ -512,11 +512,6 @@ XPIDL_COMPILE = $(CYGWIN_WRAPPER) $(DIST)/bin/xpidl$(BIN_SUFFIX)
XPIDL_LINK = $(CYGWIN_WRAPPER) $(DIST)/bin/xpt_link$(BIN_SUFFIX)
endif
ifeq (,$(filter-out WINCE,$(OS_ARCH)))
XPIDL_COMPILE = $(CYGWIN_WRAPPER) $(MOZ_TOOLS)/bin/xpidl.exe
XPIDL_LINK = $(CYGWIN_WRAPPER) $(MOZ_TOOLS)/bin/xpt_link.exe
endif
REQ_INCLUDES = $(foreach d,$(REQUIRES),-I$(DIST)/include/$d)
INCLUDES = $(LOCAL_INCLUDES) $(REQ_INCLUDES) -I$(PUBLIC) -I$(DIST)/include $(OS_INCLUDES)

View File

@ -898,7 +898,6 @@ $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile
ifeq ($(MOZ_OS2_TOOLS),VACPP)
$(LD) -OUT:$@ $(LDFLAGS) $(HOST_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) -ST:0x100000
else
ifeq (WINCE,$(OS_ARCH))
$(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
@ -945,7 +944,11 @@ ifdef MOZ_POST_PROGRAM_COMMAND
endif
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in
ifeq (WINCE,$(OS_ARCH))
$(HOST_LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
$(HOST_CC) $(OUTOPTION)$@ $(HOST_CFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
endif
#
# Purify target. Solaris/sparc only to start.

View File

@ -1361,6 +1361,7 @@ case "$target" in
*-wince*)
MOZ_TOOLS_DIR=`echo $MOZ_TOOLS`
AR_LIST="$AR -list"
AR_EXTRACT="$AR -extract"
AR_DELETE="$AR d"
@ -1379,6 +1380,7 @@ case "$target" in
HOST_CXX=cl
HOST_LD=link
HOST_AR='lib -OUT:$@'
HOST_RANLIB='echo ranlib'
MOZ_OPTIMIZE_FLAGS='-O1'
AR_FLAGS='-NOLOGO -OUT:"$@"'
@ -1420,6 +1422,8 @@ case "$target" in
XPCOM_GLUE_LDOPTS='$(DIST)/lib/xpcomglue_s.lib $(DIST)/lib/xpcom.lib'
XPCOM_STANDALONE_GLUE_LDOPTS='$(DIST)/lib/xpcomglue.lib'
ZIP=zip
LIBIDL_CFLAGS="-I$MOZ_TOOLS_DIR/include ${GLIB_CFLAGS}"
LIBIDL_LIBS="$MOZ_TOOLS_DIR/lib/libidl-0.6.lib $MOZ_TOOLS_DIR/lib/glib-1.2.lib"
AC_DEFINE(HAVE_SNPRINTF)
AC_DEFINE(_WINDOWS)
@ -6020,7 +6024,7 @@ int main() {
fi
if test -n "$CROSS_COMPILE"; then
if test -z "$HOST_LIBIDL_CONFIG"; then
if test -z "$HOST_LIBIDL_CONFIG"; then
HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG"
fi
if test -n "$HOST_LIBIDL_CONFIG"; then

View File

@ -43,11 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
DIRS = xpt
ifndef WINCE
DIRS += xpidl
endif
DIRS = xpt xpidl
include $(topsrcdir)/config/rules.mk

View File

@ -27,7 +27,13 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
ifndef WINCE
# Sadly, the code here is too smart for the WinCE compiler's brain
PROGRAM = xpidl$(BIN_SUFFIX)
SDK_BINARY = $(PROGRAM)
endif
INTERNAL_TOOLS = 1
# glib and libIDL link against the non-debug msvcrt
@ -43,10 +49,6 @@ CSRCS = \
xpidl_java.c \
$(NULL)
SDK_BINARY = \
$(PROGRAM) \
$(NULL)
ifdef CROSS_COMPILE
HOST_PROGRAM = host_xpidl$(HOST_BIN_SUFFIX)
HOST_CSRCS = $(CSRCS)
@ -58,7 +60,7 @@ CFLAGS += $(LIBIDL_CFLAGS)
# Compile directly against the static lib, so we can use xpidl during the build
# without the shared library path being set.
ifeq (WINNT,$(OS_ARCH))
ifneq (,$(filter WINNT WINCE OS2,$(OS_ARCH)))
DEFINES += -DEXPORT_XPT_API
ifndef GNU_CC
LDFLAGS += -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRTD
@ -70,13 +72,25 @@ LIBS = $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) $(LIBIDL_LIBS)
EXTRA_DEPS = $(wildcard $(DIST)/lib/$(LIB_PREFIX)xpt.*)
ifdef CROSS_COMPILE
HOST_CFLAGS += $(HOST_LIBIDL_CFLAGS)
HOST_LIBS = $(DIST)/host/lib/libhostxpt.$(LIB_SUFFIX) $(HOST_LIBIDL_LIBS)
HOST_EXTRA_DEPS = $(wildcard $(DIST)/host/lib/libhostxpt.*)
HOST_LIBS = $(DIST)/host/lib/$(LIB_PREFIX)hostxpt.$(LIB_SUFFIX) $(HOST_LIBIDL_LIBS)
HOST_EXTRA_DEPS = $(wildcard $(DIST)/host/lib/$(LIB_PREFIX)hostxpt.*)
ifdef HOST_NSPR_MDCPUCFG
HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
endif
ifdef WINCE
# Compile directly against the static lib, so we can use the tools
# during the build without the shared library path being set.
HOST_CFLAGS += -DEXPORT_XPT_API
# Force MOZ_NO_DEBUG_RTL=1
HOST_CFLAGS += /MD
endif
endif
ifdef MACOS_SDK_DIR

View File

@ -44,11 +44,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
DIRS = public src
ifndef WINCE
DIRS += tools
endif
DIRS = public src tools
include $(topsrcdir)/config/rules.mk

View File

@ -45,11 +45,10 @@ include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
LIBRARY_NAME = xpt
LIB_IS_C_ONLY = 1
ifdef CROSS_COMPILE
ifndef WINCE
HOST_LIBRARY_NAME = hostxpt
endif
endif
CSRCS = xpt_arena.c xpt_struct.c xpt_xdr.c
HOST_CSRCS = $(CSRCS)
@ -71,9 +70,7 @@ export::
@$(MAKE) libs
ifdef CROSS_COMPILE
ifndef WINCE
ifdef HOST_NSPR_MDCPUCFG
HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
endif
endif
endif

View File

@ -54,17 +54,15 @@ SDK_BINARY = \
$(NULL)
ifdef CROSS_COMPILE
ifndef WINCE
HOST_SIMPLE_PROGRAMS = $(addprefix host_, $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=$(HOST_BIN_SUFFIX)))
HOST_CSRCS = $(CSRCS)
endif
endif
include $(topsrcdir)/config/rules.mk
# Compile directly against the static lib, so we can use the tools
# during the build without the shared library path being set.
ifeq ($(OS_ARCH),WINNT)
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
DEFINES += -DEXPORT_XPT_API
endif
@ -75,14 +73,22 @@ LIBS = $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX)
EXTRA_DEPS = $(wildcard $(DIST)/lib/$(LIB_PREFIX)xpt.*)
ifdef CROSS_COMPILE
ifndef WINCE
HOST_LIBS = $(DIST)/host/lib/libhostxpt.$(LIB_SUFFIX)
HOST_EXTRA_DEPS = $(wildcard $(DIST)/host/lib/libhostxpt.*)
HOST_LIBS = $(DIST)/host/lib/$(LIB_PREFIX)hostxpt.$(LIB_SUFFIX)
HOST_EXTRA_DEPS = $(wildcard $(DIST)/host/lib/$(LIB_PREFIX)hostxpt.*)
ifdef HOST_NSPR_MDCPUCFG
HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
endif
ifdef WINCE
# Compile directly against the static lib, so we can use the tools
# during the build without the shared library path being set.
HOST_CFLAGS += -DEXPORT_XPT_API
# Force MOZ_NO_DEBUG_RTL=1
HOST_CFLAGS += /MD
endif
endif