diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2011-03-03 14:28:00 +0100 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2011-03-03 14:28:00 +0100 |
commit | 127c6e0da8657f19392081d7c4da2754c2b9bd09 (patch) | |
tree | 9f1c2ac8f13f3a5c038d1af753f2c3440685cd48 | |
parent | 8c38ea8da58e7e9a3f689d73d96760bdfbf9a6c4 (diff) |
jsc340: i114609: no visibility compiler flag for jni lib
3 files changed, 20 insertions, 2 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile index d6778b59..4eb8d30b 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile @@ -60,7 +60,7 @@ include $(SETTINGS)/stdtarget.mk $(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c -$(MKDIR) $(subst /,$(PS),$(@D)) - $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $< + $(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $< $(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile index 71c50df5..7052c2f9 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile @@ -61,7 +61,7 @@ include $(SETTINGS)/stdtarget.mk $(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c -$(MKDIR) $(subst /,$(PS),$(@D)) - $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $< + $(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $< $(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) $(SHL_NAME).def -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk index 08578821..748800b2 100644 --- a/odk/settings/settings.mk +++ b/odk/settings/settings.mk @@ -79,6 +79,7 @@ EMPTYSTRING= PATH_SEPARATOR=; # use this for release version +CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa ifeq "$(CPP_MANIFEST)" "true" #CC_FLAGS+=-EHa -Zc:wchar_t- @@ -88,6 +89,7 @@ else LINK_MANIFEST= endif ifeq "$(DEBUG)" "yes" +CC_FLAGS_JNI+=-Zi CC_FLAGS+=-Zi endif @@ -98,6 +100,7 @@ SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/inclu # define for used compiler necessary for UNO # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x +CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci CC_OUTPUT_SWITCH=-Fo @@ -196,8 +199,10 @@ endif EMPTYSTRING= PATH_SEPARATOR=: +CC_FLAGS_JNI=-c -KPIC CC_FLAGS=-c -KPIC -xldscope=hidden ifeq "$(DEBUG)" "yes" +CC_FLAGS_JNI+=-g CC_FLAGS+=-g endif CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include @@ -207,6 +212,7 @@ SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/inclu # define for used compiler necessary for UNO # -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel +CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5 CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE CC_OUTPUT_SWITCH=-o @@ -335,11 +341,14 @@ endif EMPTYSTRING= PATH_SEPARATOR=: +CC_FLAGS_JNI=-c -fpic CC_FLAGS=-c -fpic -fvisibility=hidden # -O is necessary for inlining (see gcc documentation) ifeq "$(DEBUG)" "yes" +CC_FLAGS_JNI+=-g CC_FLAGS+=-g else +CC_FLAGS_JNI+=-O CC_FLAGS+=-O endif @@ -350,6 +359,7 @@ endif SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux" CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" +CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE # define for used compiler necessary for UNO @@ -466,17 +476,21 @@ INSTALL_NAME_URELIBS_BIN=install_name_tool -change @____________________________ EMPTYSTRING= PATH_SEPARATOR=: +CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden # -O is necessary for inlining (see gcc documentation) ifeq "$(DEBUG)" "yes" +CC_FLAGS_JNI+=-g CC_FLAGS+=-g else +CC_FLAGS_JNI+=-O CC_FLAGS+=-O endif SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" +CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE CC_OUTPUT_SWITCH=-o @@ -589,17 +603,21 @@ endif EMPTYSTRING= PATH_SEPARATOR=: +CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden # -O is necessary for inlining (see gcc documentation) ifeq "$(DEBUG)" "yes" +CC_FLAGS_JNI+=-g CC_FLAGS+=-g else +CC_FLAGS_JNI+=-O CC_FLAGS+=-O endif SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" +CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE CC_OUTPUT_SWITCH=-o |