1cdf0e10cSrcweir#************************************************************************* 2cdf0e10cSrcweir# 3cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4cdf0e10cSrcweir# 5cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6cdf0e10cSrcweir# 7cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8cdf0e10cSrcweir# 9cdf0e10cSrcweir# This file is part of OpenOffice.org. 10cdf0e10cSrcweir# 11cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14cdf0e10cSrcweir# 15cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20cdf0e10cSrcweir# 21cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25cdf0e10cSrcweir# 26cdf0e10cSrcweir#************************************************************************* 27cdf0e10cSrcweir 28cdf0e10cSrcweir# mk file for unxbsdi2 29cdf0e10cSrcweirASM= 30cdf0e10cSrcweirAFLAGS= 31cdf0e10cSrcweir 32cdf0e10cSrcweirSOLAR_JAVA=TRUE 33cdf0e10cSrcweirJAVAFLAGSDEBUG=-g 34cdf0e10cSrcweir 35cdf0e10cSrcweir# filter for supressing verbose messages from linker 36cdf0e10cSrcweir#not needed at the moment 37cdf0e10cSrcweir#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" 38cdf0e10cSrcweir 39cdf0e10cSrcweir# _PTHREADS is needed for the stl 40cdf0e10cSrcweirCDEFS+= -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) 41cdf0e10cSrcweir 42cdf0e10cSrcweir# this is a platform with JAVA support 43cdf0e10cSrcweir.IF "$(SOLAR_JAVA)"!="" 44cdf0e10cSrcweirJAVADEF=-DSOLAR_JAVA 45cdf0e10cSrcweir.IF "$(debug)"=="" 46cdf0e10cSrcweirJAVA_RUNTIME=-ljava 47cdf0e10cSrcweir.ELSE 48cdf0e10cSrcweirJAVA_RUNTIME=-ljava_g 49cdf0e10cSrcweir.ENDIF 50cdf0e10cSrcweir.ENDIF 51cdf0e10cSrcweir 52cdf0e10cSrcweir# architecture dependent flags for the C and C++ compiler that can be changed by 53cdf0e10cSrcweir# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 54cdf0e10cSrcweirARCH_FLAGS*= 55cdf0e10cSrcweir 56cdf0e10cSrcweir# name of C++ Compiler 57cdf0e10cSrcweirCXX*=g++ 58cdf0e10cSrcweir# name of C Compiler 59cdf0e10cSrcweirCC*=gcc 60cdf0e10cSrcweir# flags for C and C++ Compiler 61cdf0e10cSrcweirCFLAGS+=-fmessage-length=0 -c 62cdf0e10cSrcweir 63cdf0e10cSrcweir# flags to enable build with symbols; required for crashdump feature 64cdf0e10cSrcweir.IF "$(ENABLE_SYMBOLS)"=="SMALL" 65cdf0e10cSrcweirCFLAGSENABLESYMBOLS=-g1 66cdf0e10cSrcweir.ELSE 67cdf0e10cSrcweirCFLAGSENABLESYMBOLS=-g 68cdf0e10cSrcweir.ENDIF 69cdf0e10cSrcweir 70cdf0e10cSrcweir# flags for the C++ Compiler 71cdf0e10cSrcweirCFLAGSCC= -pipe $(ARCH_FLAGS) 72cdf0e10cSrcweir# Flags for enabling exception handling 73cdf0e10cSrcweirCFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs 74cdf0e10cSrcweir# Flags for disabling exception handling 75cdf0e10cSrcweirCFLAGS_NO_EXCEPTIONS=-fno-exceptions 76cdf0e10cSrcweir 77cdf0e10cSrcweirCFLAGSCXX= -pipe -frtti $(ARCH_FLAGS) 78cdf0e10cSrcweirPICSWITCH:=-fpic 79cdf0e10cSrcweir 80cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with graphical user interface 81cdf0e10cSrcweirCFLAGSOBJGUIMT= 82cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with character user interface 83cdf0e10cSrcweirCFLAGSOBJCUIMT= 84cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with graphical user interface 85cdf0e10cSrcweirCFLAGSSLOGUIMT=$(PICSWITCH) 86cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with character user interface 87cdf0e10cSrcweirCFLAGSSLOCUIMT=$(PICSWITCH) 88cdf0e10cSrcweir# Compiler flags for profiling 89cdf0e10cSrcweirCFLAGSPROF= 90cdf0e10cSrcweir# Compiler flags for debugging 91cdf0e10cSrcweirCFLAGSDEBUG=-g 92cdf0e10cSrcweirCFLAGSDBGUTIL= 93cdf0e10cSrcweir# Compiler flags for enabling optimizations 94cdf0e10cSrcweir# CFLAGSOPT=-O2 95cdf0e10cSrcweir# reduce to -O1 to avoid optimization problems 96cdf0e10cSrcweirCFLAGSOPT=-O1 97cdf0e10cSrcweir# Compiler flags for disabling optimizations 98cdf0e10cSrcweirCFLAGSNOOPT=-O 99cdf0e10cSrcweir# Compiler flags for describing the output path 100cdf0e10cSrcweirCFLAGSOUTOBJ=-o 101cdf0e10cSrcweir 102cdf0e10cSrcweirCFLAGSWARNCC= 103cdf0e10cSrcweirCFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy 104cdf0e10cSrcweir# -Wshadow does not work for C with nested uses of pthread_cleanup_push: 105cdf0e10cSrcweirCFLAGSWALLCC=-Wall -Wextra -Wendif-labels 106cdf0e10cSrcweirCFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy 107cdf0e10cSrcweirCFLAGSWERRCC=-Werror 108cdf0e10cSrcweir 109cdf0e10cSrcweir# switches for dynamic and static linking 110cdf0e10cSrcweirSTATIC = -Wl,-Bstatic 111cdf0e10cSrcweirDYNAMIC = -Wl,-Bdynamic 112cdf0e10cSrcweir 113cdf0e10cSrcweir# name of linker 114cdf0e10cSrcweirLINK*=$(CC) 115cdf0e10cSrcweir 116cdf0e10cSrcweir# default linker flags 117cdf0e10cSrcweirLINKFLAGSDEFS*=-z defs 118cdf0e10cSrcweirLINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\' 119cdf0e10cSrcweirLINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\' 120cdf0e10cSrcweir #TODO: drop $ORIGIN once no URE executable is also shipped in OOo 121cdf0e10cSrcweirLINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' 122cdf0e10cSrcweirLINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\' 123cdf0e10cSrcweirLINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' 124cdf0e10cSrcweirLINKFLAGSRUNPATH_OXT= 125cdf0e10cSrcweirLINKFLAGSRUNPATH_NONE= 126cdf0e10cSrcweirLINKFLAGS=-z combreloc $(LINKFLAGSDEFS) 127cdf0e10cSrcweir 128cdf0e10cSrcweir# linker flags for linking applications 129cdf0e10cSrcweirLINKFLAGSAPPGUI= -Wl,-export-dynamic 130cdf0e10cSrcweirLINKFLAGSAPPCUI= -Wl,-export-dynamic 131cdf0e10cSrcweir 132cdf0e10cSrcweir# linker flags for linking shared libraries 133cdf0e10cSrcweirLINKFLAGSSHLGUI= -shared 134cdf0e10cSrcweirLINKFLAGSSHLCUI= -shared 135cdf0e10cSrcweir 136cdf0e10cSrcweirLINKFLAGSTACK= 137cdf0e10cSrcweirLINKFLAGSPROF= 138cdf0e10cSrcweirLINKFLAGSDEBUG=-g 139cdf0e10cSrcweirLINKFLAGSOPT= 140cdf0e10cSrcweir 141cdf0e10cSrcweir# linker flags for optimization (symbol hashtable) 142cdf0e10cSrcweir# for now, applied to symbol scoped libraries, only 143cdf0e10cSrcweirLINKFLAGSOPTIMIZE*=-Wl,-O1 144cdf0e10cSrcweirLINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script 145cdf0e10cSrcweir 146cdf0e10cSrcweirSONAME_SWITCH=-Wl,-h 147cdf0e10cSrcweir 148cdf0e10cSrcweir# Sequence of libs does matter ! 149cdf0e10cSrcweir 150cdf0e10cSrcweirSTDLIBCPP=-lstdc++ 151cdf0e10cSrcweir 152cdf0e10cSrcweir# default objectfilenames to link 153cdf0e10cSrcweirSTDOBJGUI= 154cdf0e10cSrcweirSTDSLOGUI= 155cdf0e10cSrcweirSTDOBJCUI= 156cdf0e10cSrcweirSTDSLOCUI= 157cdf0e10cSrcweir 158cdf0e10cSrcweir# libraries for linking applications 159cdf0e10cSrcweirSTDLIBGUIMT=-lX11 -lpthread -lm 160cdf0e10cSrcweirSTDLIBCUIMT=-lpthread -lm 161cdf0e10cSrcweir# libraries for linking shared libraries 162cdf0e10cSrcweirSTDSHLGUIMT=-lX11 -lXext -lpthread -lm 163cdf0e10cSrcweirSTDSHLCUIMT=-lpthread -lm 164cdf0e10cSrcweir 165cdf0e10cSrcweirLIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive 166cdf0e10cSrcweir 167cdf0e10cSrcweir.IF "$(STLPORT_VER)" >= "500" 168cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++ 169cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) 170cdf0e10cSrcweir.ELSE 171cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++ 172cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) 173cdf0e10cSrcweir.ENDIF 174cdf0e10cSrcweir 175cdf0e10cSrcweir#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC) 176cdf0e10cSrcweir 177cdf0e10cSrcweir# name of library manager 178cdf0e10cSrcweirLIBMGR=ar 179cdf0e10cSrcweirLIBFLAGS=-r 180cdf0e10cSrcweir 181cdf0e10cSrcweir# tool for generating import libraries 182cdf0e10cSrcweirIMPLIB= 183cdf0e10cSrcweirIMPLIBFLAGS= 184cdf0e10cSrcweir 185cdf0e10cSrcweirMAPSYM= 186cdf0e10cSrcweirMAPSYMFLAGS= 187cdf0e10cSrcweir 188cdf0e10cSrcweirRC=irc 189cdf0e10cSrcweirRCFLAGS=-fo$@ $(RCFILES) 190cdf0e10cSrcweirRCLINK= 191cdf0e10cSrcweirRCLINKFLAGS= 192cdf0e10cSrcweirRCSETVERSION= 193cdf0e10cSrcweir 194cdf0e10cSrcweir# platform specific identifier for shared libs 195*a4f23604SHerbert DürrDLLPOSTFIX= 196cdf0e10cSrcweirDLLPRE=lib 197cdf0e10cSrcweirDLLPOST=.so 198cdf0e10cSrcweir 199