xref: /trunk/main/solenv/inc/set_wntx64.mk (revision 7871dc3e)
1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew 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
40cdf0e10cSrcweirUSE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:forScope,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)"!=""
50cdf0e10cSrcweirUSE_CFLAGS_X64+=$(CFLAGS_X64)
51cdf0e10cSrcweirUSE_CDEFS_X64+=$(CDEFS_X64)
52cdf0e10cSrcweirINCLUDE_X64=$(subst,/stl$(SPACECHAR),dont_use_stl$(SPACECHAR) $(INCLUDE))
53cdf0e10cSrcweir
54cdf0e10cSrcweir.IF "$(product)" != ""
55cdf0e10cSrcweirUSE_CFLAGS_X64+=-Gy
56cdf0e10cSrcweir.ENDIF # "$(product)" != ""
57cdf0e10cSrcweir
58cdf0e10cSrcweir# inline expansion
59cdf0e10cSrcweirUSE_CFLAGS_X64+=-Ob1
60cdf0e10cSrcweir
61cdf0e10cSrcweir.IF "$(DYNAMIC_CRT)"!=""
62cdf0e10cSrcweirCDEFSSLOMT_X64+=-D_MT -D_DLL
63cdf0e10cSrcweirCDEFSSLOMT_X64+=-D_MT -D_DLL
64cdf0e10cSrcweir.IF "$(NO_DYNAMIC_OBJ)"==""
65cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT -D_DLL
66cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT -D_DLL
67cdf0e10cSrcweir.ELSE
68cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT
69cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT
70cdf0e10cSrcweir.ENDIF # "$(NO_DYNAMIC_OBJ)"==""
71cdf0e10cSrcweir.ELSE
72cdf0e10cSrcweirCDEFSSLOMT_X64+=-D_MT
73cdf0e10cSrcweirCDEFSOBJMT_X64+=-D_MT
74cdf0e10cSrcweir.ENDIF # "$(DYNAMIC_CRT)"!=""
75cdf0e10cSrcweir
76cdf0e10cSrcweir.IF "$(PRODUCT)"!="full"
77cdf0e10cSrcweir.ELSE
78cdf0e10cSrcweirLINKFLAGS_X64=/MAP /OPT:NOREF
79cdf0e10cSrcweir.ENDIF
80cdf0e10cSrcweir
81cdf0e10cSrcweir# excetion handling protection
82cdf0e10cSrcweirLINKFLAGS+=-safeseh
83cdf0e10cSrcweir
84cdf0e10cSrcweir# enable DEP
85cdf0e10cSrcweirLINKFLAGS+=-nxcompat
86cdf0e10cSrcweir
87cdf0e10cSrcweir# enable ASLR
88cdf0e10cSrcweirLINKFLAGS+=-dynamicbase
89cdf0e10cSrcweir
90cdf0e10cSrcweir.IF "$(PRODUCT)"!="full"
91cdf0e10cSrcweirLINKFLAGS_X64+= -NODEFAULTLIB -DEBUG
92cdf0e10cSrcweir.ELSE # "$(PRODUCT)"!="full"
93cdf0e10cSrcweirLINKFLAGS_X64+= -NODEFAULTLIB -RELEASE -DEBUG -INCREMENTAL:NO
94cdf0e10cSrcweir.ENDIF # "$(PRODUCT)"!="full"
95cdf0e10cSrcweirMAPFILE=-out:$$@
96cdf0e10cSrcweir
97cdf0e10cSrcweir.IF "$(debug)" != ""
98cdf0e10cSrcweirLINKFLAGS_X64+= $(LINKFLAGSDEBUG)
99cdf0e10cSrcweir.ENDIF
100cdf0e10cSrcweir
101cdf0e10cSrcweirLINKFLAGSSHLCUI_X64=/SUBSYSTEM:CONSOLE /DLL
102cdf0e10cSrcweirLINKFLAGSSHL_X64=$(LINKFLAGSSHLCUI_X64)
103cdf0e10cSrcweirCDEFSSLO_X64+=$(CDEFSMT_X64) $(CDEFSOBJMT_X64)
104cdf0e10cSrcweirCFLAGSSLO_X64+=-MT
105cdf0e10cSrcweir
106cdf0e10cSrcweirSTDOBJGUI_X64=
107cdf0e10cSrcweirSTDSLOGUI_X64=
108cdf0e10cSrcweirSTDOBJCUI_X64=
109cdf0e10cSrcweirSTDSLOCUI_X64=
110cdf0e10cSrcweir
111cdf0e10cSrcweirIMPLIBFLAGS_X64=-machine:X64
112cdf0e10cSrcweir
113cdf0e10cSrcweirLIBPATH_X64=$(PSDK)/lib/x64
114cdf0e10cSrcweirLIBPATH_VC_X64=$(COMPATH)/lib/amd64
115cdf0e10cSrcweir
116cdf0e10cSrcweirADVAPI32LIB_X64=$(LIBPATH_X64)/advapi32.lib
117cdf0e10cSrcweirSHELL32LIB_X64=$(LIBPATH_X64)/shell32.lib
118cdf0e10cSrcweirGDI32LIB_X64=$(LIBPATH_X64)/gdi32.lib
119cdf0e10cSrcweirOLE32LIB_X64=$(LIBPATH_X64)/ole32.lib
120cdf0e10cSrcweirOLEAUT32LIB_X64=$(LIBPATH_X64)/oleaut32.lib
121cdf0e10cSrcweirUUIDLIB_X64=$(LIBPATH_X64)/uuid.lib
122cdf0e10cSrcweirWINSPOOLLIB_X64=$(LIBPATH_X64)/winspool.lib
123cdf0e10cSrcweirIMM32LIB_X64=$(LIBPATH_X64)/imm32.lib
124cdf0e10cSrcweirVERSIONLIB_X64=$(LIBPATH_X64)/version.lib
125cdf0e10cSrcweirWINMMLIB_X64=$(LIBPATH_X64)/winmm.lib
126cdf0e10cSrcweirWSOCK32LIB_X64=$(LIBPATH_X64)/wsock32.lib
127cdf0e10cSrcweirMPRLIB_X64=$(LIBPATH_X64)/mpr.lib
128cdf0e10cSrcweirWS2_32LIB_X64=$(LIBPATH_X64)/ws2_32.lib
129cdf0e10cSrcweirKERNEL32LIB_X64=$(LIBPATH_X64)/kernel32.lib
130cdf0e10cSrcweirUSER32LIB_X64=$(LIBPATH_X64)/user32.lib
131cdf0e10cSrcweirCOMDLG32LIB_X64=$(LIBPATH_X64)/comdlg32.lib
132cdf0e10cSrcweirCOMCTL32LIB_X64=$(LIBPATH_X64)/comctl32.lib
133cdf0e10cSrcweirCRYPT32LIB_X64=$(LIBPATH_X64)/crypt32.lib
134cdf0e10cSrcweirGDIPLUSLIB_X64=$(LIBPATH_X64)/gdiplus.lib
135cdf0e10cSrcweirDBGHELPLIB_X64=$(LIBPATH_X64)/dbghelp.lib
136cdf0e10cSrcweirPROPSYSLIB_X64=$(LIBPATH_X64)/propsys.lib
137cdf0e10cSrcweirMSILIB_X64=$(LIBPATH_X64)/msi.lib
138cdf0e10cSrcweirDDRAWLIB_X64=$(LIBPATH_X64)/ddraw.lib
139cdf0e10cSrcweirSHLWAPILIB_X64=$(LIBPATH_X64)/shlwapi.lib
140cdf0e10cSrcweirURLMONLIB_X64=$(LIBPATH_X64)/urlmon.lib
141cdf0e10cSrcweirWININETLIB_X64=$(LIBPATH_X64)/wininet.lib
142cdf0e10cSrcweirOLDNAMESLIB_X64=$(LIBPATH_VC_X64)/oldnames.lib
143cdf0e10cSrcweirMSIMG32LIB_X64=$(LIBPATH_X64)/msimg32.lib
144cdf0e10cSrcweirMSVCPRT_X64=$(LIBPATH_VC_X64)/msvcprt.lib
145cdf0e10cSrcweirMSVCRT_X64=$(LIBPATH_VC_X64)/msvcrt.lib
146cdf0e10cSrcweir
147cdf0e10cSrcweirMISC_X64=$(MISC)/x64
148cdf0e10cSrcweirOBJ_X64=$(OBJ)/x64
149cdf0e10cSrcweirSLO_X64=$(SLO)/x64
150cdf0e10cSrcweirLB_X64=$(LB)/x64
151cdf0e10cSrcweirSLB_X64=$(SLB)/x64
152cdf0e10cSrcweirL_X64=$(SOLARLIBDIR_X64)
153cdf0e10cSrcweirVERSIONOBJ_X64=$(SLO_X64)/_version.obj
154cdf0e10cSrcweirBIN_X64=$(BIN)/x64
155cdf0e10cSrcweirRES_X64=$(RES)/x64
156cdf0e10cSrcweirSOLARLIBDIR_X64=$(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)/x64
157cdf0e10cSrcweirLIB_X64:=$(LB_X64);$(SLB_X64);$(ILIB_X64)
158cdf0e10cSrcweir
159cdf0e10cSrcweir.IF "$(LIBTARGET)"==""
160cdf0e10cSrcweir.IF "$(OBJFILES_X64)$(IDLOBJFILES_X64)"!=""
161cdf0e10cSrcweirOBJTARGET_X64=$(LB_X64)/$(TARGET).lib
162cdf0e10cSrcweir.ENDIF # "$(OBJFILES_X64)$(IDLOBJFILES_X64)"!=""
163cdf0e10cSrcweir.IF "$(SLOFILES_X64)$(IDLSLOFILES_x64)"!=""
164cdf0e10cSrcweirSLOTARGET_X64=$(SLB_X64)/$(TARGET).lib
165cdf0e10cSrcweir.ENDIF # "$(SLOFILES_X64)$(IDLSLOFILES_x64)"!=""
166cdf0e10cSrcweir.ENDIF # "$(LIBTARGET)"==""
167cdf0e10cSrcweir
168cdf0e10cSrcweir.IF "$(OBJFILES_X64)"!=""
169cdf0e10cSrcweir.IF "$(LIBTARGET)" != ""
170cdf0e10cSrcweirNOLIBOBJTARGET_X64=$(OBJFILES_X64)
171cdf0e10cSrcweir.ENDIF
172cdf0e10cSrcweir.ENDIF
173cdf0e10cSrcweir
174cdf0e10cSrcweir.IF "$(SLOFILES_X64)"!=""
175cdf0e10cSrcweir.IF "$(LIBTARGET)" != ""
176cdf0e10cSrcweirNOLIBSLOTARGET_X64=$(SLOFILES_X64)
177cdf0e10cSrcweir.ENDIF
178cdf0e10cSrcweir.ENDIF
179cdf0e10cSrcweir
180cdf0e10cSrcweir.IF "$(SHL1TARGET_X64)"!=""
181cdf0e10cSrcweirSHL1TARGETN_X64=$(BIN_X64)/$(DLLPRE)$(SHL1TARGET_X64)$(DLLPOST)
182cdf0e10cSrcweir.ENDIF
183cdf0e10cSrcweir.IF "$(SHL2TARGET_X64)"!=""
184cdf0e10cSrcweirSHL2TARGETN_X64=$(BIN_X64)/$(DLLPRE)$(SHL2TARGET_X64)$(DLLPOST)
185cdf0e10cSrcweir.ENDIF
186cdf0e10cSrcweir.IF "$(LIB1TARGET_X64)" != ""
187cdf0e10cSrcweirLIB1TARGETN_X64=$(LIB1TARGET_X64)
188cdf0e10cSrcweir.ENDIF
189cdf0e10cSrcweir.IF "$(LIB2TARGET_X64)" != ""
190cdf0e10cSrcweirLIB2TARGETN_X64=$(LIB2TARGET_X64)
191cdf0e10cSrcweir.ENDIF
192cdf0e10cSrcweir.IF "$(DEF1NAME_X64)"!=""
193cdf0e10cSrcweirDEF1TARGETN_X64=$(MISC_X64)/$(DEF1NAME_X64).def
194cdf0e10cSrcweir.ENDIF
195cdf0e10cSrcweir.IF "$(DEF2NAME_X64)"!=""
196cdf0e10cSrcweirDEF2TARGETN_X64=$(MISC_X64)/$(DEF2NAME_X64).def
197cdf0e10cSrcweir.ENDIF
198cdf0e10cSrcweir
199cdf0e10cSrcweir$(SLO_X64)/%.obj : $(MISC_X64)/%.c
200cdf0e10cSrcweir    @echo ------------------------------
201cdf0e10cSrcweir    @echo Making: $@
202cdf0e10cSrcweir    -$(MKDIR) $(@:d)
203cdf0e10cSrcweir	@-$(MKDIR) $(MISC_X64)
204cdf0e10cSrcweir    @@-$(RM) $@
205cdf0e10cSrcweir    @$(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 )
206cdf0e10cSrcweir    @$(ECHONL)
207cdf0e10cSrcweir    $(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 )
208cdf0e10cSrcweir
209cdf0e10cSrcweir.ENDIF # "$(BUILD_X64)"!=""
210cdf0e10cSrcweir
211