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 starmath \ 98 sw \ 99 xmlsecurity 100 101STATIC= -static 102DYNAMIC= -dynamic 103 104LINK*=$(CXX) 105LINKC*=$(CC) 106 107CYGLIB=$(LIB:s/;/ -L/) 108LINKFLAGS=-nostdlib -Wl,--enable-stdcall-fixup,--enable-runtime-pseudo-reloc-v2 -L$(CYGLIB) 109.IF "$(USE_MINGW)"=="cygwin" 110MINGWLIBDIR=$(COMPATH)$/lib$/mingw 111.ELSE 112MINGWLIBDIR=$(COMPATH)$/lib 113.ENDIF 114MINGWSSTDOBJ=$(MINGW_CLIB_DIR)$/crtbegin.o 115MINGWSSTDENDOBJ=$(MINGW_CLIB_DIR)$/crtend.o 116LINKFLAGSAPPGUI=-mwindows $(MINGWLIBDIR)$/crt2.o 117LINKFLAGSSHLGUI=--warn-once -mwindows -shared $(MINGWLIBDIR)$/dllcrt2.o 118LINKFLAGSAPPCUI=-mconsole $(MINGWLIBDIR)$/crt2.o 119LINKFLAGSSHLCUI=--warn-once -mconsole -shared $(MINGWLIBDIR)$/dllcrt2.o 120LINKFLAGSTACK= 121LINKFLAGSPROF= 122LINKFLAGSDEBUG=-g 123LINKFLAGSOPT= 124 125.IF "$(MINGW_SHARED_GXXLIB)"=="YES" && "$(DYNAMIC_CRT)"!="" 126STDLIBCPP=$(MINGW_SHARED_LIBSTDCPP) 127.ELSE 128STDLIBCPP=-lstdc++ 129.ENDIF 130UWINAPILIB*=$(DYNAMIC) -luwinapi 131 132.IF "$(MINGW_SHARED_GCCLIB)"=="YES" && "$(DYNAMIC_CRT)"!="" 133MINGW_LIBGCC=-lgcc_s -lgcc 134LINKFLAGS+=-shared-libgcc 135.ELSE 136.IF "$(MINGW_GCCLIB_EH)"=="YES" 137MINGW_LIBGCC=-lgcc_eh -lgcc 138.ELSE 139MINGW_LIBGCC=-lgcc 140.ENDIF 141.ENDIF 142STDOBJVCL=$(L)$/salmain.obj 143STDOBJGUI= 144STDSLOGUI= 145STDOBJCUI= 146STDSLOCUI= 147STDLIBGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 148STDLIBCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 149STDSHLGUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 150STDSHLCUIMT=-Wl,--start-group CPPRUNTIME $(MINGW_LIBGCC) 151.IF "$(DYNAMIC_CRT)"!="" 152STDLIBGUIMT+=-lmingwthrd 153STDLIBCUIMT+=-lmingwthrd 154STDSHLGUIMT+=-lmingwthrd 155STDSHLCUIMT+=-lmingwthrd 156.ENDIF 157STDLIBGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 158STDLIBCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 159STDSHLGUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 160STDSHLCUIMT+=-lmingw32 -lmoldname -lmingwex -Wl,--end-group $(UWINAPILIB) -lm -lkernel32 -luser32 -lmsvcrt 161 162LIBSTLPORT=-lstlport_gcc 163LIBSTLPORTST=-lstlport_gcc_static $(STDLIBCPP) 164 165LIBMGR=ar 166LIBFLAGS=-rsu 167 168IMPLIB=ld 169IMPLIBFLAGS= 170 171MAPSYM=tmapsym 172MAPSYMFLAGS= 173 174RC=rc 175RCFLAGS=-D__MINGW32__ -DWIN32 -D_WIN32_IE=0x400 -fo$@ $(RCFILES) 176RCLINK= 177RCLINKFLAGS= 178RCSETVERSION= 179 180DLLPOSTFIX=gi 181PCHPOST=.gch 182 183ADVAPI32LIB=-ladvapi32 184SHELL32LIB=-lshell32 185GDI32LIB=-lgdi32 186OLE32LIB=-lole32 187OLEAUT32LIB=-loleaut32 188UUIDLIB=$(PSDK_HOME)$/lib$/uuid.lib 189WINSPOOLLIB=-lwinspool 190IMM32LIB=-limm32 191VERSIONLIB=-lversion 192WINMMLIB=-lwinmm 193WSOCK32LIB=-lwsock32 194MPRLIB=-lmpr 195WS2_32LIB=-lws2_32 196KERNEL32LIB=-lkernel32 197USER32LIB=-luser32 198LIBCMT=-lmsvcrt 199COMDLG32LIB=-lcomdlg32 200COMCTL32LIB=-lcomctl32 201CRYPT32LIB=$(PSDK_HOME)$/lib$/crypt32.lib 202GDIPLUSLIB=$(PSDK_HOME)$/lib$/gdiplus.lib 203DBGHELPLIB=$(PSDK_HOME)$/lib$/dbghelp.lib 204MSILIB=$(PSDK_HOME)$/lib$/msi.lib 205DDRAWLIB=$(DIRECTXSDK_LIB)/ddraw.lib 206SHLWAPILIB=$(PSDK_HOME)$/lib$/shlwapi.lib 207URLMONLIB=$(PSDK_HOME)$/lib$/urlmon.lib 208WININETLIB=-lwininet 209OLDNAMESLIB=-lmoldname 210MSIMG32LIB=$(PSDK_HOME)$/lib$/msimg32.lib 211PROPSYSLIB=-lpropsys 212