make/lib/SoundLibraries.gmk
author michaelm
Wed, 29 Nov 2017 16:59:38 +0000
branchhttp-client-branch
changeset 55912 dfa9489d1cb1
parent 47217 72e3ae9a25eb
child 49070 d7859531621b
child 56107 706dba352bda
permissions -rw-r--r--
http-client-branch: fixed Http2TestServerConnection problem
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 := \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    27
    $(TOPDIR)/src/java.desktop/share/native/libjsound \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    28
    $(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 += \
47191
8c95ea7056b7 8177951: Charset problem when the name of the sound device contains Chinese character
serb
parents: 35276
diff changeset
    64
      PLATFORM_API_WinOS_Charset_Util.cpp \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
      PLATFORM_API_WinOS_MidiIn.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    66
      PLATFORM_API_WinOS_MidiOut.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
      PLATFORM_API_WinOS_Util.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    68
      PLATFORM_API_WinOS_Ports.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    69
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    70
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    71
endif # OPENJDK_TARGET_OS windows
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    72
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    73
ifeq ($(OPENJDK_TARGET_OS), linux)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    74
  EXTRA_SOUND_JNI_LIBS += jsoundalsa
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    75
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    76
endif # OPENJDK_TARGET_OS linux
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    77
22593
938340719ac2 8024900: PPC64: Enable new build on AIX (jdk part)
simonis
parents: 22592
diff changeset
    78
ifeq ($(OPENJDK_TARGET_OS), aix)
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    79
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    80
endif # OPENJDK_TARGET_OS aix
22593
938340719ac2 8024900: PPC64: Enable new build on AIX (jdk part)
simonis
parents: 22592
diff changeset
    81
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    82
ifeq ($(OPENJDK_TARGET_OS), macosx)
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29374
diff changeset
    83
  LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    84
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    85
      -DUSE_PORTS=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    86
      -DUSE_DAUDIO=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    87
      -DUSE_PLATFORM_MIDI_OUT=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    88
      -DUSE_PLATFORM_MIDI_IN=TRUE
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    89
  LIBJSOUND_SRC_DIRS += $(TOPDIR)/src/java.desktop/macosx/native/libjsound
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    90
  LIBJSOUND_SRC_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    91
      PLATFORM_API_MacOSX_Utils.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    92
      PLATFORM_API_MacOSX_PCM.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    93
      PLATFORM_API_MacOSX_Ports.cpp \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    94
      PLATFORM_API_MacOSX_MidiIn.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    95
      PLATFORM_API_MacOSX_MidiOut.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    96
      PLATFORM_API_MacOSX_MidiUtils.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    97
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    98
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    99
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   100
endif # OPENJDK_TARGET_OS macosx
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   101
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   102
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   103
  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   104
      -DUSE_PORTS=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   105
      -DUSE_DAUDIO=TRUE
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   106
  LIBJSOUND_SRC_FILES += \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   107
      PLATFORM_API_SolarisOS_Utils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   108
      PLATFORM_API_SolarisOS_Ports.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   109
      PLATFORM_API_SolarisOS_PCM.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   110
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   111
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   112
  LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   113
endif # OPENJDK_TARGET_OS solaris
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   114
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   115
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   116
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   117
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   118
    LIBRARY := jsound, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   119
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   120
    SRC := $(LIBJSOUND_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   121
    INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29374
diff changeset
   122
    TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   123
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   124
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   125
        $(LIBJSOUND_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   126
    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   127
    MAPFILE := $(TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   128
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   129
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   130
    LIBS_unix := -ljava -ljvm, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   131
    LIBS_solaris := -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   132
    LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   133
        -framework CoreServices -framework AudioUnit $(LIBCXX) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   134
        -framework CoreMIDI -framework AudioToolbox, \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   135
    LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
   136
    VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   137
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   138
        -D "JDK_FNAME=jsound.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   139
        -D "JDK_INTERNAL_NAME=jsound" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   140
        -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   141
    OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
   142
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   143
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   144
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   145
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   146
TARGETS += $(BUILD_LIBJSOUND)
20547
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
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   150
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   151
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   152
  $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   153
      LIBRARY := jsoundalsa, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   154
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   155
      SRC := $(LIBJSOUND_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   156
      INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   157
          $(LIBJSOUND_DAUDIOFILES) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   158
          PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   159
          PLATFORM_API_LinuxOS_ALSA_PCM.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   160
          PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   161
          PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   162
          PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   163
          PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   164
          PLATFORM_API_LinuxOS_ALSA_Ports.c, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   165
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   166
      CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   167
          $(LIBJSOUND_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   168
          -DUSE_DAUDIO=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   169
          -DUSE_PORTS=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   170
          -DUSE_PLATFORM_MIDI_OUT=TRUE \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   171
          -DUSE_PLATFORM_MIDI_IN=TRUE, \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
   172
      MAPFILE := $(TOPDIR)/make/mapfiles/libjsoundalsa/mapfile-vers, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   173
      LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   174
          $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   175
      LIBS := $(ALSA_LIBS) -ljava -ljvm, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   176
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
   177
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   178
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   179
  $(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   180
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   181
  TARGETS += $(BUILD_LIBJSOUNDALSA)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   182
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   183
endif
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
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   187
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   188
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   189
  $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   190
      LIBRARY := jsoundds, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   191
      OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   192
      SRC := $(LIBJSOUND_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   193
      INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
47191
8c95ea7056b7 8177951: Charset problem when the name of the sound device contains Chinese character
serb
parents: 35276
diff changeset
   194
          PLATFORM_API_WinOS_Charset_Util.cpp \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   195
          PLATFORM_API_WinOS_DirectSound.cpp, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   196
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   197
      CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   198
          $(LIBJSOUND_CFLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   199
          -DUSE_DAUDIO=TRUE, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   200
      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   201
          $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32111
diff changeset
   202
      LIBS := $(JDKLIB_LIBS) dsound.lib winmm.lib user32.lib ole32.lib, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 22607
diff changeset
   203
      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   204
      RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   205
          -D "JDK_FNAME=jsoundds.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   206
          -D "JDK_INTERNAL_NAME=jsoundds" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   207
          -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   208
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 33406
diff changeset
   209
  ))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   210
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   211
  $(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   212
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   213
  TARGETS += $(BUILD_LIBJSOUNDDS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   214
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   215
endif