From a06768ef133043d9d9f6f2ae620cf58ba9b859e2 Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Wed, 14 May 2008 17:15:55 -0700 Subject: [PATCH] more windows (msvc) build fixes --- services/crypto/Makefile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/services/crypto/Makefile b/services/crypto/Makefile index 1518bc72425..1f670dec821 100755 --- a/services/crypto/Makefile +++ b/services/crypto/Makefile @@ -59,7 +59,6 @@ else compiler = msvc cxx = cl so = dll -# cppflags += -LD else $(error Sorry, your os is unknown/unsupported: $(sys)) endif @@ -132,9 +131,18 @@ libs := xpcomglue_s xpcom nspr4 \ ifeq ($(compiler),msvc) libdirs := $(patsubst %,-LIBPATH:%,$(libdirs)) libs := $(patsubst %,$(sdkdir)/lib/%.lib,$(libs)) -cppflags += -c -nologo -O1 -GR- -TP -nologo -Zc:wchar_t- -W3 -Gy $(headers) -ldflags += -DLL -NOLOGO -SUBSYSTEM:WINDOWS $(libdirs) $(libs) kernel32.lib \ - user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib +cppflags += -c -nologo -O1 -GR- -TP -MT -Zc:wchar_t- -W3 -Gy $(headers) \ +-DNDEBUG -DTRIMMED -D_CRT_SECURE_NO_DEPRECATE=1 \ +-D_CRT_NONSTDC_NO_DEPRECATE=1 -DWINVER=0x500 -D_WIN32_WINNT=0x500 \ +-D_WIN32_IE=0x0500 -DX_DISPLAY_MISSING=1 -DMOZILLA_VERSION=\"1.9pre\" \ +-DMOZILLA_VERSION_U=1.9pre -DHAVE_SNPRINTF=1 -D_WINDOWS=1 -D_WIN32=1 \ +-DWIN32=1 -DXP_WIN=1 -DXP_WIN32=1 -DHW_THREADS=1 -DSTDC_HEADERS=1 \ +-DWIN32_LEAN_AND_MEAN=1 -DNO_X11=1 -DHAVE_MMINTRIN_H=1 \ +-DHAVE_OLEACC_IDL=1 -DHAVE_ATLBASE_H=1 -DHAVE_WPCAPI_H=1 -D_X86_=1 \ +-DD_INO=d_ino +ldflags += -DLL -NOLOGO -SUBSYSTEM:WINDOWS -NXCOMPAT -SAFESEH -IMPLIB:fake.lib \ + $(libdirs) $(libs) \ + kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib rcflags := -r $(headers) else libdirs := $(patsubst %,-L%,$(libdirs)) @@ -177,7 +185,7 @@ test-install: install rm -f $(sdkdir)/bin/components/xpti.dat clean: - rm -f $(so_target) $(cpp_objects) $(idl_typelib) $(idl_headers) + rm -f $(so_target) $(cpp_objects) $(idl_typelib) $(idl_headers) $(target:=.res) fake.lib fake.exp # rules to build the c headers and .xpt from idl @@ -203,7 +211,7 @@ endif $(so_target): $(idl_headers) $(cpp_objects) $(target:=.res) ifeq ($(compiler),msvc) - link -out:$@ $(ldflags) $(cpp_objects) + link -OUT:$@ -PDB:$(@:.dll=.pdb) $(cpp_objects) $(target:=.res) $(ldflags) else $(cxx) -o $@ $(ldflags) $(cpp_objects) endif