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 unxbsds 25cdf0e10cSrcweirASM=gcc 26cdf0e10cSrcweirAFLAGS=-Wa,-Av8plusa,-K,PIC -x assembler-with-cpp -c $(CDEFS) 27cdf0e10cSrcweir 28cdf0e10cSrcweirSOLAR_JAVA=TRUE 29cdf0e10cSrcweirJAVAFLAGSDEBUG=-g 30cdf0e10cSrcweir 31cdf0e10cSrcweir# filter for supressing verbose messages from linker 32cdf0e10cSrcweir#not needed at the moment 33cdf0e10cSrcweir#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" 34cdf0e10cSrcweir 35cdf0e10cSrcweir# _PTHREADS is needed for the stl 36cdf0e10cSrcweirCDEFS+=-D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) -DOSL_USE_SYS_V_SEMAPHORE 37cdf0e10cSrcweir 38cdf0e10cSrcweir# this is a platform with JAVA support 39cdf0e10cSrcweir.IF "$(SOLAR_JAVA)"!="" 40cdf0e10cSrcweirJAVADEF=-DSOLAR_JAVA 41cdf0e10cSrcweir.IF "$(debug)"=="" 42cdf0e10cSrcweirJAVA_RUNTIME=-ljava 43cdf0e10cSrcweir.ELSE 44cdf0e10cSrcweirJAVA_RUNTIME=-ljava_g 45cdf0e10cSrcweir.ENDIF 46cdf0e10cSrcweir.ENDIF 47cdf0e10cSrcweir 48cdf0e10cSrcweir# architecture dependent flags for the C and C++ compiler that can be changed by 49cdf0e10cSrcweir# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 50cdf0e10cSrcweirARCH_FLAGS*= 51cdf0e10cSrcweir 52cdf0e10cSrcweir# name of C++ Compiler 53cdf0e10cSrcweirCXX=g++ 54cdf0e10cSrcweir# name of C Compiler 55cdf0e10cSrcweirCC=gcc 56cdf0e10cSrcweir# flags for C and C++ Compiler 57cdf0e10cSrcweirCFLAGS=-c 58cdf0e10cSrcweir# flags for the C++ Compiler 59cdf0e10cSrcweirCFLAGSCC= -pipe $(ARCH_FLAGS) 60cdf0e10cSrcweir 61cdf0e10cSrcweir# Flags for enabling exception handling 62cdf0e10cSrcweirCFLAGSEXCEPTIONS=-fexceptions 63cdf0e10cSrcweir# Flags for disabling exception handling 64cdf0e10cSrcweirCFLAGS_NO_EXCEPTIONS=-fno-exceptions 65cdf0e10cSrcweir 66cdf0e10cSrcweirCFLAGSCXX= -pipe $(ARCH_FLAGS) 67cdf0e10cSrcweirPICSWITCH:=-fPIC 68cdf0e10cSrcweir 69cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with graphical user interface 70cdf0e10cSrcweirCFLAGSOBJGUIMT=$(PICSWITCH) 71cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with character user interface 72cdf0e10cSrcweirCFLAGSOBJCUIMT=$(PICSWITCH) 73cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with graphical user interface 74cdf0e10cSrcweirCFLAGSSLOGUIMT=$(PICSWITCH) 75cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with character user interface 76cdf0e10cSrcweirCFLAGSSLOCUIMT=$(PICSWITCH) 77cdf0e10cSrcweir# Compiler flags for profiling 78cdf0e10cSrcweirCFLAGSPROF= 79cdf0e10cSrcweir# Compiler flags for debugging 80cdf0e10cSrcweirCFLAGSDEBUG=-g 81cdf0e10cSrcweirCFLAGSDBGUTIL= 82cdf0e10cSrcweir# Compiler flags for enabling optimizations 83cdf0e10cSrcweirCFLAGSOPT=-O2 84cdf0e10cSrcweir# Compiler flags for disabling optimizations 85cdf0e10cSrcweirCFLAGSNOOPT=-O 86cdf0e10cSrcweir# Compiler flags for describing the output path 87cdf0e10cSrcweirCFLAGSOUTOBJ=-o 88cdf0e10cSrcweir 89cdf0e10cSrcweirCFLAGSWARNCC= 90cdf0e10cSrcweirCFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy 91cdf0e10cSrcweir# -Wshadow does not work for C with nested uses of pthread_cleanup_push: 92cdf0e10cSrcweirCFLAGSWALLCC=-Wall -Wextra -Wendif-labels 93cdf0e10cSrcweirCFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy 94cdf0e10cSrcweirCFLAGSWERRCC=-Werror 95cdf0e10cSrcweir 96cdf0e10cSrcweir# switches for dynamic and static linking 97cdf0e10cSrcweirSTATIC = -Wl,-Bstatic 98cdf0e10cSrcweirDYNAMIC = -Wl,-Bdynamic 99cdf0e10cSrcweir 100cdf0e10cSrcweir# name of linker 101cdf0e10cSrcweirLINK=gcc 102cdf0e10cSrcweir# default linker flags 103cdf0e10cSrcweirLINKFLAGS= 104cdf0e10cSrcweir 105cdf0e10cSrcweir# linker flags for linking applications 106cdf0e10cSrcweirLINKFLAGSAPPGUI= -Wl,-export-dynamic 107cdf0e10cSrcweirLINKFLAGSAPPCUI= -Wl,-export-dynamic 108cdf0e10cSrcweir# linker flags for linking shared libraries 109cdf0e10cSrcweirLINKFLAGSSHLGUI= -shared 110cdf0e10cSrcweirLINKFLAGSSHLCUI= -shared 111cdf0e10cSrcweir 112cdf0e10cSrcweirLINKFLAGSTACK= 113cdf0e10cSrcweirLINKFLAGSPROF= 114cdf0e10cSrcweirLINKFLAGSDEBUG=-g 115cdf0e10cSrcweirLINKFLAGSOPT= 116cdf0e10cSrcweir 117cdf0e10cSrcweir.IF "$(NO_BSYMBOLIC)"=="" 118cdf0e10cSrcweir.IF "$(PRJNAME)" != "envtest" 119cdf0e10cSrcweirLINKFLAGSSHLGUI+=-Wl,-Bsymbolic 120cdf0e10cSrcweirLINKFLAGSSHLCUI+=-Wl,-Bsymbolic 121cdf0e10cSrcweir.ENDIF 122cdf0e10cSrcweir.ENDIF # "$(NO_BSYMBOLIC)"=="" 123cdf0e10cSrcweir 124cdf0e10cSrcweirLINKVERSIONMAPFLAG=-Wl,--version-script 125cdf0e10cSrcweir 126cdf0e10cSrcweir# Sequence of libs does matter ! 127cdf0e10cSrcweir 128cdf0e10cSrcweirSTDLIBCPP=-lstdc++ 129cdf0e10cSrcweir 130cdf0e10cSrcweir# default objectfilenames to link 131cdf0e10cSrcweirSTDOBJGUI= 132cdf0e10cSrcweirSTDSLOGUI= 133cdf0e10cSrcweirSTDOBJCUI= 134cdf0e10cSrcweirSTDSLOCUI= 135cdf0e10cSrcweir 136cdf0e10cSrcweir# libraries for linking applications 137cdf0e10cSrcweirSTDLIBGUIMT=-lX11 -lpthread -lm 138cdf0e10cSrcweirSTDLIBCUIMT=-lpthread -lm 139cdf0e10cSrcweir# libraries for linking shared libraries 140cdf0e10cSrcweirSTDSHLGUIMT=-lX11 -lXext -lpthread -lm 141cdf0e10cSrcweirSTDSHLCUIMT=-lpthread -lm 142cdf0e10cSrcweir 143cdf0e10cSrcweir# STLport always needs pthread. This may yield some redundant -lpthread 144cdf0e10cSrcweir# but that doesn't matter. 145cdf0e10cSrcweir.IF "$(STLPORT_VER)" >= "500" 146cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) -lstlport -lpthread 147cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC) -lpthread 148cdf0e10cSrcweir.ELSE 149cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lpthread 150cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC) -lpthread 151cdf0e10cSrcweir.ENDIF 152cdf0e10cSrcweir 153cdf0e10cSrcweir 154cdf0e10cSrcweir# name of library manager 155cdf0e10cSrcweirLIBMGR=ar 156cdf0e10cSrcweirLIBFLAGS=-r 157cdf0e10cSrcweir 158cdf0e10cSrcweir# tool for generating import libraries 159cdf0e10cSrcweirIMPLIB= 160cdf0e10cSrcweirIMPLIBFLAGS= 161cdf0e10cSrcweir 162cdf0e10cSrcweirMAPSYM= 163cdf0e10cSrcweirMAPSYMFLAGS= 164cdf0e10cSrcweir 165cdf0e10cSrcweirRC=irc 166cdf0e10cSrcweirRCFLAGS=-fo$@ $(RCFILES) 167cdf0e10cSrcweirRCLINK= 168cdf0e10cSrcweirRCLINKFLAGS= 169cdf0e10cSrcweirRCSETVERSION= 170cdf0e10cSrcweir 171cdf0e10cSrcweir# platform specific identifier for shared libs 172a4f23604SHerbert DürrDLLPOSTFIX= 173cdf0e10cSrcweirDLLPRE=lib 174cdf0e10cSrcweirDLLPOST=.so 175cdf0e10cSrcweir 176