summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Makefile.mak
blob: 60276a2d2f07ffcde2d52b79b564ddcc8873ee2c (plain)
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
231
232
233
234
235
236
237
238
239
240
# **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

top_srcdir	= ..\..

ADMIN		= $(top_srcdir)\bin\icegridadmin.exe

DB		= $(top_srcdir)\bin\icegriddb.exe

NODE_SERVER_D	= $(top_srcdir)\bin\icegridnoded.exe
NODE_SERVER_R	= $(top_srcdir)\bin\icegridnode.exe

NODE_SERVER	= $(top_srcdir)\bin\icegridnode$(LIBSUFFIX).exe

REGISTRY_SERVER_D = $(top_srcdir)\bin\icegridregistryd.exe
REGISTRY_SERVER_R = $(top_srcdir)\bin\icegridregistry.exe

REGISTRY_SERVER	= $(top_srcdir)\bin\icegridregistry$(LIBSUFFIX).exe

TARGETS         = $(ADMIN) $(NODE_SERVER) $(REGISTRY_SERVER) $(DB)

CSLICE_OBJS     = .\Internal.obj \
		  .\IceLocatorDiscovery.obj

DSLICE_OBJS     = .\DBTypes.obj

all:: StringApplicationInfoDict.h StringApplicationInfoDict.cpp \
	  IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp \
	  StringAdapterInfoDict.h StringAdapterInfoDict.cpp \
	  SerialsDict.h SerialsDict.cpp

BISON_FLEX_OBJS = .\Grammar.obj \
                  .\Scanner.obj

ADMIN_OBJS	= .\Client.obj \
		  .\DescriptorBuilder.obj \
		  .\DescriptorHelper.obj \
		  .\DescriptorParser.obj \
		  .\FileParserI.obj \
		  .\Parser.obj \
		  .\Util.obj \
		  $(CSLICE_OBJS) \
                  $(BISON_FLEX_OBJS)

COMMON_OBJS	= .\AdminRouter.obj \
		  .\DescriptorBuilder.obj \
		  .\DescriptorParser.obj \
		  .\FileCache.obj \
		  .\PlatformInfo.obj \
		  .\SessionManager.obj \
		  .\TraceLevels.obj \
		  $(CSLICE_OBJS)

NODE_OBJS	= .\Activator.obj \
		  .\NodeAdminRouter.obj \
		  .\NodeI.obj \
		  .\NodeSessionManager.obj \
		  .\ServerAdapterI.obj \
		  .\ServerI.obj

REGISTRY_OBJS	= .\AdapterCache.obj \
		  .\AdminCallbackRouter.obj \
		  .\AdminI.obj \
		  .\AdminSessionI.obj \
		  .\Allocatable.obj \
		  .\AllocatableObjectCache.obj \
		  .\Database.obj \
		  .\DescriptorHelper.obj \
		  .\FileUserAccountMapperI.obj \
		  .\IdentityObjectInfoDict.obj \
		  .\InternalRegistryI.obj \
		  .\LocatorI.obj \
		  .\LocatorRegistryI.obj \
		  .\NodeCache.obj \
		  .\NodeSessionI.obj \
		  .\ObjectCache.obj \
		  .\PluginFacadeI.obj \
		  .\QueryI.obj \
		  .\ReapThread.obj \
		  .\RegistryAdminRouter.obj \
		  .\RegistryI.obj \
		  .\ReplicaCache.obj \
		  .\ReplicaSessionI.obj \
		  .\ReplicaSessionManager.obj \
		  .\SerialsDict.obj \
		  .\ServerCache.obj \
		  .\SessionI.obj \
		  .\SessionServantManager.obj \
		  .\StringAdapterInfoDict.obj \
		  .\StringApplicationInfoDict.obj \
		  .\Topics.obj \
		  .\Util.obj \
		  .\WellKnownObjectsManager.obj

NODE_SVR_OBJS	= $(COMMON_OBJS) \
		  $(NODE_OBJS) \
		  $(REGISTRY_OBJS) \
		  .\IceGridNode.obj

REGISTRY_SVR_OBJS = \
		  $(COMMON_OBJS) \
		  $(REGISTRY_OBJS) \
		  .\IceGridRegistry.obj

