xref: /aoo41x/main/solenv/inc/set_wntx64.mk (revision 3d054da9)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir###############################################
24cdf0e10cSrcweir#        Windows 64 bit special
25cdf0e10cSrcweir#	only used for 64 bit shell extension
26cdf0e10cSrcweir#          ( Windows Vista )
27cdf0e10cSrcweir# ---------------------------------------------
28cdf0e10cSrcweir# THIS FILE WILL BE DELETED when a fully ported
29cdf0e10cSrcweir# Windows 64 bit version is available
30cdf0e10cSrcweir###############################################
31cdf0e10cSrcweir
32cdf0e10cSrcweir.IF "$(BUILD_X64)"!=""
33cdf0e10cSrcweir# ----------------- settings for x64 --------------------
34cdf0e10cSrcweirCC_X64*:=$(WRAPCMD) $(CXX_X64_BINARY)
35cdf0e10cSrcweirCXX_X64*:=$(WRAPCMD) $(CXX_X64_BINARY)
36cdf0e10cSrcweirLINK_X64*:=$(WRAPCMD) $(LINK_X64_BINARY) $(NOLOGO) -MACHINE:X64
37cdf0e10cSrcweirLIBMGR_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY) $(NOLOGO)
38cdf0e10cSrcweirIMPLIB_X64=$(WRAPCMD) $(LIBMGR_X64_BINARY)
39cdf0e10cSrcweir
40e5a7b9b2SHerbert DürrUSE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:wchar_t- -GR
41cdf0e10cSrcweir
42cdf0e10cSrcweir# Stack buffer overrun detection.
43cdf0e10cSrcweirCFLAGS+=-GS
44cdf0e10cSrcweir
45cdf0e10cSrcweirUSE_CDEFS_X64+= -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
46cdf0e10cSrcweir.IF "$(debug)"!=""
47cdf0e10cSrcweirUSE_CFLAGS_X64+=-Zi -Fd$(MISC_X64)/$(@:b).pdb
48cdf0e10cSrcweirUSE_CDEFS_X64+=-DDEBUG
49cdf0e10cSrcweir.ENDIF # "$(debug)"!=""
50*3d054da9Smseidel# Required for correct Windows function call ABI for expat static library
51*3d054da9Smseidel.IF "$(SYSTEM_EXPAT)"=="NO"
52*3d054da9SmseidelUSE_CDEFS_X64+=-DXML_STATIC
53*3d054da9Smseidel.ENDIF
54cdf0e10cSrcweirUSE_CFLAGS_X64+=$(CFLAGS_X64)
55cdf0e10cSrcweirUSE_CDEFS_X64+=$(CDEFS_X64)
56cdf0e10cSrcweirINCLUDE_X64=$(subst,/stl$(SPACECHAR),dont_use_stl$(SPACECHAR) $(INCLUDE))
57cdf0e10cSrcweir
58cdf0e10cSrcweir.IF "$(product)" != ""
59cdf0e10cSrcweirUSE_CFLAGS_X64+=-Gy
60cdf0e10cSrcweir.ENDIF # "$(product)" != ""
61cdf0e10cSrcweir
62cdf0e10cSrcweir# inline expansion
63cdf0e10cSrcweirUSE_CFLAGS_X64+=-Ob1
64cdf0e10cSrcweir
65cdf0e10cSrcweir.IF "$(DYNAMIC_CRT)"!=""
66cdf0e10cSrcweirCDEFSSLOMT_X64+=-D_MT -D_DLL
67cdf0e10cSrcweirCDEFSSLOMT_X64+=-D_MT -D_DLL
68cdf0e10cSrcweir.IF "$(NO_DYNAMIC_OBJ)"==""
69cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT -D_DLL
70cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT -D_DLL
71cdf0e10cSrcweir.ELSE
72cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT
73cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT
74cdf0e10cSrcweir.ENDIF # "$(NO_DYNAMIC_OBJ)"==""
75cdf0e10cSrcweir.ELSE
76cdf0e10cSrcweirCDEFSSLOMT_X64+=-D_MT
77cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT
78cdf0e10cSrcweir.ENDIF # "$(DYNAMIC_CRT)"!=""
79cdf0e10cSrcweir
80cdf0e10cSrcweir.IF "$(PRODUCT)"!="full"
81cdf0e10cSrcweir.ELSE
82cdf0e10cSrcweirLINKFLAGS_X64=/MAP /OPT:NOREF
83cdf0e10cSrcweir.ENDIF
84cdf0e10cSrcweir
85cdf0e10cSrcweir# excetion handling protection
86cdf0e10cSrcweirLINKFLAGS+=-safeseh
87cdf0e10cSrcweir
88cdf0e10cSrcweir# enable DEP
89cdf0e10cSrcweirLINKFLAGS+=-nxcompat
90cdf0e10cSrcweir
91cdf0e10cSrcweir# enable ASLR
92cdf0e10cSrcweirLINKFLAGS+=-dynamicbase
93cdf0e10cSrcweir
94cdf0e10cSrcweir.IF "$(PRODUCT)"!="full"
95cdf0e10cSrcweirLINKFLAGS_X64+= -NODEFAULTLIB -DEBUG
96cdf0e10cSrcweir.ELSE # "$(PRODUCT)"!="full"
97cdf0e10cSrcweirLINKFLAGS_X64+= -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO
98cdf0e10cSrcweir.ENDIF # "$(PRODUCT)"!="full"
99cdf0e10cSrcweirMAPFILE=-out:$$@
100cdf0e10cSrcweir
101cdf0e10cSrcweir.IF "$(debug)" != ""
102cdf0e10cSrcweirLINKFLAGS_X64+= $(LINKFLAGSDEBUG)
103cdf0e10cSrcweir.ENDIF
104cdf0e10cSrcweir
105cdf0e10cSrcweirLINKFLAGSSHLCUI_X64=/SUBSYSTEM:CONSOLE /DLL
106cdf0e10cSrcweirLINKFLAGSSHL_X64=$(LINKFLAGSSHLCUI_X64)
107cdf0e10cSrcweirCDEFSSLO_X64+=$(CDEFSMT_X64) $(CDEFSOBJMT_X64)
108cdf0e10cSrcweirCFLAGSSLO_X64+=-MT
109cdf0e10cSrcweir
110cdf0e10cSrcweirSTDOBJGUI_X64=
111cdf0e10cSrcweirSTDSLOGUI_X64=
112cdf0e10cSrcweirSTDOBJCUI_X64=
113cdf0e10cSrcweirSTDSLOCUI_X64=
114cdf0e10cSrcweir
115cdf0e10cSrcweirIMPLIBFLAGS_X64=-machine:X64
116cdf0e10cSrcweir
11733605542SJürgen SchmidtLIBPATH_X64=$(PSDK_HOME)/lib/x64
118cdf0e10cSrcweirLIBPATH_VC_X64=$(COMPATH)/lib/amd64
119cdf0e10cSrcweir
120cdf0e10cSrcweirADVAPI32LIB_X64=$(LIBPATH_X64)/advapi32.lib
121cdf0e10cSrcweirSHELL32LIB_X64=$(LIBPATH_X64)/shell32.lib
122cdf0e10cSrcweirGDI32LIB_X64=$(LIBPATH_X64)/gdi32.lib
123cdf0e10cSrcweirOLE32LIB_X64=$(LIBPATH_X64)/ole32.lib
124cdf0e10cSrcweirOLEAUT32LIB_X64=$(LIBPATH_X64)/oleaut32.lib
125cdf0e10cSrcweirUUIDLIB_X64=$(LIBPATH_X64)/uuid.lib
126cdf0e10cSrcweirWINSPOOLLIB_X64=$(LIBPATH_X64)/winspool.lib
127cdf0e10cSrcweirIMM32LIB_X64=$(LIBPATH_X64)/imm32.lib
128cdf0e10cSrcweirVERSIONLIB_X64=$(LIBPATH_X64)/version.lib
129cdf0e10cSrcweirWINMMLIB_X64=$(LIBPATH_X64)/winmm.lib
130cdf0e10cSrcweirWSOCK32LIB_X64=$(LIBPATH_X64)/wsock32.lib
131cdf0e10cSrcweirMPRLIB_X64=$(LIBPATH_X64)/mpr.lib
132cdf0e10cSrcweirWS2_32LIB_X64=$(LIBPATH_X64)/ws2_32.lib
133cdf0e10cSrcweirKERNEL32LIB_X64=$(LIBPATH_X64)/kernel32.lib
134cdf0e10cSrcweirUSER32LIB_X64=$(LIBPATH_X64)/user32.lib
135cdf0e10cSrcweirCOMDLG32LIB_X64=$(LIBPATH_X64)/comdlg32.lib
136cdf0e10cSrcweirCOMCTL32LIB_X64=$(LIBPATH_X64)/comctl32.lib
137cdf0e10cSrcweirCRYPT32LIB_X64=$(LIBPATH_X64)/crypt32.lib
138cdf0e10cSrcweirGDIPLUSLIB_X64=$(LIBPATH_X64)/gdiplus.lib
139cdf0e10cSrcweirDBGHELPLIB_X64=$(LIBPATH_X64)/dbghelp.lib
140cdf0e10cSrcweirPROPSYSLIB_X64=$(LIBPATH_X64)/propsys.lib
141cdf0e10cSrcweirMSILIB_X64=$(LIBPATH_X64)/msi.lib
142cdf0e10cSrcweirDDRAWLIB_X64=$(LIBPATH_X64)/ddraw.lib
143cdf0e10cSrcweirSHLWAPILIB_X64=$(LIBPATH_X64)/shlwapi.lib
144cdf0e10cSrcweirURLMONLIB_X64=$(LIBPATH_X64)/urlmon.lib
145cdf0e10cSrcweirWININETLIB_X64=$(LIBPATH_X64)/wininet.lib
146cdf0e10cSrcweirOLDNAMESLIB_X64=$(LIBPATH_VC_X64)/oldnames.lib
147cdf0e10cSrcweirMSIMG32LIB_X64=$(LIBPATH_X64)/msimg32.lib
148cdf0e10cSrcweirMSVCPRT_X64=$(LIBPATH_VC_X64)/msvcprt.lib
149cdf0e10cSrcweirMSVCRT_X64=$(LIBPATH_VC_X64)/msvcrt.lib
150cdf0e10cSrcweir
151cdf0e10cSrcweirMISC_X64=$(MISC)/x64
152cdf0e10cSrcweirOBJ_X64=$(OBJ)/x64
153cdf0e10cSrcweirSLO_X64=$(SLO)/x64
154cdf0e10cSrcweirLB_X64=$(LB)/x64
155cdf0e10cSrcweirSLB_X64=$(SLB)/x64
156cdf0e10cSrcweirL_X64=$(SOLARLIBDIR_X64)
157cdf0e10cSrcweirVERSIONOBJ_X64=$(SLO_X64)/_version.obj
158cdf0e10cSrcweirBIN_X64=$(BIN)/x64
159cdf0e10cSrcweirRES_X64=$(RES)/x64
160cdf0e10cSrcweirSOLARLIBDIR_X64=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)/x64
161cdf0e10cSrcweirLIB_X64:=$(LB_X64);$(SLB_X64);$(ILIB_X64)
162cdf0e10cSrcweir
163cdf0e10cSrcweir.IF "$(LIBTARGET)"==""
164cdf0e10cSrcweir.IF "$(OBJFILES_X64)$(IDLOBJFILES_X64)"!=""
165cdf0e10cSrcweirOBJTARGET_X64=$(LB_X64)/$(TARGET).lib
166cdf0e10cSrcweir.ENDIF # "$(OBJFILES_X64)$(IDLOBJFILES_X64)"!=""
167cdf0e10cSrcweir.IF "$(SLOFILES_X64)$(IDLSLOFILES_x64)"!=""
168cdf0e10cSrcweirSLOTARGET_X64=$(SLB_X64)/$(TARGET).lib
169cdf0e10cSrcweir.ENDIF # "$(SLOFILES_X64)$(IDLSLOFILES_x64)"!=""
170cdf0e10cSrcweir.ENDIF # "$(LIBTARGET)"==""
171cdf0e10cSrcweir
172cdf0e10cSrcweir.IF "$(OBJFILES_X64)"!=""
173cdf0e10cSrcweir.IF "$(LIBTARGET)" != ""
174cdf0e10cSrcweirNOLIBOBJTARGET_X64=$(OBJFILES_X64)
175cdf0e10cSrcweir.ENDIF
176cdf0e10cSrcweir.ENDIF
177cdf0e10cSrcweir
178cdf0e10cSrcweir.IF "$(SLOFILES_X64)"!=""
179cdf0e10cSrcweir.IF "$(LIBTARGET)" != ""
180cdf0e10cSrcweirNOLIBSLOTARGET_X64=$(SLOFILES_X64)
181cdf0e10cSrcweir.ENDIF
182cdf0e10cSrcweir.ENDIF
183cdf0e10cSrcweir
184cdf0e10cSrcweir.IF "$(SHL1TARGET_X64)"!=""
185cdf0e10cSrcweirSHL1TARGETN_X64=$(BIN_X64)/$(DLLPRE)$(SHL1TARGET_X64)$(DLLPOST)
186cdf0e10cSrcweir.ENDIF
187cdf0e10cSrcweir.IF "$(SHL2TARGET_X64)"!=""
188cdf0e10cSrcweirSHL2TARGETN_X64=$(BIN_X64)/$(DLLPRE)$(SHL2TARGET_X64)$(DLLPOST)
189cdf0e10cSrcweir.ENDIF
190cdf0e10cSrcweir.IF "$(LIB1TARGET_X64)" != ""
191cdf0e10cSrcweirLIB1TARGETN_X64=$(LIB1TARGET_X64)
192cdf0e10cSrcweir.ENDIF
193cdf0e10cSrcweir.IF "$(LIB2TARGET_X64)" != ""
194cdf0e10cSrcweirLIB2TARGETN_X64=$(LIB2TARGET_X64)
195cdf0e10cSrcweir.ENDIF
196cdf0e10cSrcweir.IF "$(DEF1NAME_X64)"!=""
197cdf0e10cSrcweirDEF1TARGETN_X64=$(MISC_X64)/$(DEF1NAME_X64).def
198cdf0e10cSrcweir.ENDIF
199cdf0e10cSrcweir.IF "$(DEF2NAME_X64)"!=""
200cdf0e10cSrcweirDEF2TARGETN_X64=$(MISC_X64)/$(DEF2NAME_X64).def
201cdf0e10cSrcweir.ENDIF
202cdf0e10cSrcweir
203cdf0e10cSrcweir$(SLO_X64)/%.obj : $(MISC_X64)/%.c
204cdf0e10cSrcweir    @echo ------------------------------
205cdf0e10cSrcweir    @echo Making: $@
206cdf0e10cSrcweir    -$(MKDIR) $(@:d)
207cdf0e10cSrcweir	@-$(MKDIR) $(MISC_X64)
208cdf0e10cSrcweir    @@-$(RM) $@
209cdf0e10cSrcweir    @$(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 )
210cdf0e10cSrcweir    @$(ECHONL)
211cdf0e10cSrcweir    $(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 )
212cdf0e10cSrcweir
213cdf0e10cSrcweir.ENDIF # "$(BUILD_X64)"!=""
214cdf0e10cSrcweir
215