xref: /aoo42x/main/solenv/inc/wntgcci.mk (revision f3ecff4e)
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# mk file for Window Intel using GCC
25cdf0e10cSrcweir
26cdf0e10cSrcweirSOLAR_JAVA*=TRUE
27cdf0e10cSrcweirFULL_DESK=TRUE
28cdf0e10cSrcweirJAVAFLAGSDEBUG=-g
29cdf0e10cSrcweir
30cdf0e10cSrcweir# SOLAR JAva Unterstuetzung nur fuer wntmsci
31cdf0e10cSrcweir
32cdf0e10cSrcweirASM=ml
33cdf0e10cSrcweirAFLAGS=/c /Cp /coff
34cdf0e10cSrcweir
35cdf0e10cSrcweir# architecture dependent flags for the C and C++ compiler that can be changed by
36cdf0e10cSrcweir# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
37cdf0e10cSrcweirARCH_FLAGS*=-march=pentium
38cdf0e10cSrcweir
39cdf0e10cSrcweirCXX*=gcc
40cdf0e10cSrcweir### Der gcc vertraegt kein Semikolon im Include-Pfad         RT
41cdf0e10cSrcweir# old:
42cdf0e10cSrcweir#CFLAGS=-c -Wall -I$(INCLUDE) $(OLE2DEF)
43cdf0e10cSrcweir# new:
44cdf0e10cSrcweir#CYGINC=$(INCLUDE:s/-I /-I/:+"  ":s/;/ -I/:s/-I  //:s/   / /)
45cdf0e10cSrcweirCFLAGS=-fmessage-length=0 -c -nostdinc $(OLE2DEF)
46cdf0e10cSrcweir###
47cdf0e10cSrcweirCFLAGSCC=-pipe $(ARCH_FLAGS)
48cdf0e10cSrcweirCFLAGSCXX=-pipe $(ARCH_FLAGS)
49cdf0e10cSrcweirCFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
50cdf0e10cSrcweirCFLAGS_NO_EXCEPTIONS=-fno-exceptions
51cdf0e10cSrcweirPICSWITCH:=
52cdf0e10cSrcweir
53cdf0e10cSrcweirCFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS
54cdf0e10cSrcweirCFLAGS_USE_PCH=-I$(SLO)$/pch -DPRECOMPILED_HEADERS -Winvalid-pch
55cdf0e10cSrcweirCFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)$/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch
56cdf0e10cSrcweir
57cdf0e10cSrcweirCFLAGSOBJGUIST=
58cdf0e10cSrcweirCFLAGSOBJCUIST=
59cdf0e10cSrcweirCFLAGSOBJGUIMT=-D_MT
60cdf0e10cSrcweirCFLAGSOBJCUIMT=-D_MT
61cdf0e10cSrcweirCFLAGSSLOGUIMT=-D_MT $(PICSWITCH)
62cdf0e10cSrcweirCFLAGSSLOCUIMT=-D_MT $(PICSWITCH)
63cdf0e10cSrcweirCFLAGSPROF=
64cdf0e10cSrcweirCFLAGSDEBUG=-g
65cdf0e10cSrcweirCFLAGSDBGUTIL=
66cdf0e10cSrcweir.IF "$(PRODUCT)"!=""
67cdf0e10cSrcweirCFLAGSOPT=-O2 -fno-strict-aliasing		# optimizing for products
68cdf0e10cSrcweir.ELSE 	# "$(PRODUCT)"!=""
69cdf0e10cSrcweirCFLAGSOPT=   							# no optimizing for non products
70cdf0e10cSrcweir.ENDIF	# "$(PRODUCT)"!=""
71cdf0e10cSrcweir# Compiler flags for disabling optimizations
72cdf0e10cSrcweirCFLAGSNOOPT=-O0
73cdf0e10cSrcweir# Compiler flags for describing the output path
74cdf0e10cSrcweirCFLAGSOUTOBJ=-o
75cdf0e10cSrcweir#plattform hart setzen
76cdf0e10cSrcweirCDEFS+=-DWIN32 -DWINVER=0x500 -D_WIN32_WINNT=0x500 -D_WIN32_IE=0x500 -D_M_IX86 -DSTLPORT_VERSION=450 -D_NATIVE_WCHAR_T_DEFINED -D_MSC_EXTENSIONS -D_FORCENAMELESSUNION
77cdf0e10cSrcweir.IF  "$(DYNAMIC_CRT)"!=""
78cdf0e10cSrcweirCDEFS+=-D_DLL
79cdf0e10cSrcweir.ENDIF
80cdf0e10cSrcweir
81cdf0e10cSrcweir# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
82cdf0e10cSrcweirCFLAGSWARNCC=-Wall -Wextra -Wendif-labels
83cdf0e10cSrcweirCFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \
84cdf0e10cSrcweir    -Wno-non-virtual-dtor
85cdf0e10cSrcweirCFLAGSWALLCC=$(CFLAGSWARNCC)
86cdf0e10cSrcweirCFLAGSWALLCXX=$(CFLAGSWARNCXX)
87cdf0e10cSrcweirCFLAGSWERRCC=-Werror
88cdf0e10cSrcweirCFLAGSWERRCXX=-Werror
89cdf0e10cSrcweir
90cdf0e10cSrcweirMODULES_WITH_WARNINGS := \
91cdf0e10cSrcweir    b_server \
92cdf0e10cSrcweir    chart2 \
93cdf0e10cSrcweir    devtools \
94cdf0e10cSrcweir    extensions \
95cdf0e10cSrcweir    lingu \
96cdf0e10cSrcweir    r_tools \
97cdf0e10cSrcweir    starmath \
98cdf0e10cSrcweir    sw \
99cdf0e10cSrcweir    xmlsecurity
100cdf0e10cSrcweir
101cdf0e10cSrcweirSTATIC= -static
102cdf0e10cSrcweirDYNAMIC= -dynamic
103cdf0e10cSrcweir
104cdf0e10cSrcweirLINK*=$(CXX)
105cdf0e10cSrcweirLINKC*=$(CC)
106cdf0e10cSrcweir
107cdf0e10cSrcweirCYGLIB=$(LIB:s/;/ -L/)
108cdf0e10cSrcweirLINKFLAGS=-nostdlib -Wl,--enable-stdcall-fixup,--enable-runtime-pseudo-reloc-v2 -L$(CYGLIB)
109cdf0e10cSrcweir.IF "$(USE_MINGW)"=="cygwin"
110cdf0e10cSrcweirMINGWLIBDIR=$(COMPATH)$/lib$/mingw
111cdf0e10cSrcweir.ELSE
112cdf0e10cSrcweirMINGWLIBDIR=$(COMPATH)$/lib
113cdf0e10cSrcweir.ENDIF
114cdf0e10cSrcweirMINGWSSTDOBJ=$(MINGW_CLIB_DIR)$/crtbegin.o
115cdf0e10cSrcweirMINGWSSTDENDOBJ=$(MINGW_CLIB_DIR)$/crtend.o
116cdf0e10cSrcweirLINKFLAGSAPPGUI=-mwindows $(MINGWLIBDIR)$/crt2.o
117cdf0e10cSrcweirLINKFLAGSSHLGUI=--warn-once -mwindows -shared $(MINGWLIBDIR)$/dllcrt2.o
118cdf0e10cSrcweirLINKFLAGSAPPCUI=-mconsole $(MINGWLIBDIR)$/crt2.o
119cdf0e10cSrcweirLINKFLAGSSHLCUI=--warn-once -mconsole -shared $(MINGWLIBDIR)$/dllcrt2.o
120cdf0e10cSrcweirLINKFLAGSTACK=
121cdf0e10cSrcweirLINKFLAGSPROF=
122cdf0e10cSrcweirLINKFLAGSDEBUG=-g
123cdf0e10cSrcweirLINKFLAGSOPT=
124cdf0e10cSrcweir
125cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES" && "$(DYNAMIC_CRT)"!=""
126cdf0e10cSrcweirSTDLIBCPP=$(MINGW_SHARED_LIBSTDCPP)
127cdf0e10cSrcweir.ELSE
128cdf0e10cSrcweirSTDLIBCPP=-lstdc++
129cdf0e10cSrcweir.ENDIF
130cdf0e10cSrcweirUWINAPILIB*=$(DYNAMIC) -luwinapi
131cdf0e10cSrcweir
132cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES" && "$(DYNAMIC_CRT)"!=""
133cdf0e10cSrcweirMINGW_LIBGCC=-lgcc_s -lgcc
134cdf0e10cSrcweirLINKFLAGS+=-shared-libgcc
135cdf0e10cSrcweir.ELSE
136cdf0e10cSrcweir.IF "$(MINGW_GCCLIB_EH)"=="YES"
137cdf0e10cSrcweirMINGW_LIBGCC=-lgcc_eh -lgcc
138cdf0e10cSrcweir.ELSE
139cdf0e10cSrcweirMINGW_LIBGCC=-lgcc
140cdf0e10cSrcweir.ENDIF
141cdf0e10cSrcweir.ENDIF
142cdf0e10cSrcweirSTDOBJVCL=$(L)$/salmain.obj
143cdf0e10cSrcweirSTDOBJGUI=
144cdf0e10cSrcweirSTDSLOGUI=
145cdf0e10cSrcweirSTDOBJCUI=
146cdf0e10cSrcweirSTDSLOCUI=
147cdf0e10cSrcweirSTDLIBGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC)
148cdf0e10cSrcweirSTDLIBCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC)
149cdf0e10cSrcweirSTDSHLGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC)
150cdf0e10cSrcweirSTDSHLCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC)
151cdf0e10cSrcweir.IF  "$(DYNAMIC_CRT)"!=""
152cdf0e10cSrcweirSTDLIBGUIMT+=-lmingwthrd
153cdf0e10cSrcweirSTDLIBCUIMT+=-lmingwthrd
154cdf0e10cSrcweirSTDSHLGUIMT+=-lmingwthrd
155cdf0e10cSrcweirSTDSHLCUIMT+=-lmingwthrd
156cdf0e10cSrcweir.ENDIF
157cdf0e10cSrcweirSTDLIBGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt
158cdf0e10cSrcweirSTDLIBCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt
159cdf0e10cSrcweirSTDSHLGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt
160cdf0e10cSrcweirSTDSHLCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt
161cdf0e10cSrcweir
162cdf0e10cSrcweirLIBSTLPORT=-lstlport_gcc
163cdf0e10cSrcweirLIBSTLPORTST=-lstlport_gcc_static $(STDLIBCPP)
164cdf0e10cSrcweir
165cdf0e10cSrcweirLIBMGR=ar
166cdf0e10cSrcweirLIBFLAGS=-rsu
167cdf0e10cSrcweir
168cdf0e10cSrcweirIMPLIB=ld
169cdf0e10cSrcweirIMPLIBFLAGS=
170cdf0e10cSrcweir
171cdf0e10cSrcweirMAPSYM=tmapsym
172cdf0e10cSrcweirMAPSYMFLAGS=
173cdf0e10cSrcweir
174cdf0e10cSrcweirRC=rc
175cdf0e10cSrcweirRCFLAGS=-D__MINGW32__ -DWIN32 -D_WIN32_IE=0x400 -fo$@ $(RCFILES)
176cdf0e10cSrcweirRCLINK=
177cdf0e10cSrcweirRCLINKFLAGS=
178cdf0e10cSrcweirRCSETVERSION=
179cdf0e10cSrcweir
180cdf0e10cSrcweirDLLPOSTFIX=gi
181cdf0e10cSrcweirPCHPOST=.gch
182cdf0e10cSrcweir
183cdf0e10cSrcweirADVAPI32LIB=-ladvapi32
184cdf0e10cSrcweirSHELL32LIB=-lshell32
185cdf0e10cSrcweirGDI32LIB=-lgdi32
186cdf0e10cSrcweirOLE32LIB=-lole32
187cdf0e10cSrcweirOLEAUT32LIB=-loleaut32
188cdf0e10cSrcweirUUIDLIB=$(PSDK_HOME)$/lib$/uuid.lib
189cdf0e10cSrcweirWINSPOOLLIB=-lwinspool
190cdf0e10cSrcweirIMM32LIB=-limm32
191cdf0e10cSrcweirVERSIONLIB=-lversion
192cdf0e10cSrcweirWINMMLIB=-lwinmm
193cdf0e10cSrcweirWSOCK32LIB=-lwsock32
194cdf0e10cSrcweirMPRLIB=-lmpr
195cdf0e10cSrcweirWS2_32LIB=-lws2_32
196cdf0e10cSrcweirKERNEL32LIB=-lkernel32
197cdf0e10cSrcweirUSER32LIB=-luser32
198cdf0e10cSrcweirLIBCMT=-lmsvcrt
199cdf0e10cSrcweirCOMDLG32LIB=-lcomdlg32
200cdf0e10cSrcweirCOMCTL32LIB=-lcomctl32
201cdf0e10cSrcweirCRYPT32LIB=$(PSDK_HOME)$/lib$/crypt32.lib
202cdf0e10cSrcweirGDIPLUSLIB=$(PSDK_HOME)$/lib$/gdiplus.lib
203cdf0e10cSrcweirDBGHELPLIB=$(PSDK_HOME)$/lib$/dbghelp.lib
204cdf0e10cSrcweirMSILIB=$(PSDK_HOME)$/lib$/msi.lib
205cdf0e10cSrcweirDDRAWLIB=$(DIRECTXSDK_LIB)/ddraw.lib
206cdf0e10cSrcweirSHLWAPILIB=$(PSDK_HOME)$/lib$/shlwapi.lib
207cdf0e10cSrcweirURLMONLIB=$(PSDK_HOME)$/lib$/urlmon.lib
208cdf0e10cSrcweirWININETLIB=-lwininet
209cdf0e10cSrcweirOLDNAMESLIB=-lmoldname
210cdf0e10cSrcweirMSIMG32LIB=$(PSDK_HOME)$/lib$/msimg32.lib
211cdf0e10cSrcweirPROPSYSLIB=-lpropsys
212