DB_OBJS		= .\IceGridDB.obj \
		  .\IdentityObjectInfoDict.obj \
		  .\SerialsDict.obj \
		  .\StringAdapterInfoDict.obj \
		  .\StringApplicationInfoDict.obj \
		  $(DSLICE_OBJS)

OBJS            = $(ADMIN_OBJS) \
		  $(NODE_SVR_OBJS) \
		  $(REGISTRY_SVR_OBJS) \
		  $(DB_OBJS)

HDIR		= $(headerdir)\IceGrid
SDIR		= $(slicedir)\IceGrid

SLICE2FREEZECMD = $(SLICE2FREEZE) -I.. --ice --include-dir IceGrid $(ICECPPFLAGS)

!include $(top_srcdir)\config\Make.rules.mak

LINKWITH 	= $(LIBS)
ALINKWITH 	= $(LIBS)
DLINKWITH 	= $(LIBS)
NLINKWITH	= $(LIBS) advapi32.lib pdh.lib ws2_32.lib

SLICE2CPPFLAGS	= --checksum --ice --include-dir IceGrid $(SLICE2CPPFLAGS)
CPPFLAGS	= -I. -I.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -Zm200

!if "$(OPTIMIZE)" == "yes"
!if "$(CPP_COMPILER)" == "VC140"
CPPFLAGS        = $(CPPFLAGS) -d2SSAOptimizer-
!endif
!endif

!if "$(GENERATE_PDB)" == "yes"
APDBFLAGS       = /pdb:$(ADMIN:.exe=.pdb)
DBPDBFLAGS      = /pdb:$(DB:.exe=.pdb)
RPDBFLAGS       = /pdb:$(REGISTRY_SERVER:.exe=.pdb)
NPDBFLAGS       = /pdb:$(NODE_SERVER:.exe=.pdb)
!endif

ARES_FILE       = IceGridAdmin.res
DRES_FILE       = IceGridDB.res
RRES_FILE       = IceGridRegistry.res
NRES_FILE       = IceGridNode.res

$(ADMIN): $(ADMIN_OBJS) IceGridAdmin.res
	$(LINK) $(LD_EXEFLAGS) $(APDBFLAGS) $(ADMIN_OBJS) $(SETARGV) $(PREOUT)$@ $(PRELIBS)$(ALINKWITH) $(ARES_FILE)
	@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) &&\
	    $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
	@if defined SIGN_CERTIFICATE echo ^ ^ ^ Signing $@ && \
		signtool sign /f "$(SIGN_CERTIFICATE)" /p $(SIGN_PASSWORD) /t $(SIGN_TIMESTAMPSERVER) $@

$(DB): $(DB_OBJS) IceGridDB.res
	$(LINK) $(LD_EXEFLAGS) $(DBPDBFLAGS) $(DB_OBJS) $(SETARGV) $(PREOUT)$@ $(PRELIBS)$(DLINKWITH) $(DRES_FILE)
	@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) &&\
	    $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
	@if defined SIGN_CERTIFICATE echo ^ ^ ^ Signing $@ && \
		signtool sign /f "$(SIGN_CERTIFICATE)" /p $(SIGN_PASSWORD) /t $(SIGN_TIMESTAMPSERVER) $@

$(REGISTRY_SERVER): $(REGISTRY_SVR_OBJS) IceGridRegistry.res
	$(LINK) $(LD_EXEFLAGS) $(RPDBFLAGS) $(REGISTRY_SVR_OBJS) $(SETARGV) $(PREOUT)$@ \
		$(PRELIBS)$(NLINKWITH) $(RRES_FILE)
	@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
	    $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
	@if defined SIGN_CERTIFICATE echo ^ ^ ^ Signing $@ && \
		signtool sign /f "$(SIGN_CERTIFICATE)" /p $(SIGN_PASSWORD) /t $(SIGN_TIMESTAMPSERVER) $@

$(NODE_SERVER): $(NODE_SVR_OBJS) IceGridNode.res
	$(LINK) $(LD_EXEFLAGS) $(NPDBFLAGS) $(NODE_SVR_OBJS) $(SETARGV) $(PREOUT)$@ $(PRELIBS)$(NLINKWITH) $(NRES_FILE)
	@if exist $@.manifest \
	    $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
	@if defined SIGN_CERTIFICATE echo ^ ^ ^ Signing $@ && \
		signtool sign /f "$(SIGN_CERTIFICATE)" /p $(SIGN_PASSWORD) /t $(SIGN_TIMESTAMPSERVER) $@

