1# 2# Standard make variables and rules for all Win32 platforms. 3# 4 5Win32Platform = 1 6 7# 8# Define macro for path of wrapper executables 9# 10ifndef EmbeddedSystem 11WRAPPER_FPATH = $(BINDIR) 12else 13WRAPPER_FPATH = $(HOSTBINDIR) 14endif 15 16 17# 18# Standard "unix" programs. Anything here not provided by the GNU-WIN32/OpenNT/UWIN 19# system is likely to need a wrapper around it to perform filename translation. 20# 21ifndef OpenNTBuildTree 22 23# GNU-WIN32 wrappers 24XLN = -gnuwin32 25 26# There is a sort in %System32%/sort.exe and in GNU-WIN32. The shell of 27# GNU-WIN32 may pick either one depending on the PATH setup of the user. 28# To make sure that the GNU-WIN32 version is picked up, give the pathname 29# of sort. 30 31SORT = /bin/sort 32 33else 34 35# OpenNT or UWIN wrappers 36XLN = -opennt 37MKDEPOPT = -opennt 38SORT = sort 39 40endif 41 42 43AR = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/libwrapper $(XLN) 44CXX = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/clwrapper $(XLN) 45CXXLINK = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/linkwrapper $(XLN) 46CXXMAKEDEPEND = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/omkdepend $(MKDEPOPT) -D__cplusplus -D_MSC_VER 47CC = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/clwrapper $(XLN) 48CLINK = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/linkwrapper $(XLN) 49CMAKEDEPEND = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/omkdepend $(MKDEPOPT) -D_MSC_VER 50 51RCTOOL = rc.exe 52MANIFESTTOOL = true 53 54MKDIRHIER = mkdir -p 55 56INSTALL = install -c 57INSTLIBFLAGS = 58INSTEXEFLAGS = 59 60CP = cp 61MV = mv -f 62 63ifdef BuildDebugBinary 64 65CXXLINKOPTIONS = $(MSVC_DLL_CXXLINKDEBUGOPTIONS) 66CXXDEBUGFLAGS = 67CXXOPTIONS = $(MSVC_DLL_CXXDEBUGFLAGS) 68CLINKOPTIONS = $(MSVC_DLL_CLINKDEBUGOPTIONS) 69CDEBUGFLAGS = $(MSVC_DLL_CDEBUGFLAGS) 70 71else 72 73CXXLINKOPTIONS = $(MSVC_DLL_CXXLINKNODEBUGOPTIONS) 74CXXDEBUGFLAGS = -O2 75CXXOPTIONS = $(MSVC_DLL_CXXNODEBUGFLAGS) 76CLINKOPTIONS = $(MSVC_DLL_CLINKNODEBUGOPTIONS) 77CDEBUGFLAGS = -O2 78COPTIONS = $(MSVC_DLL_CNODEBUGFLAGS) 79 80endif 81 82 83ifndef WINVER 84WINVER = 0x0400 85endif 86 87IMPORT_CPPFLAGS += -D__WIN32__ -D_WIN32_WINNT=$(WINVER) 88 89SOCKET_LIB = ws2_32.lib mswsock.lib 90 91 92# 93# General rule for cleaning. 94# 95 96define CleanRule 97$(RM) *.o *.lib 98endef 99 100define VeryCleanRule 101$(RM) *.d 102$(RM) *.pyc 103$(RM) *.def *.pdb *.ilk *.exp *.manifest *.rc *.res 104$(RM) $(CORBA_STUB_FILES) 105endef 106 107 108# 109# Patterns for various file types 110# 111 112LibPathPattern = -libpath:% 113LibNoDebugPattern = %.lib 114LibDebugPattern = %d.lib 115DLLNoDebugPattern = %_rt.lib 116DLLDebugPattern = %_rtd.lib 117LibNoDebugSearchPattern = %.lib 118LibDebugSearchPattern = %d.lib 119DLLNoDebugSearchPattern = %_rt.lib 120DLLDebugSearchPattern = %_rtd.lib 121 122 123ifndef BuildDebugBinary 124 125LibPattern = $(LibNoDebugPattern) 126DLLPattern = $(DLLNoDebugPattern) 127LibSearchPattern = $(LibNoDebugSearchPattern) 128DLLSearchPattern = $(DLLNoDebugSearchPattern) 129 130else 131 132LibPattern = $(LibDebugPattern) 133DLLPattern = $(DLLDebugPattern) 134LibSearchPattern = $(LibDebugSearchPattern) 135DLLSearchPattern = $(DLLDebugSearchPattern) 136 137endif 138 139BinPattern = %.exe 140 141 142# 143# Stuff to generate statically-linked libraries. 144# 145 146define StaticLinkLibrary 147(set -x; \ 148 $(RM) $@; \ 149 $(AR) $@ $^; \ 150) 151endef 152 153ifdef EXPORT_TREE 154define ExportLibrary 155(dir="$(EXPORT_TREE)/$(LIBDIR)"; \ 156 files="$^"; \ 157 for file in $$files; do \ 158 $(ExportFileToDir); \ 159 done; \ 160 for pfile in $$files; do \ 161 file=$${pfile%.lib}.pdb; \ 162 if [ -f $$file ]; then \ 163 $(ExportFileToDir); \ 164 fi; \ 165 done;\ 166) 167endef 168endif 169 170 171# 172# Stuff to generate executable binaries. 173# 174 175IMPORT_LIBRARY_FLAGS = $(patsubst %,$(LibPathPattern),$(IMPORT_LIBRARY_DIRS)) 176 177define CXXExecutable 178(set -x; \ 179 $(RM) $@; \ 180 $(CXXLINK) -out:$@ $(CXXLINKOPTIONS) -PDB:$@.pdb $(IMPORT_LIBRARY_FLAGS) \ 181 $(filter-out $(LibPattern),$^) $$libs; \ 182 $(MANIFESTTOOL) /outputresource:"$@;#1" /manifest $@.manifest; \ 183) 184endef 185 186define CExecutable 187(set -x; \ 188 $(RM) $@; \ 189 $(CLINK) -out:$@ $(CLINKOPTIONS) -PDB:$@.pdb $(IMPORT_LIBRARY_FLAGS) $(filter-out $(LibPattern),$^) $$libs; \ 190 $(MANIFESTTOOL) /outputresource:"$@;#1" /manifest $@.manifest; \ 191) 192endef 193 194ifdef EXPORT_TREE 195define ExportExecutable 196(dir="$(EXPORT_TREE)/$(BINDIR)"; \ 197 files="$^"; \ 198 for file in $$files; do \ 199 $(ExportExecutableFileToDir); \ 200 done; \ 201) 202endef 203endif 204 205 206########################################################################### 207# 208# Shared library support stuff 209# 210ifndef EmbeddedSystem 211BuildSharedLibrary = 1 212endif 213 214SharedLibraryFullNameTemplate = $(SharedLibraryLibNameTemplate).lib 215SharedLibraryLibNameTemplate = $$1$$2$$3$$4_rt$${extrasuffix:-} 216SharedLibraryShortLibName = $$1$$2_rt$${extrasuffix:-}.lib 217SharedLibraryDllNameTemplate = $$1$$2$$3$$4$(compiler_version_suffix)_rt$${extrasuffix:-} 218SharedLibraryExportSymbolFileNameTemplate = $$1$$2$${extrasuffix:-}.def 219SharedLibraryVersionStringTemplate = $$3.$$4 220SharedLibrarySymbolRefLibraryTemplate = $${symrefdir:-static}/$$1$$2$${extrasuffix:-}.lib 221 222define SharedLibraryFullName 223fn() { \ 224if [ $$2 = "_" ] ; then set $$1 "" $$3 $$4 ; fi ; \ 225echo $(SharedLibraryFullNameTemplate); \ 226}; fn 227endef 228 229define SharedLibraryDebugFullName 230fn() { \ 231if [ $$2 = "_" ] ; then set $$1 "" $$3 $$4 ; fi ; \ 232extrasuffix="d"; \ 233echo $(SharedLibraryFullNameTemplate); \ 234}; fn 235endef 236 237define ParseNameSpec 238set $$namespec ; \ 239if [ $$2 = "_" ] ; then set $$1 "" $$3 $$4 ; fi 240endef 241 242 243# MakeCXXExportSymbolDefinitionFile 244# Internal canned command used by MakeCXXSharedLibrary 245# 246# - Create a .def file containing all the functions and static class 247# variables exported by the DLL. The symbols are extracted from the 248# output of dumpbin. 249# 250# The function symbols are extracted using the following template: 251# ... ........ SECT.. notype () External | ?.................. 252# 253# The static class variable symbols are extracted using the following 254# template: 255# ... ........ SECT.. notype External | ?[^?].............. 256# 257# Default destructors generated by the compiler and the symbols 258# inside an anonymous namespace are excluded. 259# 260# It looks like class variable and function symbols start with two ?? 261# and class static variable and static function symbols start with one ?. 262# - SLL 263# 264define MakeCXXExportSymbolDefinitionFile 265symrefdir=$${debug:+debug}; \ 266symreflib=$(SharedLibrarySymbolRefLibraryTemplate); \ 267if [ ! -f $$symreflib ]; then echo "Cannot find reference static library $$symreflib"; return 1; fi; \ 268set -x; \ 269echo "LIBRARY $$dllbase" > $$defname; \ 270echo "VERSION $$version" >> $$defname; \ 271echo "EXPORTS" >> $$defname; \ 272DUMPBIN.EXE /SYMBOLS $$symreflib | \ 273egrep '^[^ ]+ +[^ ]+ +SECT[^ ]+ +[^ ]+ +\(\) +External +\| +\?[^ ]*|^[^ ]+ +[^ ]+ +SECT[^ ]+ +[^ ]+ +External +\| +\?[^?][^ ]*'|\ 274egrep -v 'deleting destructor[^(]+\(unsigned int\)' | \ 275egrep -v 'anonymous namespace' | \ 276egrep -v '@std@' | \ 277cut -d'|' -f2 | \ 278cut -d' ' -f2 | $(SORT) -u >> $$defname; \ 279set +x; 280endef 281 282 283# MakeResourceDefinitionFile 284# Internal canned command used by MakeCXXSharedLibrary 285 286define MakeResourceDefinitionFile 287if [ -n "$$2" ]; then \ 288commaver=$$2,$$3,$$4,0x$$nanovers; \ 289dotver=$$2.$$3.$$4.$$nanovers; \ 290else \ 291commaver=$$3,$$4,0x$$nanovers,0; \ 292dotver=$$3.$$4.$$nanovers; \ 293fi; \ 294set -x; \ 295echo "#include \"windows.h\"" > $$rcname; \ 296echo "VS_VERSION_INFO VERSIONINFO" >> $$rcname; \ 297echo " FILEVERSION $$commaver" >> $$rcname; \ 298echo " PRODUCTVERSION $(OMNIORB_MAJOR_VERSION),$(OMNIORB_MINOR_VERSION),$(OMNIORB_MICRO_VERSION),0x$$nanovers" >> $$rcname; \ 299echo " FILEFLAGSMASK 0x3fL" >> $$rcname; \ 300if [ -n "$$debug" ]; then \ 301echo " FILEFLAGS VS_FF_DEBUG" >> $$rcname; \ 302else \ 303echo " FILEFLAGS 0x0L" >> $$rcname; \ 304fi; \ 305echo " FILEOS VOS_UNKNOWN" >> $$rcname; \ 306echo " FILETYPE VFT_UNKNOWN" >> $$rcname; \ 307echo " FILESUBTYPE 0x0L" >> $$rcname; \ 308echo "{ " >> $$rcname; \ 309echo " BLOCK \"StringFileInfo\"" >> $$rcname; \ 310echo " {" >> $$rcname; \ 311echo " BLOCK \"00000000\"" >> $$rcname; \ 312echo " {" >> $$rcname; \ 313echo " VALUE \"CompanyName\", \"omniORB open source project\0\"" >> $$rcname; \ 314echo " VALUE \"FileDescription\", \"omniORB\0\"" >> $$rcname; \ 315echo " VALUE \"FileVersion\", \"$$dotver\0\"" >> $$rcname; \ 316echo " VALUE \"InternalName\", \"$(SharedLibraryDllNameTemplate).dll\0\"" >> $$rcname; \ 317echo " VALUE \"OriginalFilename\", \"$(SharedLibraryDllNameTemplate).dll\0\"" >> $$rcname; \ 318echo " VALUE \"ProductName\", \"omniORB\"" >> $$rcname; \ 319echo " VALUE \"ProductVersion\", \"$(OMNIORB_MAJOR_VERSION).$(OMNIORB_MINOR_VERSION).$(OMNIORB_MICRO_VERSION).$$nanovers\0\"" >> $$rcname; \ 320echo " VALUE \"LegalCopyright\", \"Apasphere Ltd., AT&T Laboratories Cambridge, and others. Freely available under the terms of the GNU LGPL.\0\"" >> $$rcname; \ 321echo " }" >> $$rcname; \ 322echo " }" >> $$rcname; \ 323echo " BLOCK \"VarFileInfo\"" >> $$rcname; \ 324echo " {" >> $$rcname; \ 325echo " VALUE \"Translation\", 0x0, 0" >> $$rcname; \ 326echo " }" >> $$rcname; \ 327echo "}" >> $$rcname; \ 328echo "LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL" >> $$rcname; \ 329$(RCTOOL) $$rcname; 330endef 331 332# MakeCXXSharedLibrary- Build shared library 333# Expect shell variable: 334# namespec = <library name> <major ver. no.> <minor ver. no.> <micro ver. no> 335# extralibs = <libraries to add to the link line> 336# debug = 1 (build debug version). 337# 338# e.g. namespec="COS 3 0 0" --> COS300_rt.dll 339# extralibs="$(OMNIORB_LIB)" 340# 341define MakeCXXSharedLibrary 342$(ParseNameSpec); \ 343extrasuffix=$${debug:+d}; \ 344targetdir=$(@D); \ 345libname=$(SharedLibraryLibNameTemplate); \ 346slibname=$(SharedLibraryShortLibName); \ 347dllbase=$$targetdir/$(SharedLibraryDllNameTemplate); \ 348dllname=$$dllbase.dll; \ 349rcname=$$dllbase.rc; \ 350resname=$$targetdir/$(SharedLibraryDllNameTemplate).res; \ 351defname=$$targetdir/$(SharedLibraryExportSymbolFileNameTemplate); \ 352version=$(SharedLibraryVersionStringTemplate); \ 353nanovers=`echo $(OMNIORB_VERSION_HEX) | cut -c 9-`; \ 354if [ -n "$$debug" ]; then \ 355extralinkoption="$(MSVC_DLL_CXXLINKDEBUGOPTIONS)"; \ 356else \ 357extralinkoption="$(MSVC_DLL_CXXLINKNODEBUGOPTIONS)"; \ 358fi; \ 359if [ -z "$$nodeffile" ]; then \ 360$(MakeCXXExportSymbolDefinitionFile) \ 361defflag="-def:$$defname"; \ 362fi; \ 363$(MakeResourceDefinitionFile) \ 364set -x; \ 365$(RM) $@; \ 366$(CXXLINK) -out:$$dllname -DLL $$extralinkoption \ 367$$defflag -IMPLIB:$@ $(IMPORT_LIBRARY_FLAGS) \ 368$^ $$extralibs $$resname; \ 369$(MANIFESTTOOL) /outputresource:"$$dllname;#2" /manifest $$dllname.manifest; \ 370$(CP) $@ $$slibname; 371endef 372 373# Export SharedLibrary 374# Expected shell variable: 375# namespec = <library name> <major ver. no.> <minor ver. no.> <micro ver. no> 376# e.g. namespec = "COS 3 0 0" 377# 378# NT treats DLLs more like executables -- the .dll file needs to go in the 379# bin/x86... directory so that it's on your PATH: 380# 381define ExportSharedLibrary 382$(ParseNameSpec); \ 383extrasuffix=$${debug:+d}; \ 384targetdir=$(<D); \ 385libname=$(SharedLibraryLibNameTemplate); \ 386slibname=$(SharedLibraryShortLibName); \ 387dllname=$$targetdir/$(SharedLibraryDllNameTemplate).dll; \ 388pdbname=$$targetdir/$(SharedLibraryDllNameTemplate).pdb; \ 389(dir="$(EXPORT_TREE)/$(LIBDIR)"; \ 390 file="$^"; \ 391 $(ExportFileToDir); \ 392); \ 393(dir="$(EXPORT_TREE)/$(LIBDIR)"; \ 394 file="$$slibname"; \ 395 $(ExportFileToDir); \ 396); \ 397(dir="$(EXPORT_TREE)/$(BINDIR)"; \ 398 file="$$dllname"; \ 399 $(ExportExecutableFileToDir); \ 400); \ 401if [ -f $$pdbname ]; then \ 402(dir="$(EXPORT_TREE)/$(BINDIR)"; \ 403 file="$$pdbname"; \ 404 $(ExportExecutableFileToDir); \ 405);\ 406fi; 407endef 408 409# CleanSharedLibrary 410# Expected shell variable: 411# dir = directory name to clean. Default to . (current directory) 412# 413define CleanSharedLibrary 414( set -x; \ 415$(RM) $${dir:-.}/*.dll $${dir:-.}/*.lib $${dir:-.}/*.exp $${dir:-.}/*.def \ 416 $${dir:-.}/*.dll.manifest $${dir:-.}/*.ilk $${dir:-.}/*.pdb \ 417 $${dir:-.}/*.rc $${dir:-.}/*.res) 418endef 419 420# CleanStaticLibrary 421# Expected shell variable: 422# dir = directory name to clean. Default to . (current directory) 423# 424define CleanStaticLibrary 425( set -x; \ 426$(RM) $${dir:-.}/*.lib $${dir:-.}/*.exp $${dir:-.}/*.def \ 427 $${dir:-.}/*.ilk $${dir:-.}/*.pdb \ 428 $${dir:-.}/*.rc $${dir:-.}/*.res) 429endef 430 431# Pattern rules to build objects files for static and shared library and the 432# debug versions for both. 433# The convention is to build object files and libraries in different 434# subdirectoryies. 435# static - the static library 436# debug - the static debug library 437# shared - the DLL 438# shareddebug - the DLL debug library 439# 440# The pattern rules below ensured that the right compiler flags are used 441# to compile the source for the library. 442 443static/%.o: %.cc 444 $(CXX) -c $(CXXDEBUGFLAGS) $(MSVC_STATICLIB_CXXNODEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdstatic\\$(LIB_NAME)$(major).pdb $< 445 446debug/%.o: %.cc 447 $(CXX) -c $(MSVC_STATICLIB_CXXDEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fddebug\\$(LIB_NAME)$(major)d.pdb $< 448 449shared/%DynSK.o: %DynSK.cc 450 $(CXX) -c $(CXXDEBUGFLAGS) -DUSE_core_stub_in_nt_dll $(MSVC_DLL_CXXNODEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdshared\\ $< 451 452shared/%SK.o: %SK.cc 453 $(CXX) -c $(CXXDEBUGFLAGS) -DUSE_dyn_stub_in_nt_dll $(MSVC_DLL_CXXNODEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdshared\\ $< 454 455shared/%.o: %.cc 456 $(CXX) -c $(CXXDEBUGFLAGS) $(MSVC_DLL_CXXNODEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdshared\\ $< 457 458 459shareddebug/%DynSK.o: %DynSK.cc 460 $(CXX) -c -DUSE_core_stub_in_nt_dll $(MSVC_DLL_CXXDEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdshareddebug\\ $< 461 462shareddebug/%SK.o: %SK.cc 463 $(CXX) -c -DUSE_dyn_stub_in_nt_dll $(MSVC_DLL_CXXDEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdshareddebug\\ $< 464 465shareddebug/%.o: %.cc 466 $(CXX) -c $(MSVC_DLL_CXXDEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdshareddebug\\ $< 467 468static/%.o: %.c 469 $(CC) -c $(CDEBUGFLAGS) $(MSVC_STATICLIB_CXXNODEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdstatic\\$(LIB_NAME)$(major).pdb $< 470 471debug/%.o: %.c 472 $(CC) -c $(MSVC_STATICLIB_CXXDEBUGFLAGS) $(CPPFLAGS) -Fo$@ -Fdstatic\\$(LIB_NAME)$(major)d.pdb $< 473 474shared/%.o: %.c 475 $(CC) -c $(CDEBUGFLAGS) $(MSVC_DLL_CXXNODEBUGFLAGS) $(CPPFLAGS) -Fo$@ $< 476 477 478shareddebug/%.o: %.c 479 $(CC) -c $(MSVC_DLL_CXXDEBUGFLAGS) $(CPPFLAGS) -Fo$@ $< 480 481 482# 483# Replacements for implicit rules 484# 485 486%.o: %.c 487 $(CC) -c $(CFLAGS) -Fo$@ $< 488 489%.o: %.cc 490 $(CXX) -c $(CXXFLAGS) -Fo$@ $< 491 492 493 494################################################################################# 495# CORBA stuff 496# 497 498include $(BASE_OMNI_TREE)/mk/version.mk 499 500OMNIORB_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,omniORB.$(OMNIORB_VERSION))) 501OMNIORB_DEBUG_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,omniORB.$(OMNIORB_VERSION))) 502 503OMNIORB_DYNAMIC_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,omniDynamic.$(OMNIORB_VERSION))) 504OMNIORB_DEBUG_DYNAMIC_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,omniDynamic.$(OMNIORB_VERSION))) 505 506OMNIORB_CODESETS_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,omniCodeSets.$(OMNIORB_VERSION))) 507OMNIORB_DEBUG_CODESETS_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,omniCodeSets.$(OMNIORB_VERSION))) 508 509OMNIORB_CONNECTIONS_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,omniConnectionMgmt.$(OMNIORB_VERSION))) 510OMNIORB_DEBUG_CONNECTIONS_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,omniConnectionMgmt.$(OMNIORB_VERSION))) 511 512OMNIORB_ZIOP_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,omniZIOP.$(OMNIORB_VERSION))) 513OMNIORB_DEBUG_ZIOP_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,omniZIOP.$(OMNIORB_VERSION))) 514 515OMNIORB_ZIOP_DYNAMIC_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,omniZIOPDynamic.$(OMNIORB_VERSION))) 516OMNIORB_DEBUG_ZIOP_DYNAMIC_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,omniZIOPDynamic.$(OMNIORB_VERSION))) 517 518OMNIORB_COS_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,COS.$(OMNIORB_VERSION))) 519OMNIORB_DEBUG_COS_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,COS.$(OMNIORB_VERSION))) 520 521OMNIORB_COS_DYNAMIC_DLL_NAME = $(shell $(SharedLibraryFullName) $(subst ., ,COSDynamic.$(OMNIORB_VERSION))) 522OMNIORB_DEBUG_COS_DYNAMIC_DLL_NAME = $(shell $(SharedLibraryDebugFullName) $(subst ., ,COSDynamic.$(OMNIORB_VERSION))) 523 524 525ifndef BuildDebugBinary 526 527omniorb_dll_name := $(OMNIORB_DLL_NAME) 528omnidynamic_dll_name := $(OMNIORB_DYNAMIC_DLL_NAME) 529omnicodesets_dll_name := $(OMNIORB_CODESETS_DLL_NAME) 530omniconnections_dll_name := $(OMNIORB_CONNECTIONS_DLL_NAME) 531omniziop_dll_name := $(OMNIORB_ZIOP_DLL_NAME) 532omniziopdynamic_dll_name := $(OMNIORB_ZIOP_DYNAMIC_DLL_NAME) 533omnicos_dll_name := $(OMNIORB_COS_DLL_NAME) 534omnicosdynamic_dll_name := $(OMNIORB_COS_DYNAMIC_DLL_NAME) 535 536else 537 538omniorb_dll_name := $(OMNIORB_DEBUG_DLL_NAME) 539omnidynamic_dll_name := $(OMNIORB_DEBUG_DYNAMIC_DLL_NAME) 540omnicodesets_dll_name := $(OMNIORB_DEBUG_CODESETS_DLL_NAME) 541omniconnections_dll_name := $(OMNIORB_DEBUG_CONNECTIONS_DLL_NAME) 542omniziop_dll_name := $(OMNIORB_DEBUG_ZIOP_DLL_NAME) 543omniziopdynamic_dll_name := $(OMNIORB_DEBUG_ZIOP_DYNAMIC_DLL_NAME) 544omnicos_dll_name := $(OMNIORB_DEBUG_COS_DLL_NAME) 545omnicosdynamic_dll_name := $(OMNIORB_DEBUG_COS_DYNAMIC_DLL_NAME) 546 547endif 548 549lib_depend := $(omniorb_dll_name) 550omniORB_lib_depend := $(GENERATE_LIB_DEPEND) 551lib_depend := $(omnidynamic_dll_name) 552omniDynamic_lib_depend := $(GENERATE_LIB_DEPEND) 553lib_depend := $(omnicodesets_dll_name) 554omniCodeSets_lib_depend := $(GENERATE_LIB_DEPEND) 555lib_depend := $(omniconnections_dll_name) 556omniConnections_lib_depend := $(GENERATE_LIB_DEPEND) 557lib_depend := $(omniziop_dll_name) 558omniZIOP_lib_depend := $(GENERATE_LIB_DEPEND) 559lib_depend := $(omniziopdynamic_dll_name) 560omniZIOPDynamic_lib_depend := $(GENERATE_LIB_DEPEND) 561lib_depend := $(omnicos_dll_name) 562COS_lib_depend := $(GENERATE_LIB_DEPEND) 563lib_depend := $(omnicosdynamic_dll_name) 564COSDynamic_lib_depend := $(GENERATE_LIB_DEPEND) 565 566OMNIIDL = $(BASE_OMNI_TREE)/$(WRAPPER_FPATH)/oidlwrapper.exe $(XLN) 567OMNIORB_IDL_ONLY = $(OMNIIDL) -T -bcxx -Wbh=.hh -Wbs=SK.cc 568OMNIORB_IDL_ANY_FLAGS = -Wba 569OMNIORB_IDL = $(OMNIORB_IDL_ONLY) $(OMNIORB_IDL_ANY_FLAGS) 570OMNIORB_CPPFLAGS = -D__OMNIORB4__ -I$(CORBA_STUB_DIR) $(OMNITHREAD_CPPFLAGS) 571OMNIORB_IDL_OUTPUTDIR_PATTERN = -C% 572 573msvc_work_around_stub = $(patsubst %,$(LibPattern),msvcstub) \ 574 -NODEFAULTLIB:libcmt.lib -NODEFAULTLIB:libcmtd.lib 575 576OMNIORB_LIB = $(omniorb_dll_name) \ 577 $(omnidynamic_dll_name) \ 578 $(OMNITHREAD_LIB) $(SOCKET_LIB) advapi32.lib 579OMNIORB_LIB_NODYN = $(omniorb_dll_name) $(msvc_work_around_stub) \ 580 $(OMNITHREAD_LIB) $(SOCKET_LIB) advapi32.lib 581 582OMNIORB_LIB_NODYN_DEPEND := $(omniORB_lib_depend) \ 583 $(OMNITHREAD_LIB_DEPEND) 584OMNIORB_LIB_DEPEND := $(omniORB_lib_depend) \ 585 $(OMNITHREAD_LIB_DEPEND) \ 586 $(omniDynamic_lib_depend) 587 588# CodeSets library 589OMNIORB_CODESETS_LIB = $(omnicodesets_dll_name) 590OMNIORB_CODESETS_LIB_DEPEND := $(omniCodeSets_lib_depend) 591 592# Connections library 593OMNIORB_CONNECTIONS_LIB = $(omniconnections_dll_name) 594OMNIORB_CONNECTIONS_LIB_DEPEND := $(omniConnections_lib_depend) 595 596# ZIOP library 597OMNIORB_ZIOP_LIB = $(omniziop_dll_name) 598OMNIORB_ZIOP_LIB_DEPEND := $(omniZiop_lib_depend) 599 600OMNIORB_ZIOP_DYNAMIC_LIB = $(omniziopdynamic_dll_name) 601OMNIORB_ZIOP_DYNAMIC_LIB_DEPEND := $(omniZiopDynamic_lib_depend) 602 603# COS library 604OMNIORB_COS_LIB = $(omnicos_dll_name) 605OMNIORB_COS_LIB_DEPEND := $(COS_lib_depend) 606 607OMNIORB_COS_DYNAMIC_LIB = $(omnicosdynamic_dll_name) 608OMNIORB_COS_DYNAMIC_LIB_DEPEND := $(COSDynamic_lib_depend) 609 610 611OMNIORB_STATIC_STUB_OBJS = \ 612 $(CORBA_INTERFACES:%=$(CORBA_STUB_DIR)/%SK.o) 613OMNIORB_STATIC_STUB_SRCS = \ 614 $(CORBA_INTERFACES:%=$(CORBA_STUB_DIR)/%SK.cc) 615OMNIORB_DYN_STUB_OBJS = \ 616 $(CORBA_INTERFACES:%=$(CORBA_STUB_DIR)/%DynSK.o) 617OMNIORB_DYN_STUB_SRCS = \ 618 $(CORBA_INTERFACES:%=$(CORBA_STUB_DIR)/%DynSK.cc) 619 620OMNIORB_STUB_SRCS = $(OMNIORB_STATIC_STUB_SRCS) $(OMNIORB_DYN_STUB_SRCS) 621OMNIORB_STUB_OBJS = $(OMNIORB_STATIC_STUB_OBJS) $(OMNIORB_DYN_STUB_OBJS) 622 623OMNIORB_STUB_SRC_PATTERN = $(CORBA_STUB_DIR)/%SK.cc 624OMNIORB_STUB_OBJ_PATTERN = $(CORBA_STUB_DIR)/%SK.o 625OMNIORB_DYN_STUB_SRC_PATTERN = $(CORBA_STUB_DIR)/%DynSK.cc 626OMNIORB_DYN_STUB_OBJ_PATTERN = $(CORBA_STUB_DIR)/%DynSK.o 627OMNIORB_STUB_HDR_PATTERN = $(CORBA_STUB_DIR)/%.hh 628 629 630CorbaImplementation = OMNIORB 631 632# 633# OMNI thread stuff 634# 635# Note that the DLL version is being used, so link to omnithread_rt.lib 636 637# Use native win32 threads 638ThreadSystem = NT 639 640# Use pthread_nt, comment out ThreadSystem line above and uncomment the 641# following 2 lines. 642#ThreadSystem = NTPosix 643#OMNITHREAD_CPPFLAGS= -D__POSIX_NT__ 644 645OMNITHREAD_LIB = $(patsubst %,$(DLLSearchPattern),omnithread$(OMNITHREAD_MAJOR_VERSION)$(OMNITHREAD_MINOR_VERSION)) 646lib_depend := $(patsubst %,$(DLLPattern),omnithread$(OMNITHREAD_MAJOR_VERSION)$(OMNITHREAD_MINOR_VERSION)) 647OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND) 648 649OMNITHREAD_PLATFORM_LIB = 650 651 652# omniORB SSL transport 653OMNIORB_SSL_VERSION = $(OMNIORB_VERSION) 654OMNIORB_SSL_MAJOR_VERSION = $(word 1,$(subst ., ,$(OMNIORB_SSL_VERSION))) 655OMNIORB_SSL_MINOR_VERSION = $(word 2,$(subst ., ,$(OMNIORB_SSL_VERSION))) 656OMNIORB_SSL_MICRO_VERSION = $(word 3,$(subst ., ,$(OMNIORB_SSL_VERSION))) 657 658OMNIORB_SSL_LIB = $(patsubst %,$(DLLSearchPattern),omnisslTP$(OMNIORB_SSL_MAJOR_VERSION)$(OMNIORB_SSL_MINOR_VERSION)$(OMNIORB_SSL_MICRO_VERSION)) 659 660lib_depend := $(patsubst %,$(DLLPattern),omnisslTP$(OMNIORB_SSL_MAJOR_VERSION)$(OMNIORB_SSL_MINOR_VERSION)$(OMNIORB_SSL_MICRO_VERSION)) 661OMNIORB_SSL_LIB_DEPEND := $(GENERATE_LIB_DEPEND) 662