--- a/jdk/make/javax/sound/Makefile Tue Mar 06 10:25:45 2012 +0800
+++ b/jdk/make/javax/sound/Makefile Tue Mar 06 20:34:38 2012 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,11 @@
PACKAGE = javax.sound
LIBRARY = jsound
PRODUCT = sun
+
+ifeq ($(PLATFORM),macosx)
+CPLUSPLUSLIBRARY = true
+endif
+
include $(BUILDDIR)/common/Defs.gmk
# include defines for sound
@@ -77,6 +82,7 @@
$(FILES_mkdirs)
FILES_c += $(FILES_$(PLATFORM))
+FILES_cpp += $(FILES_cpp_$(PLATFORM))
#
@@ -105,6 +111,22 @@
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/
endif # PLATFORM linux
+ifeq ($(PLATFORM), macosx)
+ CPPFLAGS += -DUSE_PORTS=TRUE \
+ -DUSE_DAUDIO=TRUE \
+ -DUSE_PLATFORM_MIDI_OUT=TRUE \
+ -DUSE_PLATFORM_MIDI_IN=TRUE
+
+ INCLUDE_PORTS = TRUE
+ INCLUDE_DAUDIO = TRUE
+ INCLUDE_MIDI = TRUE
+
+ LDFLAGS += -framework CoreAudio -framework CoreFoundation \
+ -framework CoreServices -framework AudioUnit -lstdc++ \
+ -framework CoreMIDI -framework AudioToolbox
+ CXXFLAGS += -I`xcode-select -print-path`/Extras/CoreAudio/PublicUtility
+endif
+
ifeq ($(PLATFORM), solaris)
# build with ports and direct audio
CPPFLAGS += -DUSE_PORTS=TRUE \
@@ -144,6 +166,11 @@
CPPFLAGS += \
-I$(SHARE_SRC)/native/com/sun/media/sound
+ifeq ($(PLATFORM), macosx)
+vpath %.c $(call NativeSrcDirList,,native/com/sun/media/sound)
+vpath %.cpp $(call NativeSrcDirList,,native/com/sun/media/sound)
+
+else
#
# Add to the ambient VPATH.
#
@@ -151,6 +178,7 @@
vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound
vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound
+endif
#
# Include rules