IceLocatorDiscovery.h IceLocatorDiscovery.cpp: $(slicedir)\IceLocatorDiscovery\IceLocatorDiscovery.ice "$(SLICE2CPP)" "$(SLICEPARSERLIB)"
	del /q $(*F).h $(*F).cpp
	"$(SLICE2CPP)" $(SLICE2CPPFLAGS) $(slicedir)\IceLocatorDiscovery\IceLocatorDiscovery.ice

{$(slicedir)\IceLocatorDiscovery}.ice{$(SLICE_DEPEND_DIR)\}.d:
	@echo Generating dependencies for $<
	@"$(SLICE2CPP)" $(SLICE2CPPFLAGS) --depend $< | cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice

StringApplicationInfoDict.h StringApplicationInfoDict.cpp: $(SDIR)\Admin.ice $(SLICE2FREEZE) $(SLICEPARSERLIB)
	del /q StringApplicationInfoDict.h StringApplicationInfoDict.cpp
	$(SLICE2FREEZECMD) --dict IceGrid::StringApplicationInfoDict,string,IceGrid::ApplicationInfo \
	StringApplicationInfoDict $(SDIR)\Admin.ice

IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp: $(slicedir)\Ice\Identity.ice $(SDIR)\Admin.ice $(SLICE2FREEZE) $(SLICEPARSERLIB)
	del /q IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp
	$(SLICE2FREEZECMD) --dict IceGrid::IdentityObjectInfoDict,Ice::Identity,IceGrid::ObjectInfo \
	--dict-index IceGrid::IdentityObjectInfoDict,type \
	IdentityObjectInfoDict $(slicedir)\Ice\Identity.ice $(SDIR)\Admin.ice

StringAdapterInfoDict.h StringAdapterInfoDict.cpp: $(SDIR)\Admin.ice $(SLICE2FREEZE) $(SLICEPARSERLIB)
	del /q StringAdapterInfoDict.h StringAdapterInfoDict.cpp
	$(SLICE2FREEZECMD) --dict IceGrid::StringAdapterInfoDict,string,IceGrid::AdapterInfo \
	--dict-index IceGrid::StringAdapterInfoDict,replicaGroupId StringAdapterInfoDict $(SDIR)\Admin.ice

SerialsDict.h SerialsDict.cpp: $(SLICE2FREEZE) $(SLICEPARSERLIB)
	del /q SerialsDict.h SerialsDict.cpp
	$(SLICE2FREEZECMD) --dict IceGrid::SerialsDict,string,long SerialsDict

clean::
	-del /q DBTypes.cpp DBTypes.h
	-del /q Internal.cpp Internal.h
	-del /q StringApplicationInfoDict.h StringApplicationInfoDict.cpp
	-del /q StringAdapterInfoDict.h StringAdapterInfoDict.cpp
	-del /q IdentityObjectInfoDict.h IdentityObjectInfoDict.cpp
	-del /q SerialsDict.h SerialsDict.cpp
	-del /q $(ADMIN:.exe=.*)
	-del /q $(DB:.exe=.*)
	-del /q $(NODE_SERVER_D:.exe=.*) $(NODE_SERVER_R:.exe=.*)
	-del /q $(REGISTRY_SERVER_D:.exe=.*) $(REGISTRY_SERVER_R:.exe=.*)
	-del /q IceGridAdmin.res IceGridNode.res IceGridRegistry.res

install:: all
	copy $(ADMIN) "$(install_bindir)"
	copy $(DB) "$(install_bindir)"
	copy $(NODE_SERVER) "$(install_bindir)"
	copy $(REGISTRY_SERVER) "$(install_bindir)"

!if "$(GENERATE_PDB)" == "yes"

install:: all
	copy $(ADMIN:.exe=.pdb) "$(install_bindir)"
	copy $(DB:.exe=.pdb) "$(install_bindir)"
	copy $(NODE_SERVER:.exe=.pdb) "$(install_bindir)"
	copy $(REGISTRY_SERVER:.exe=.pdb) "$(install_bindir)"

!endif