--- a/jdk/make/common/Defs-macosx.gmk Mon Feb 18 08:57:06 2013 +0000
+++ b/jdk/make/common/Defs-macosx.gmk Mon Feb 18 15:35:57 2013 -0500
@@ -405,3 +405,11 @@
endif
LIB_LOCATION ?= $(LIBDIR)
+
+# Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
+ifeq ($(MACOSX_REQUIRED_VERSION),)
+ MACOSX_REQUIRED_VERSION:=1070
+endif
+MACOSX_OS_VERSION_CFLAGS := -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MACOSX_REQUIRED_VERSION)
+OTHER_CFLAGS += $(MACOSX_OS_VERSION_CFLAGS)
+OTHER_CXXFLAGS += $(MACOSX_OS_VERSION_CFLAGS)
--- a/jdk/makefiles/CompileDemos.gmk Mon Feb 18 08:57:06 2013 +0000
+++ b/jdk/makefiles/CompileDemos.gmk Mon Feb 18 15:35:57 2013 -0500
@@ -421,6 +421,7 @@
CFLAGS:=$(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
-I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
LDFLAGS:=$(LDFLAGS_JDKLIB), \
+ LDFLAGS_SUFFIX_solaris:=-lc,\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jni/Poller,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demoobjs, \
LIBRARY:=Poller))
--- a/jdk/makefiles/CompileNativeLibraries.gmk Mon Feb 18 08:57:06 2013 +0000
+++ b/jdk/makefiles/CompileNativeLibraries.gmk Mon Feb 18 15:35:57 2013 -0500
@@ -2188,6 +2188,7 @@
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjfr/mapfile-vers, \
LDFLAGS:=$(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN),\
+ LDFLAGS_SUFFIX_solaris:=-lc,\
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
RC_FLAGS:=$(RC_FLAGS)\
-D "JDK_FNAME=jfr.dll" \
@@ -2236,6 +2237,7 @@
LDFLAGS:=$(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN),\
LDFLAGS_SUFFIX_linux:=-lc -lpthread,\
+ LDFLAGS_SUFFIX_solaris:=-lc,\
LDFLAGS_SUFFIX_windows:=$(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
LDFLAGS_SUFFIX_posix:=-lm -ljava -ljvm,\
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/share/native/sun/java2d/cmm/kcms/cmm.rc,\
@@ -2939,6 +2941,7 @@
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libj2ucrypto/mapfile-vers, \
LDFLAGS:=$(LDFLAGS_JDKLIB),\
LDFLAGS_SUFFIX:=$(LIBDL),\
+ LDFLAGS_SUFFIX_solaris:=-lc,\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libj2ucrypto))
$(BUILD_LIBJ2UCRYPTO) : $(BUILD_LIBJAVA)
--- a/jdk/makefiles/Import.gmk Mon Feb 18 08:57:06 2013 +0000
+++ b/jdk/makefiles/Import.gmk Mon Feb 18 15:35:57 2013 -0500
@@ -100,33 +100,13 @@
#######
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-define do-install-file
- $(MKDIR) -p '$$(@D)'
- $(RM) '$$@'
- $(CP) -r -P '$$<' '$$(@D)'
-endef
-else ifeq ($(OPENJDK_TARGET_OS),macosx)
-define do-install-file
- $(MKDIR) -p '$$(@D)'
- $(RM) '$$@'
- $(CP) -pRP '$$<' '$$@'
-endef
-else
-define do-install-file
- $(MKDIR) -p '$$(@D)'
- $(RM) '$$@'
- $(CP) -P '$$<' '$$@'
-endef
-endif
-
define CopyDir
$1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \))
$1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
IMPORT_TARGET_FILES += $$($1_DST_FILES)
$3/% : $2/%
$(ECHO) $(LOG_INFO) Copying $$(@F)
- $(do-install-file)
+ $$(install-file)
endef
#######
@@ -222,26 +202,4 @@
#######
-ifeq ($(OPENJDK_TARGET_OS),solaris)
-define install-file
- $(MKDIR) -p '$(@D)'
- $(RM) '$@'
- $(CP) -r -P '$<' '$(@D)'
-endef
-else ifeq ($(OPENJDK_TARGET_OS),macosx)
-define install-file
- $(MKDIR) -p '$(@D)'
- $(RM) '$@'
- $(CP) -pRP '$<' '$@'
-endef
-else
-define install-file
- $(MKDIR) -p '$(@D)'
- $(RM) '$@'
- $(CP) -P '$<' '$@'
-endef
-endif
-
-#######
-
all: $(IMPORT_TARGET_FILES)