Bug535369 - Compile bsdiff for host OS rather than target - r=ted.mielczarek

This commit is contained in:
Chris Cooper 2010-02-19 11:58:45 -05:00
parent 2ab53f03ad
commit a2a5bc5879
3 changed files with 22 additions and 2 deletions

View File

@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = libbz2
LIBRARY_NAME = bz2
HOST_LIBRARY_NAME = hostbz2
FORCE_STATIC_LIB= 1
ifeq ($(OS_ARCH),WINNT)
USE_STATIC_LIBS = 1
@ -66,8 +67,21 @@ CSRCS = \
randtable.c \
$(NULL)
HOST_CSRCS = $(CSRCS)
EXPORTS = \
bzlib.h \
$(NULL)
include $(topsrcdir)/config/rules.mk
ifdef CROSS_COMPILE
ifdef HOST_NSPR_MDCPUCFG
HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
endif
endif
# The intermediate (.ii/.s) files for host and target can have the same name...
# disable parallel builds
.NOTPARALLEL:

View File

@ -47,9 +47,14 @@ include $(DEPTH)/config/autoconf.mk
# build system and is not intended to be included in Mozilla distributions.
HOST_PROGRAM = mbsdiff$(BIN_SUFFIX)
HOST_CSRCS = bsdiff.c
HOST_LIBS += $(BZ2_LIBS)
ifeq (WINNT,$(OS_ARCH))
ifdef CROSS_COMPILE
HOST_LIBS += $(DIST)/host/lib/$(LIB_PREFIX)hostbz2.$(LIB_SUFFIX)
else
HOST_LIBS += $(BZ2_LIBS)
endif
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME,Ws2_32)
endif

View File

@ -68,6 +68,7 @@ ifndef MOZ_NATIVE_BZ2
tier_external_dirs += modules/libbz2
endif
tier_external_dirs += modules/libmar
tier_external_dirs += other-licenses/bsdiff
endif
tier_external_dirs += gfx/qcms