< prev index next >

make/lib/Lib-jdk.sctp.gmk

Print this page


   1 #
   2 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 include LibCommon.gmk
  27 
  28 ################################################################################
  29 
  30 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
  31 
  32   ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
  33 
  34     # Suppress unused parameters required by exported JNI functions.
  35     SCTP_WERROR := -Werror -Wno-error=unused-parameter
  36     ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
  37       SCTP_WERROR :=
  38     endif
  39 
  40     $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
  41         LIBRARY := sctp, \
  42         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
  43         SRC := $(JDK_TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_TYPE)/native/libsctp, \
  44         OPTIMIZATION := LOW, \
  45         CFLAGS := $(CFLAGS_JDKLIB) \
  46             -I $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \
  47             -I $(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
  48             $(addprefix -I, $(call FindSrcDirsForLib, java.base, net)) \
  49             $(LIBJAVA_HEADER_FLAGS) \
  50             -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \
  51             -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
  52         CFLAGS_linux := $(SCTP_WERROR), \
  53         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
  54         LDFLAGS := $(LDFLAGS_JDKLIB) \
  55             $(call SET_SHARED_LIBRARY_ORIGIN), \
  56         LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
  57         LDFLAGS_SUFFIX_unix := -lnio -lnet, \
  58         LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
  59         LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
  60         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
  61         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
  62 
  63     TARGETS += $(BUILD_LIBSCTP)
  64 
  65     $(BUILD_LIBSCTP): $(call FindLib, java.base, nio)
  66   endif
  67 endif
  68 
  69 ################################################################################
   1 #
   2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 include LibCommon.gmk
  27 
  28 ################################################################################
  29 
  30 ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
  31 
  32   ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
  33     # DISABLED_WARNINGS_gcc := unused-parameter needed to
  34     # suppress unused parameters required by exported JNI functions.




  35 
  36     $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
  37         LIBRARY := sctp, \
  38         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
  39         SRC := $(JDK_TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_TYPE)/native/libsctp, \
  40         OPTIMIZATION := LOW, \
  41         CFLAGS := $(CFLAGS_JDKLIB) \
  42             -I $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \
  43             -I $(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
  44             $(addprefix -I, $(call FindSrcDirsForLib, java.base, net)) \
  45             $(LIBJAVA_HEADER_FLAGS) \
  46             -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \
  47             -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
  48         DISABLED_WARNINGS_gcc := unused-parameter, \
  49         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
  50         LDFLAGS := $(LDFLAGS_JDKLIB) \
  51             $(call SET_SHARED_LIBRARY_ORIGIN), \
  52         LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
  53         LDFLAGS_SUFFIX_unix := -lnio -lnet, \
  54         LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
  55         LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
  56         OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libsctp, \
  57         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
  58 
  59     TARGETS += $(BUILD_LIBSCTP)
  60 
  61     $(BUILD_LIBSCTP): $(call FindLib, java.base, nio)
  62   endif
  63 endif
  64 
  65 ################################################################################
< prev index next >