-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakeVars.win32
230 lines (185 loc) · 6.92 KB
/
MakeVars.win32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#
# MICO --- an Open Source CORBA implementation
# Copyright (c) 1997-2008 by The Mico Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# For more information, visit the MICO Home Page at
# http://www.mico.org/
#
#
# Configuration
#
!include MakefileConfig.win32
!include vstudio.win32
# QoS stuff
# comment out the following line to disable compilation
# of MICO messaging part
#
USE_MESSAGING = 1
# Threading Policies stuff
# comment out the following line to disable compilation
# of Threading Policies part
#
THREADING_POLICIES = 1
# Adapted by Sorin Mustaca <[email protected]>
# Download and compile the OpenSSL sources. Install the DLLs into win32-bin
# and the libraries in win32-bin\lib.
# If the libs are found, then MICO will be automatically SSL-enabled.
#
# After compiling the sources execute install-openssl.bat from the root of MICO tree
!ifdef HAVE_SSL
SSL_PATH=$(RELATIVE)\contrib\openssl
SSL_FLAGS=/W3 /Gs0 /GF /Gy /nologo \
-DMONOLITH -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN \
/DHAVE_SSL /DHAVE_OPENSSL_SSL_H -I$(SSL_PATH)
SSL_LIBS=/LIBPATH:$(RELATIVE)\win32-bin\lib ssleay32.lib libeay32.lib
MPATH= $(RELATIVE)\win32-bin
!endif
!ifdef HAVE_SSL
# comment out following line to disable compilation of CSIv2
USE_CSIV2 = 1
!if defined(USE_CSIV2)
# comment out following line to disable compilation of SL3
USE_SL3 = 1
!endif
!if defined(USE_CSIV2)
CSIV2_FLAGS = /DUSE_CSIV2
!endif
!if defined(USE_SL3)
CSIV2_FLAGS = /DUSE_CSIV2 /DUSE_SL3
!endif
!endif
!if defined(USE_MESSAGING)
MESSAGING_FLAGS = /DUSE_MESSAGING
!endif
!if defined(THREADING_POLICIES)
THREADING_POLICIES_FLAGS = /DTHREADING_POLICIES
!endif
# PTHREADS adaptation by Sorin Mustaca <[email protected]>
#
# MICO is able to be compiled and run in multi-threaded environment on
# top of Win32 OS by using posix threads "emulation" layer which is
# provided by POSIX Threads for Win32 project. For more information
# about this project and for sources of pthreads library please look at
# http://sources.redhat.com/pthreads-win32/
#
# In order to compile MICO with pthreads first compile the library you
# want to use: PthreadsVC(no exception), PthreadsVCE(C++ EH) and/or
# PthreadsVSE(MSVC Structured EH). Please read 'README' file from
# pthreads package before doing any modification here. If you have
# pthreads library compiled and ready, install the dlls into win32-bin
# and the libs into win32-bin\lib
# If the libs are found, then MICO will be automatically compiled as MT-enabled.
#
!ifdef HAVE_THREADS
PTHREADS_PATH= $(RELATIVE)\contrib\pthreads
# NEED_THREADID_OPERATORS define solves issue with a new pthread_t
# defined as a struct of a pointer and int in a recent versions
# of Win32 POSIX Threading library (the change was done on 2004-10-29)
NEED_THREADID_OPERATORS = 1
# Starting with version 2.x.y, Win32 POSIX Threads library is using
# "1" or "2" as a library name suffix
!ifdef RELEASE_BUILD
PTHREADS_LIB_SUFFIX = 2
!else
PTHREADS_LIB_SUFFIX = 2d
!endif
!if defined (HAVE_PTHREADS_VSE)
PTHREADS_LIB= pthreadVSE$(PTHREADS_LIB_SUFFIX).lib
PTHREADS_EXC= __CLEANUP_SEH
!endif
!if defined(HAVE_PTHREADS_VC)
PTHREADS_LIB= pthreadVC$(PTHREADS_LIB_SUFFIX).lib
PTHREADS_EXC= __CLEANUP_C
!endif
!if defined(HAVE_PTHREADS_VCE)
PTHREADS_LIB= pthreadVCE$(PTHREADS_LIB_SUFFIX).lib
PTHREADS_EXC= __CLEANUP_CXX
!endif
PTHREADS_LIB=/LIBPATH:$(RELATIVE)\win32-bin\lib $(PTHREADS_LIB)
!ifdef NEED_THREADID_OPERATORS
PTHREADS_FLAGS= /DNEED_THREADID_OPERATORS /W3 /DHAVE_PTHREADS /DHAVE_THREADS /I$(PTHREADS_PATH) /DPtW32NoCatchWarn /D$(PTHREADS_EXC) /D_WIN32_WINNT=0x400
!else
PTHREADS_FLAGS= /W3 /DHAVE_PTHREADS /DHAVE_THREADS /I$(PTHREADS_PATH) /DPtW32NoCatchWarn /D$(PTHREADS_EXC) /D_WIN32_WINNT=0x400
!endif
MPATH= $(MPATH);$(PTHREADS_PATH)
!endif
#CCM stuff
# Enable or disable it from the MakefileConfig.win32 file.
# Default: OFF
!ifdef USE_CCM
CCM_FLAGS = /DUSE_CCM
!endif
#
#End of configuration
#
CXX = cl.exe
CC = cl.exe
LINK = link.exe
LD = $(LINK)
JAVAC = javac.exe
JCUP = java.exe java_cup.Main
MAKE = nmake /nologo
#where the compilation is done regarding to ROOT
#do not uncomment
#RELATIVE =
COPY = copy /Y
SYSLIBS = wsock32.lib
AR = lib.exe
ARFLAGS = /nologo
RM = del /F /Q 2> nul
LDFLAGS = $(LINKFLAGS)
IDL = $(RELATIVE)\win32-bin\idl.exe
MKDEPEND = echo
DELETE = $(RM) *.obj *.exe *.def *.dmp *.dll *.lib *.exp *.pdb *.pch *.ilk
!ifdef RELEASE_BUILD
CXXFLAGS = /nologo /Ox /EHsc /GR /TP /MD $(SSL_FLAGS) $(CSIV2_FLAGS) $(MESSAGING_FLAGS) $(THREADING_POLICIES_FLAGS) $(PTHREADS_FLAGS) $(CCM_FLAGS) $(CXXVC)
CCFLAGS = /nologo /TC /MD $(SSL_FLAGS) $(CSIV2_FLAGS) $(MESSAGING_FLAGS) $(THREADING_POLICIES_FLAGS) $(PTHREADS_FLAGS) $(CCM_FLAGS) $(CXXVC)
LINKFLAGS = /nologo /subsystem:console /OPT:REF /incremental:no $(SSL_LIBS) $(PTHREADS_LIB) $(MANIFEST)
LINKDLLFLAGS = /nologo /dll /incremental:no /OPT:REF $(SSL_LIBS) $(PTHREADS_LIB) $(MANIFEST)
!else
# In Debug there are a lot of security checks: /GS,/GZ . Consult MSDN for details.
# If you need faster compilation and execution times in DEBUG, just comment the var below
#SECURITY_CHECKS = /GS /GZ /Ge /RTCu /RTCs
#HAVE_MEMCHECK = 1
CXXFLAGS = /nologo $(SECURITY_CHECKS) /Od /EHsc /GR /TP /Zi /MDd $(SSL_FLAGS) $(CSIV2_FLAGS) $(MESSAGING_FLAGS) $(THREADING_POLICIES_FLAGS) $(PTHREADS_FLAGS) $(CCM_FLAGS) $(CXXVC)
CCFLAGS = /nologo $(SECURITY_CHECKS) /TC /Zi /MDd $(SSL_FLAGS) $(CSIV2_FLAGS) $(MESSAGING_FLAGS) $(THREADING_POLICIES_FLAGS) $(PTHREADS_FLAGS) $(CCM_FLAGS) $(CXXVC)
LINKFLAGS = /nologo /debug /subsystem:console /incremental:no $(SSL_LIBS) $(PTHREADS_LIB) $(MANIFEST)
LINKDLLFLAGS = /nologo /debug /dll /incremental:no $(SSL_LIBS) $(PTHREADS_LIB) $(MANIFEST)
!endif
# uncomment if you have tcl installed and declare path
# HAVE_TCL = 1
# TCL_PATH = d:\tcl
# Tcl support is not usable yet
.SUFFIXES:
.SUFFIXES: .c .cc .cpp .cxx .obj .rc .RES .idl .class .java .cup
.cc.obj:
$(CXX) /c $(CXXFLAGS) $< /Fo$*.obj
.cpp.obj:
$(CXX) /c $(CXXFLAGS) $< /Fo$*.obj
.cxx.obj:
$(CXX) /c $(CXXFLAGS) $< /Fo$*.obj
.rc.RES:
$(RC) $<
.idl.cpp:
echo compiling IDL
$(IDL) --c++-suffix=cpp $<
.c.obj:
$(CC) /c $(CCFLAGS) $< /Fo$*.obj
.java.class:
$(JAVAC) $<
.cup.java:
$(JCUP) < $<