4 # - per-source-file flag_overrides (gnu.mpd)
6 # Include this file from platform_macros.GNU to build with sh and GNU make
7 # and the Visual C++ compiler and linker.
8 # Tested with the MSYS shell and make from msysCORE-1.0.11-20080826.tar.gz and
9 # the Visual C++ 9 toolchain (Visual C++ 2008 Express Edition) - SP1.
11 # Assuming the msysCORE archive is extracted to c:\msys...
12 # Start the Visual C++ Command Prompt
13 # Set ACE_ROOT (TAO_ROOT, DDS_ROOT)
14 # Add C:\msys\bin to PATH along with %ACE_ROOT%\lib and %ACE_ROOT%\bin
15 # If necessary, generate GNUmakefiles with MPC (set MPC_ROOT, use -type gnuace)
19 # - dynamic: ACE.dll, ACE.lib is the "import library"
21 # - no "s" suffix added for static, so static and dynamic can't coexist
22 # - no other modifiers are added to the name (no ACEd.dll, ACEmfc.dll)
23 # - user-customizable make variables
24 # - everything in the "Defaults" section (plus inline)
25 # - SUBSYSTEM: defaults to CONSOLE for exes, WINDOWS for libs
26 # - CRT_TYPE: defaults to D (dynamic) for shared libs, T (static) for static
31 #inline determined below, defaults to !debug
54 # Need forward slashes for paths going through sh.exe
55 ACE_ROOT := $(subst \,/,$(ACE_ROOT))
61 CPPFLAGS += -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
62 CFLAGS += -Zc:wchar_t -nologo -W3 -EHsc -GR -wd4355 -Fd$(INTDIR)
63 ARFLAGS = -lib -nologo -machine:$(CPU)
64 MSVC_LDFLAGS = -incremental:no -nologo -subsystem:$(SUBSYSTEM) -machine:$(CPU)
65 ifeq (,$(BIN_UNCHECKED))
69 REALCLEAN_FILES += $(BIN).manifest $(BIN_UNCHECKED).pdb
76 ifeq (1,$(static_libs_only))
79 ifeq (1,$(static_libs))
88 ifneq (,$(BIN_UNCHECKED))
93 MSVC_IMPLIB = $(LIB_NAME).lib
94 MSVC_DLLFLAGS += -dll -implib:$(MSVC_IMPLIB)
95 REALCLEAN_FILES += $(LIB_NAME).dll $(INSLIB)/$(LIB_NAME).dll $(LIB_NAME).exp
96 REALCLEAN_FILES += $(LIB_NAME).dll.manifest
99 REALCLEAN_FILES += $(LIB_NAME).lib $(INSLIB)/$(LIB_NAME).lib $(LIB_NAME).pdb
103 CFLAGS += -Zi -M$(CRT_TYPE)d -Gy -Gm
105 MSVC_LDFLAGS += -DEBUG
106 MSVC_DLLFLAGS += -pdb:$(subst dll,pdb,$@)
107 MSVC_EXEFLAGS += -pdb:$(subst exe,pdb,$@)
110 CFLAGS += -M$(CRT_TYPE)
117 SYSTEMLIBS += advapi32.lib user32.lib iphlpapi.lib
118 MSVC_LINK = $(LD) $(SYSTEMLIBS) $(MSVC_LDFLAGS) $(patsubst %\,%,$(patsubst -L%,-libpath:%, $(subst /,\,$(LDFLAGS)))) $(patsubst -l%,%.lib,$(ACE_SHLIBS)) $(LIBS) -out:$@
119 define SOLINK.cc.override
120 $(MSVC_LINK) $(MSVC_DLLFLAGS) $^
121 mt -nologo -manifest $@.manifest -outputresource:$@\;2
122 @if test . != $(INSLIB) -a $(call PWD) != $(INSLIB) -a -r $(MSVC_IMPLIB) ; then \
123 cp $(MSVC_IMPLIB) $(INSLIB) ; \
126 define LINK.cc.override
127 $(MSVC_LINK) $(MSVC_EXEFLAGS) $(filter-out %.lib,$(filter-out %.a,$^)) $(patsubst -l%,%.lib,$(VLDLIBS)) $(POSTLINK)
128 @if test -r $@.manifest ; then \
129 mt -nologo -manifest $@.manifest -outputresource:$@\;1 ; \
132 AR.cc.override = $(AR) $(ARFLAGS) -out:$@ $^ $(AREXTRA)
134 #this is not mingw32, but the makefiles in ACE should act like it is