makefiles/CompileNativeLibraries.gmk

Print this page


   1 #
   2 # Copyright (c) 2011, 2012, 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


1940                 UnixNativeDispatcher.c
1941 endif
1942 
1943 $(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
1944                 LIBRARY:=nio,\
1945                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
1946                 SRC:=$(BUILD_LIBNIO_SRC),\
1947                 INCLUDE_FILES:=$(BUILD_LIBNIO_FILES), \
1948                 LANG:=C,\
1949                 OPTIMIZATION:=HIGH, \
1950                 CFLAGS:=$(CFLAGS_JDKLIB) \
1951                         $(BUILD_LIBNIO_CFLAGS),\
1952                 MAPFILE:=$(BUILD_LIBNIO_MAPFILE), \
1953                 LDFLAGS:=$(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
1954                          $(call SET_SHARED_LIBRARY_ORIGIN),\
1955                 LDFLAGS_SUFFIX_linux:=-ljava -lnet -lpthread $(LIBDL),\
1956                 LDFLAGS_SUFFIX_solaris:=-ljvm -lsocket -lposix4 $(LIBDL) \
1957                                         -lsendfile -ljava -lnet -lc,\
1958                 LDFLAGS_SUFFIX_windows:=jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
1959                                         $(JDK_OUTPUTDIR)/objs/libnet/net.lib \
1960                                         $(JDK_OUTPUTDIR)/objs/libjava/io_util.obj \
1961                                         $(JDK_OUTPUTDIR)/objs/libjava/FileDescriptor_md.obj \
1962                                         advapi32.lib,\
1963                 LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread -framework CoreFoundation,\
1964                 LDFLAGS_SUFFIX:=,\
1965                 VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
1966                 RC_FLAGS:=$(RC_FLAGS)\
1967                           -D "JDK_FNAME=nio.dll" \
1968                           -D "JDK_INTERNAL_NAME=nio" \
1969                           -D "JDK_FTYPE=0x2L",\
1970                 OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnio,\
1971                 DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
1972 
1973 BUILD_LIBRARIES += $(BUILD_LIBNIO)
1974 
1975 $(BUILD_LIBNIO) : $(BUILD_LIBNET)
1976 
1977 ##########################################################################################
1978 
1979 ifeq ($(OPENJDK_TARGET_OS_API),posix)
1980 
1981   ifneq ($(OPENJDK_TARGET_OS),macosx)


   1 #
   2 # Copyright (c) 2011, 2013, 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


1940                 UnixNativeDispatcher.c
1941 endif
1942 
1943 $(eval $(call SetupNativeCompilation,BUILD_LIBNIO,\
1944                 LIBRARY:=nio,\
1945                 OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
1946                 SRC:=$(BUILD_LIBNIO_SRC),\
1947                 INCLUDE_FILES:=$(BUILD_LIBNIO_FILES), \
1948                 LANG:=C,\
1949                 OPTIMIZATION:=HIGH, \
1950                 CFLAGS:=$(CFLAGS_JDKLIB) \
1951                         $(BUILD_LIBNIO_CFLAGS),\
1952                 MAPFILE:=$(BUILD_LIBNIO_MAPFILE), \
1953                 LDFLAGS:=$(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
1954                          $(call SET_SHARED_LIBRARY_ORIGIN),\
1955                 LDFLAGS_SUFFIX_linux:=-ljava -lnet -lpthread $(LIBDL),\
1956                 LDFLAGS_SUFFIX_solaris:=-ljvm -lsocket -lposix4 $(LIBDL) \
1957                                         -lsendfile -ljava -lnet -lc,\
1958                 LDFLAGS_SUFFIX_windows:=jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
1959                                         $(JDK_OUTPUTDIR)/objs/libnet/net.lib \


1960                                         advapi32.lib,\
1961                 LDFLAGS_SUFFIX_macosx:=-ljava -lnet -pthread -framework CoreFoundation,\
1962                 LDFLAGS_SUFFIX:=,\
1963                 VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
1964                 RC_FLAGS:=$(RC_FLAGS)\
1965                           -D "JDK_FNAME=nio.dll" \
1966                           -D "JDK_INTERNAL_NAME=nio" \
1967                           -D "JDK_FTYPE=0x2L",\
1968                 OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libnio,\
1969                 DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
1970 
1971 BUILD_LIBRARIES += $(BUILD_LIBNIO)
1972 
1973 $(BUILD_LIBNIO) : $(BUILD_LIBNET)
1974 
1975 ##########################################################################################
1976 
1977 ifeq ($(OPENJDK_TARGET_OS_API),posix)
1978 
1979   ifneq ($(OPENJDK_TARGET_OS),macosx)