diff --git a/services/crypto/Makefile b/services/crypto/Makefile index cdefc6e79657..a9268fe75dbe 100755 --- a/services/crypto/Makefile +++ b/services/crypto/Makefile @@ -39,8 +39,19 @@ # OS detection -sys := $(shell uname -s) +xpidl = $(sdkdir)/bin/xpidl +link = link +sys := $(shell uname -s) +wince = $(WINCE) + +ifeq ($(wince), 1) + os = WINNT + cxx = $(sdkdir)/sdk/bin/arm-wince-gcc + xpidl = $(sdkdir)/host/bin/host_xpidl + link = $(sdkdir)/sdk/bin/arm-wince-link + so = dll +else ifeq ($(sys), Darwin) os = Darwin compiler = gcc3 @@ -55,7 +66,7 @@ ifeq ($(sys), Linux) so = so cppflags += -shared else -ifeq ($(sys), MINGW32_NT-6.0) +ifeq ($(sys), MINGW32_NT-6.1) os = WINNT compiler = msvc cxx = cl @@ -80,6 +91,7 @@ endif endif endif endif +endif # Arch detection @@ -153,8 +165,6 @@ sdkdir ?= ${MOZSDKDIR} destdir = .. platformdir = $(destdir)/platform/$(platform) -xpidl = $(sdkdir)/bin/xpidl - # FIXME: we don't actually require this for e.g. clean ifeq ($(sdkdir),) $(warning No 'sdkdir' variable given) @@ -180,11 +190,17 @@ headers = -I$(sdkdir)/include \ # libraries libdirs := $(sdkdir)/lib $(sdkdir)/bin +ifeq ($(wince),1) libs := xpcomglue_s xpcom nspr4 \ crmf smime3 ssl3 nss3 nssutil3 \ plds4 plc4 +else +libs := xpcomglue xpcomglue_s nspr4 \ + crmf smime3 ssl3 nss3 nssutil3 \ + plds4 plc4 +endif -ifeq ($(os), linux) +ifeq ($(os), Linux) libs := xpcom_core $(libs) endif @@ -256,6 +272,16 @@ ifeq ($(os), SunOS) $(sdkdir)/lib/libxpcomglue_s.a \ $(libdirs) $(libs) else +ifneq ($(wince),) + libdirs := $(patsubst %,-LIBPATH:%,$(libdirs)) + libs := $(patsubst %,$(sdkdir)/lib/%.lib,$(libs)) + cppflags += -c -nologo -O1 -GR- -TP -Zc:wchar_t- -W3 -Gy $(headers) \ + -DMOZILLA_STRICT_API \ + -D"_WIN32_WCE=0x502" -D"UNDER_CE" -D"WIN32_PLATFORM_PSPC" \ + -D"WINCE" -D"ARM" -D"_ARM_" -D"POCKETPC2003_UI_MODEL" -DXP_WIN + ldflags += -DLL $(libdirs) $(libs) + rcflags := -r $(headers) +else ifeq ($(os), WINNT) libdirs := $(patsubst %,-LIBPATH:%,$(libdirs)) libs := $(patsubst %,$(sdkdir)/lib/%.lib,$(libs)) @@ -276,6 +302,7 @@ endif endif endif endif +endif ###################################################################### @@ -347,7 +374,7 @@ ifeq ($(os), WINNT) $(cxx) -Fo$@ -Fd$(@:.o=.pdb) $(cppflags) $(@:.o=.cpp) $(so_target): $(idl_headers) $(cpp_objects) $(target:=.res) - link -OUT:$@ -PDB:$(@:.dll=.pdb) $(cpp_objects) $(target:=.res) $(ldflags) + $(link) -OUT:$@ -PDB:$(@:.dll=.pdb) $(cpp_objects) $(target:=.res) $(ldflags) chmod +x $@ endif endif diff --git a/services/crypto/platform/WINCE/components/WeaveCrypto.dll b/services/crypto/platform/WINCE/components/WeaveCrypto.dll new file mode 100755 index 000000000000..b2cddef1bf6d Binary files /dev/null and b/services/crypto/platform/WINCE/components/WeaveCrypto.dll differ diff --git a/services/sync/tests/unit/Makefile b/services/sync/tests/unit/Makefile index 4c06ad5db5c7..346940183b32 100644 --- a/services/sync/tests/unit/Makefile +++ b/services/sync/tests/unit/Makefile @@ -10,7 +10,7 @@ else ifeq ($(sys), Linux) os = Linux else -ifeq ($(sys), MINGW32_NT-6.0) +ifeq ($(sys), MINGW32_NT-6.1) os = WINNT else ifeq ($(sys), MINGW32_NT-5.1)