jdk/make/lib/SoundLibraries.gmk
author lana
Thu, 06 Jul 2017 22:34:27 +0000
changeset 45851 94fe21707a04
parent 35276 50b3cdcef339
child 47191 8c95ea7056b7
permissions -rw-r--r--
Added tag jdk-10+14 for changeset 9f2e7fa2d999
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
29261
ea6e20f98dfa 8072665: SoundLibraries.gmk and SoundDefs.h: remove isSigned8() dead code
serb
parents: 27799
diff changeset
     2
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    26
LIBJSOUND_SRC_DIRS := \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    27
    $(JDK_TOPDIR)/src/java.desktop/share/native/libjsound \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 25859
diff changeset
    28
    $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjsound \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    29
    #
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    30
LIBJSOUND_CFLAGS := \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    31
    -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    32
    $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    33
    $(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    34
    #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    35
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    36
LIBJSOUND_SRC_FILES := Utilities.c Platform.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    37
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    38
EXTRA_SOUND_JNI_LIBS :=
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    39
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    40
LIBJSOUND_MIDIFILES := \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    41
    MidiInDevice.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    42
    MidiInDeviceProvider.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    43
    MidiOutDevice.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    44
    MidiOutDeviceProvider.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    45
    PlatformMidi.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    46
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    47
# files needed for ports
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    48
LIBJSOUND_PORTFILES := \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    49
    PortMixerProvider.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    50
    PortMixer.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    51
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    52
# files needed for direct audio
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    53
LIBJSOUND_DAUDIOFILES := \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    54
    DirectAudioDeviceProvider.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    55
    DirectAudioDevice.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    56
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    57
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    58
  EXTRA_SOUND_JNI_LIBS += jsoundds
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    59
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    60
      -DUSE_PLATFORM_MIDI_OUT=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    61
      -DUSE_PLATFORM_MIDI_IN=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    62
      -DUSE_PORTS=TRUE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    63
  LIBJSOUND_SRC_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    64
      PLATFORM_API_WinOS_MidiIn.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
      PLATFORM_API_WinOS_MidiOut.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    66
      PLATFORM_API_WinOS_Util.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
      PLATFORM_API_WinOS_Ports.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    68
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    69
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    70
endif # OPENJDK_TARGET_OS windows
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    71
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    72
ifeq ($(OPENJDK_TARGET_OS), linux)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    73
  EXTRA_SOUND_JNI_LIBS += jsoundalsa
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    74
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    75
endif # OPENJDK_TARGET_OS linux
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    76
22593
938340719ac2 8024900: PPC64: Enable new build on AIX (jdk part)
simonis
parents: 22592
diff changeset
    77
ifeq ($(OPENJDK_TARGET_OS), aix)
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    78
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    79
endif # OPENJDK_TARGET_OS aix
22593
938340719ac2 8024900: PPC64: Enable new build on AIX (jdk part)
simonis
parents: 22592
diff changeset
    80
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    81
ifeq ($(OPENJDK_TARGET_OS), macosx)
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29374
diff changeset
    82
  LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    83
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    84
      -DUSE_PORTS=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    85
      -DUSE_DAUDIO=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    86
      -DUSE_PLATFORM_MIDI_OUT=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    87
      -DUSE_PLATFORM_MIDI_IN=TRUE
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
    88
  LIBJSOUND_SRC_DIRS += $(JDK_TOPDIR)/src/java.desktop/macosx/native/libjsound
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    89
  LIBJSOUND_SRC_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    90
      PLATFORM_API_MacOSX_Utils.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    91
      PLATFORM_API_MacOSX_PCM.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    92
      PLATFORM_API_MacOSX_Ports.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    93
      PLATFORM_API_MacOSX_MidiIn.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    94
      PLATFORM_API_MacOSX_MidiOut.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    95
      PLATFORM_API_MacOSX_MidiUtils.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    96
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    97
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    98
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    99
endif # OPENJDK_TARGET_OS macosx
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   100
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   101
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   102
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   103
      -DUSE_PORTS=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   104
      -DUSE_DAUDIO=TRUE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   105
  LIBJSOUND_SRC_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   106
      PLATFORM_API_SolarisOS_Utils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   107
      PLATFORM_API_SolarisOS_Ports.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   108
      PLATFORM_API_SolarisOS_PCM.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   109
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   110
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   111
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   112
endif # OPENJDK_TARGET_OS solaris
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   113
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   114
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   115
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   116
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   117
    LIBRARY := jsound, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   118
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   119
    SRC := $(LIBJSOUND_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   120
    INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29374
diff changeset
   121
    TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   122
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   123
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   124
        $(LIBJSOUND_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   125
    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 20896
diff changeset
   126
    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   127
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   128
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   129
    LIBS_unix := -ljava -ljvm, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   130
    LIBS_solaris := -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   131
    LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   132
        -framework CoreServices -framework AudioUnit $(LIBCXX) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   133
        -framework CoreMIDI -framework AudioToolbox, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   134
    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
   135
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   136
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   137
        -D "JDK_FNAME=jsound.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   138
        -D "JDK_INTERNAL_NAME=jsound" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   139
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   140
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
   141
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   142
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   143
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   144
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   145
TARGETS += $(BUILD_LIBJSOUND)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   146
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   147
##########################################################################################
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   148
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   149
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   150
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   151
  $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   152
      LIBRARY := jsoundalsa, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   153
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   154
      SRC := $(LIBJSOUND_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   155
      INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   156
          $(LIBJSOUND_DAUDIOFILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   157
          PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   158
          PLATFORM_API_LinuxOS_ALSA_PCM.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   159
          PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   160
          PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   161
          PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   162
          PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   163
          PLATFORM_API_LinuxOS_ALSA_Ports.c, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   164
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   165
      CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   166
          $(LIBJSOUND_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   167
          -DUSE_DAUDIO=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   168
          -DUSE_PORTS=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   169
          -DUSE_PLATFORM_MIDI_OUT=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   170
          -DUSE_PLATFORM_MIDI_IN=TRUE, \
21805
c7d7946239de 8027566: Remove the old build system
ihse
parents: 20896
diff changeset
   171
      MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsoundalsa/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   172
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   173
          $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   174
      LIBS := $(ALSA_LIBS) -ljava -ljvm, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   175
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
   176
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   177
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   178
  $(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   179
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   180
  TARGETS += $(BUILD_LIBJSOUNDALSA)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   181
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   182
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   183
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   184
##########################################################################################
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   185
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   186
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   187
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   188
  $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   189
      LIBRARY := jsoundds, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   190
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   191
      SRC := $(LIBJSOUND_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   192
      INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   193
          PLATFORM_API_WinOS_DirectSound.cpp, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   194
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   195
      CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   196
          $(LIBJSOUND_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   197
          -DUSE_DAUDIO=TRUE, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   198
      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   199
          $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   200
      LIBS := $(JDKLIB_LIBS) dsound.lib winmm.lib user32.lib ole32.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
   201
      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   202
      RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   203
          -D "JDK_FNAME=jsoundds.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   204
          -D "JDK_INTERNAL_NAME=jsoundds" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   205
          -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   206
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
   207
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   208
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   209
  $(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   210
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   211
  TARGETS += $(BUILD_LIBJSOUNDDS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   212
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   213
endif