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