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# mk file for Window Intel using GCC 25 26SOLAR_JAVA*=TRUE 27FULL_DESK=TRUE 28JAVAFLAGSDEBUG=-g 29 30# SOLAR JAva Unterstuetzung nur fuer wntmsci 31 32ASM=ml 33AFLAGS=/c /Cp /coff 34 35# architecture dependent flags for the C and C++ compiler that can be changed by 36# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 37ARCH_FLAGS*=-march=pentium 38 39CXX*=gcc 40### Der gcc vertraegt kein Semikolon im Include-Pfad RT 41# old: 42#CFLAGS=-c -Wall -I$(INCLUDE) $(OLE2DEF) 43# new: 44#CYGINC=$(INCLUDE:s/-I /-I/:+" ":s/;/ -I/:s/-I //:s/ / /) 45CFLAGS=-fmessage-length=0 -c -nostdinc $(OLE2DEF) 46### 47CFLAGSCC=-pipe $(ARCH_FLAGS) 48CFLAGSCXX=-pipe $(ARCH_FLAGS) 49CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs 50CFLAGS_NO_EXCEPTIONS=-fno-exceptions 51PICSWITCH:= 52 53CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS 54CFLAGS_USE_PCH=-I$(SLO)$/pch -DPRECOMPILED_HEADERS -Winvalid-pch 55CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)$/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch 56 57CFLAGSOBJGUIST= 58CFLAGSOBJCUIST= 59CFLAGSOBJGUIMT=-D_MT 60CFLAGSOBJCUIMT=-D_MT 61CFLAGSSLOGUIMT=-D_MT $(PICSWITCH) 62CFLAGSSLOCUIMT=-D_MT $(PICSWITCH) 63CFLAGSPROF= 64CFLAGSDEBUG=-g 65CFLAGSDBGUTIL= 66.IF "$(PRODUCT)"!="" 67CFLAGSOPT=-O2 -fno-strict-aliasing # optimizing for products 68.ELSE # "$(PRODUCT)"!="" 69CFLAGSOPT= # no optimizing for non products 70.ENDIF # "$(PRODUCT)"!="" 71# Compiler flags for disabling optimizations 72CFLAGSNOOPT=-O0 73# Compiler flags for describing the output path 74CFLAGSOUTOBJ=-o 75#plattform hart setzen 76CDEFS+=-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 77.IF "$(DYNAMIC_CRT)"!="" 78CDEFS+=-D_DLL 79.ENDIF 80 81# -Wshadow does not work for C with nested uses of pthread_cleanup_push: 82CFLAGSWARNCC=-Wall -Wextra -Wendif-labels 83CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \ 84 -Wno-non-virtual-dtor 85CFLAGSWALLCC=$(CFLAGSWARNCC) 86CFLAGSWALLCXX=$(CFLAGSWARNCXX) 87CFLAGSWERRCC=-Werror 88CFLAGSWERRCXX=-Werror 89 90MODULES_WITH_WARNINGS := \ 91 b_server \ 92 chart2 \ 93 devtools \ 94 extensions \ 95 lingu \ 96 r_tools \ 97 soldep \ 98 starmath \ 99 sw \ 100 xmlsecurity 101 102STATIC= -static 103DYNAMIC= -dynamic 104 105LINK*=$(CXX) 106LINKC*=$(CC) 107 108CYGLIB=$(LIB:s/;/ -L/) 109LINKFLAGS=-nostdlib -Wl,--enable-stdcall-fixup,--enable-runtime-pseudo-reloc-v2 -L$(CYGLIB) 110.IF "$(USE_MINGW)"=="cygwin" 111MINGWLIBDIR=$(COMPATH)$/lib$/mingw 112.ELSE 113MINGWLIBDIR=$(COMPATH)$/lib 114.ENDIF 115MINGWSSTDOBJ=$(MINGW_CLIB_DIR)$/crtbegin.o 116MINGWSSTDENDOBJ=$(MINGW_CLIB_DIR)$/crtend.o 117LINKFLAGSAPPGUI=-mwindows $(MINGWLIBDIR)$/crt2.o 118LINKFLAGSSHLGUI=--warn-once -mwindows -shared $(MINGWLIBDIR)$/dllcrt2.o 119LINKFLAGSAPPCUI=-mconsole $(MINGWLIBDIR)$/crt2.o 120LINKFLAGSSHLCUI=--warn-once -mconsole -shared $(MINGWLIBDIR)$/dllcrt2.o 121LINKFLAGSTACK= 122LINKFLAGSPROF= 123LINKFLAGSDEBUG=-g 124LINKFLAGSOPT= 125 126.IF "$(MINGW_SHARED_GXXLIB)"=="YES" && "$(DYNAMIC_CRT)"!="" 127STDLIBCPP=$(MINGW_SHARED_LIBSTDCPP) 128.ELSE 129STDLIBCPP=-lstdc++ 130.ENDIF 131UWINAPILIB*=$(DYNAMIC) -luwinapi 132 133.IF "$(MINGW_SHARED_GCCLIB)"=="YES" && "$(DYNAMIC_CRT)"!="" 134MINGW_LIBGCC=-lgcc_s -lgcc 135LINKFLAGS+=-shared-libgcc 136.ELSE 137.IF "$(MINGW_GCCLIB_EH)"=="YES" 138MINGW_LIBGCC=-lgcc_eh -lgcc 139.ELSE 140MINGW_LIBGCC=-lgcc 141.ENDIF 142.ENDIF 143STDOBJVCL=$(L)$/salmain.obj 144STDOBJGUI= 145STDSLOGUI= 146STDOBJCUI= 147STDSLOCUI= 148STDLIBGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 149STDLIBCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 150STDSHLGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 151STDSHLCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 152.IF "$(DYNAMIC_CRT)"!="" 153STDLIBGUIMT+=-lmingwthrd 154STDLIBCUIMT+=-lmingwthrd 155STDSHLGUIMT+=-lmingwthrd 156STDSHLCUIMT+=-lmingwthrd 157.ENDIF 158STDLIBGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 159STDLIBCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 160STDSHLGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 161STDSHLCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 162 163LIBSTLPORT=-lstlport_gcc 164LIBSTLPORTST=-lstlport_gcc_static $(STDLIBCPP) 165 166LIBMGR=ar 167LIBFLAGS=-rsu 168 169IMPLIB=ld 170IMPLIBFLAGS= 171 172MAPSYM=tmapsym 173MAPSYMFLAGS= 174 175RC=rc 176RCFLAGS=-D__MINGW32__ -DWIN32 -D_WIN32_IE=0x400 -fo$@ $(RCFILES) 177RCLINK= 178RCLINKFLAGS= 179RCSETVERSION= 180 181DLLPOSTFIX=gi 182PCHPOST=.gch 183 184ADVAPI32LIB=-ladvapi32 185SHELL32LIB=-lshell32 186GDI32LIB=-lgdi32 187OLE32LIB=-lole32 188OLEAUT32LIB=-loleaut32 189UUIDLIB=$(PSDK_HOME)$/lib$/uuid.lib 190WINSPOOLLIB=-lwinspool 191IMM32LIB=-limm32 192VERSIONLIB=-lversion 193WINMMLIB=-lwinmm 194WSOCK32LIB=-lwsock32 195MPRLIB=-lmpr 196WS2_32LIB=-lws2_32 197KERNEL32LIB=-lkernel32 198USER32LIB=-luser32 199LIBCMT=-lmsvcrt 200COMDLG32LIB=-lcomdlg32 201COMCTL32LIB=-lcomctl32 202CRYPT32LIB=$(PSDK_HOME)$/lib$/crypt32.lib 203GDIPLUSLIB=$(PSDK_HOME)$/lib$/gdiplus.lib 204DBGHELPLIB=$(PSDK_HOME)$/lib$/dbghelp.lib 205MSILIB=$(PSDK_HOME)$/lib$/msi.lib 206DDRAWLIB=$(DIRECTXSDK_LIB)/ddraw.lib 207SHLWAPILIB=$(PSDK_HOME)$/lib$/shlwapi.lib 208URLMONLIB=$(PSDK_HOME)$/lib$/urlmon.lib 209WININETLIB=-lwininet 210OLDNAMESLIB=-lmoldname 211MSIMG32LIB=$(PSDK_HOME)$/lib$/msimg32.lib 212PROPSYSLIB=-lpropsys 213