xref: /aoo4110/main/solenv/inc/set_wntx64.mk (revision b1cdbd2c)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23###############################################
24#        Windows 64 bit special
25#	only used for 64 bit shell extension
26#          ( Windows Vista )
27# ---------------------------------------------
28# THIS FILE WILL BE DELETED when a fully ported
29# Windows 64 bit version is available
30###############################################
31
32.IF "$(BUILD_X64)"!=""
33# ----------------- settings for x64 --------------------
34CC_X64*:=$(WRAPCMD) $(CXX_X64_BINARY)
35CXX_X64*:=$(WRAPCMD) $(CXX_X64_BINARY)
36LINK_X64*:=$(WRAPCMD) $(LINK_X64_BINARY) $(NOLOGO) -MACHINE:X64
37LIBMGR_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY) $(NOLOGO)
38IMPLIB_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY)
39
40USE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:wchar_t- -GR
41
42# Stack buffer overrun detection.
43CFLAGS+=-GS
44
45USE_CDEFS_X64+= -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
46.IF "$(debug)"!=""
47USE_CFLAGS_X64+=-Zi -Fd$(MISC_X64)/$(@:b).pdb
48USE_CDEFS_X64+=-DDEBUG
49.ENDIF # "$(debug)"!=""
50# Required for correct Windows function call ABI for expat static library
51.IF "$(SYSTEM_EXPAT)"=="NO"
52USE_CDEFS_X64+=-DXML_STATIC
53.ENDIF
54USE_CFLAGS_X64+=$(CFLAGS_X64)
55USE_CDEFS_X64+=$(CDEFS_X64)
56INCLUDE_X64=$(subst,/stl$(SPACECHAR),dont_use_stl$(SPACECHAR) $(INCLUDE))
57
58.IF "$(product)" != ""
59USE_CFLAGS_X64+=-Gy
60.ENDIF # "$(product)" != ""
61
62# inline expansion
63USE_CFLAGS_X64+=-Ob1
64
65.IF "$(DYNAMIC_CRT)"!=""
66CDEFSSLOMT_X64+=-D_MT -D_DLL
67CDEFSSLOMT_X64+=-D_MT -D_DLL
68.IF "$(NO_DYNAMIC_OBJ)"==""
69CDEFSOBJMT_X64+=-D_MT -D_DLL
70CDEFSOBJMT_X64+=-D_MT -D_DLL
71.ELSE
72CDEFSOBJMT_X64+=-D_MT
73CDEFSOBJMT_X64+=-D_MT
74.ENDIF # "$(NO_DYNAMIC_OBJ)"==""
75.ELSE
76CDEFSSLOMT_X64+=-D_MT
77CDEFSOBJMT_X64+=-D_MT
78.ENDIF # "$(DYNAMIC_CRT)"!=""
79
80.IF "$(PRODUCT)"!="full"
81.ELSE
82LINKFLAGS_X64=/MAP /OPT:NOREF
83.ENDIF
84
85# excetion handling protection
86LINKFLAGS+=-safeseh
87
88# enable DEP
89LINKFLAGS+=-nxcompat
90
91# enable ASLR
92LINKFLAGS+=-dynamicbase
93
94.IF "$(PRODUCT)"!="full"
95LINKFLAGS_X64+= -NODEFAULTLIB -DEBUG
96.ELSE # "$(PRODUCT)"!="full"
97LINKFLAGS_X64+= -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO
98.ENDIF # "$(PRODUCT)"!="full"
99MAPFILE=-out:$$@
100
101.IF "$(debug)" != ""
102LINKFLAGS_X64+= $(LINKFLAGSDEBUG)
103.ENDIF
104
105LINKFLAGSSHLCUI_X64=/SUBSYSTEM:CONSOLE /DLL
106LINKFLAGSSHL_X64=$(LINKFLAGSSHLCUI_X64)
107CDEFSSLO_X64+=$(CDEFSMT_X64) $(CDEFSOBJMT_X64)
108CFLAGSSLO_X64+=-MT
109
110STDOBJGUI_X64=
111STDSLOGUI_X64=
112STDOBJCUI_X64=
113STDSLOCUI_X64=
114
115IMPLIBFLAGS_X64=-machine:X64
116
117LIBPATH_X64=$(PSDK_HOME)/lib/x64
118LIBPATH_VC_X64=$(COMPATH)/lib/amd64
119
120ADVAPI32LIB_X64=$(LIBPATH_X64)/advapi32.lib
121SHELL32LIB_X64=$(LIBPATH_X64)/shell32.lib
122GDI32LIB_X64=$(LIBPATH_X64)/gdi32.lib
123OLE32LIB_X64=$(LIBPATH_X64)/ole32.lib
124OLEAUT32LIB_X64=$(LIBPATH_X64)/oleaut32.lib
125UUIDLIB_X64=$(LIBPATH_X64)/uuid.lib
126WINSPOOLLIB_X64=$(LIBPATH_X64)/winspool.lib
127IMM32LIB_X64=$(LIBPATH_X64)/imm32.lib
128VERSIONLIB_X64=$(LIBPATH_X64)/version.lib
129WINMMLIB_X64=$(LIBPATH_X64)/winmm.lib
130WSOCK32LIB_X64=$(LIBPATH_X64)/wsock32.lib
131MPRLIB_X64=$(LIBPATH_X64)/mpr.lib
132WS2_32LIB_X64=$(LIBPATH_X64)/ws2_32.lib
133KERNEL32LIB_X64=$(LIBPATH_X64)/kernel32.lib
134USER32LIB_X64=$(LIBPATH_X64)/user32.lib
135COMDLG32LIB_X64=$(LIBPATH_X64)/comdlg32.lib
136COMCTL32LIB_X64=$(LIBPATH_X64)/comctl32.lib
137CRYPT32LIB_X64=$(LIBPATH_X64)/crypt32.lib
138GDIPLUSLIB_X64=$(LIBPATH_X64)/gdiplus.lib
139DBGHELPLIB_X64=$(LIBPATH_X64)/dbghelp.lib
140PROPSYSLIB_X64=$(LIBPATH_X64)/propsys.lib
141MSILIB_X64=$(LIBPATH_X64)/msi.lib
142DDRAWLIB_X64=$(LIBPATH_X64)/ddraw.lib
143SHLWAPILIB_X64=$(LIBPATH_X64)/shlwapi.lib
144URLMONLIB_X64=$(LIBPATH_X64)/urlmon.lib
145WININETLIB_X64=$(LIBPATH_X64)/wininet.lib
146OLDNAMESLIB_X64=$(LIBPATH_VC_X64)/oldnames.lib
147MSIMG32LIB_X64=$(LIBPATH_X64)/msimg32.lib
148MSVCPRT_X64=$(LIBPATH_VC_X64)/msvcprt.lib
149MSVCRT_X64=$(LIBPATH_VC_X64)/msvcrt.lib
150
151MISC_X64=$(MISC)/x64
152OBJ_X64=$(OBJ)/x64
153SLO_X64=$(SLO)/x64
154LB_X64=$(LB)/x64
155SLB_X64=$(SLB)/x64
156L_X64=$(SOLARLIBDIR_X64)
157VERSIONOBJ_X64=$(SLO_X64)/_version.obj
158BIN_X64=$(BIN)/x64
159RES_X64=$(RES)/x64
160SOLARLIBDIR_X64=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)/x64
161LIB_X64:=$(LB_X64);$(SLB_X64);$(ILIB_X64)
162
163.IF "$(LIBTARGET)"==""
164.IF "$(OBJFILES_X64)$(IDLOBJFILES_X64)"!=""
165OBJTARGET_X64=$(LB_X64)/$(TARGET).lib
166.ENDIF # "$(OBJFILES_X64)$(IDLOBJFILES_X64)"!=""
167.IF "$(SLOFILES_X64)$(IDLSLOFILES_x64)"!=""
168SLOTARGET_X64=$(SLB_X64)/$(TARGET).lib
169.ENDIF # "$(SLOFILES_X64)$(IDLSLOFILES_x64)"!=""
170.ENDIF # "$(LIBTARGET)"==""
171
172.IF "$(OBJFILES_X64)"!=""
173.IF "$(LIBTARGET)" != ""
174NOLIBOBJTARGET_X64=$(OBJFILES_X64)
175.ENDIF
176.ENDIF
177
178.IF "$(SLOFILES_X64)"!=""
179.IF "$(LIBTARGET)" != ""
180NOLIBSLOTARGET_X64=$(SLOFILES_X64)
181.ENDIF
182.ENDIF
183
184.IF "$(SHL1TARGET_X64)"!=""
185SHL1TARGETN_X64=$(BIN_X64)/$(DLLPRE)$(SHL1TARGET_X64)$(DLLPOST)
186.ENDIF
187.IF "$(SHL2TARGET_X64)"!=""
188SHL2TARGETN_X64=$(BIN_X64)/$(DLLPRE)$(SHL2TARGET_X64)$(DLLPOST)
189.ENDIF
190.IF "$(LIB1TARGET_X64)" != ""
191LIB1TARGETN_X64=$(LIB1TARGET_X64)
192.ENDIF
193.IF "$(LIB2TARGET_X64)" != ""
194LIB2TARGETN_X64=$(LIB2TARGET_X64)
195.ENDIF
196.IF "$(DEF1NAME_X64)"!=""
197DEF1TARGETN_X64=$(MISC_X64)/$(DEF1NAME_X64).def
198.ENDIF
199.IF "$(DEF2NAME_X64)"!=""
200DEF2TARGETN_X64=$(MISC_X64)/$(DEF2NAME_X64).def
201.ENDIF
202
203$(SLO_X64)/%.obj : $(MISC_X64)/%.c
204    @echo ------------------------------
205    @echo Making: $@
206    -$(MKDIR) $(@:d)
207	@-$(MKDIR) $(MISC_X64)
208    @@-$(RM) $@
209    @$(TYPE) $(mktmp $(CC_X64) $(USE_CFLAGS_X64) $(INCLUDE_C) $(CFLAGSCC_X64) $(CFLAGSSLO_X64) $(USE_CDEFS_X64) $(CDEFSSLO_X64) $(CFLAGSAPPEND_X64) $(CFLAGSOUTOBJ)$(SLO_X64)/$*.obj $(MISC_X64)/$*.c )
210    @$(ECHONL)
211    $(CC_X64) @$(mktmp $(USE_CFLAGS_X64) $(INCLUDE_C) $(CFLAGSCC_X64) $(CFLAGSSLO_X64) $(USE_CDEFS_X64) $(CDEFSSLO_X64) $(CFLAGSAPPEND_X64) $(CFLAGSOUTOBJ)$(SLO_X64)/$*.obj $(MISC_X64)/$*.c )
212
213.ENDIF # "$(BUILD_X64)"!=""
214
215