$OpenBSD: patch-odk_settings_settings_mk,v 1.3 2009/05/08 15:43:50 robert Exp $ --- odk/settings/settings.mk.orig.port Wed Aug 27 15:50:24 2008 +++ odk/settings/settings.mk Thu May 7 23:14:17 2009 @@ -578,3 +578,97 @@ URE_MISC=$(OO_SDK_URE_HOME)/share/misc endif endif + +########################################################################### +# +# OpenBSD specific settings +# +########################################################################### +ifneq (,$(findstring openbsd,$(PLATFORM))) +# Settings for OpenBSD using gcc compiler + +PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) + +# Default is openbsd on a intel machine +PLATFORM=openbsd +PACKAGE_LIB_DIR=openbsd_x86.plt +UNOPKG_PLATFORM=OpenBSD_x86 +JAVA_PROC_TYPE=i386 + +OS=OPENBSD +PS=/ +CC=gcc +LINK=g++ +LIB=g++ +ECHO=@echo +MKDIR=mkdir -p +CAT=cat +OBJ_EXT=o +SHAREDLIB_EXT=so +SHAREDLIB_PRE=lib +SHAREDLIB_OUT=$(OUT_LIB) + +GCC_VERSION=$(shell $(CC) -dumpversion) + +ifeq "$(shell echo $(GCC_VERSION) | cut -c 1)" "3" +COMID=gcc3 +CPPU_ENV=gcc3 +else +COMID=GCC +CPPU_ENV=gcc2 +endif + +OSEP=\< +CSEP=\> +QUOTE=$(subst S,\,S) +QM=\" +SQM=' +ECHOLINE=@echo +P2BG=& + +DEL=rm -f +DELRECURSIVE=rm -rf +COPY=cp +URLPREFIX=file:// + +# Include UDK version numbers +include $(PRJ)/include/udkversion.mk + +SALLIB=-luno_sal +CPPULIB=-luno_cppu +CPPUHELPERLIB=-luno_cppuhelper$(COMID) +SALHELPERLIB=-luno_salhelper$(COMID) +REGLIB=-lreg +STORELIB=-lstore +STLPORTLIB=-lstlport_gcc + +EMPTYSTRING= +PATH_SEPARATOR=: + +# -O is necessary for inlining (see gcc documentation) +ifeq "$(DEBUG)" "yes" +CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) +else +CC_FLAGS=-c -O -fPIC -DPIC $(PTHREAD_CFLAGS) +endif + +SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/openbsd" +CC_INCLUDES=-I. -I$(OUT)/inc/examples -I$(PRJ)/include +STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" +CC_DEFINES=-DUNX -DGCC -DOPENBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) + +CC_OUTPUT_SWITCH=-o + +LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' +COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map + +EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined +#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs +LINK_LIBS=-L$(OUT)/lib -L$(PRJ)/$(PLATFORM)/lib -L"$(OFFICE_PROGRAM_PATH)" $(PTHREAD_LIBS) +LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" + +ifneq "$(OO_SDK_URE_HOME)" "" +URE_MISC=$(OO_SDK_URE_HOME)/share/misc +endif + +endif