CompileNativeLibraries.gmk 3.0 KB
Newer Older
1
#
2
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

26
default: all
27 28 29 30 31 32 33 34 35 36 37

include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk

# Setup the java compilers for the JDK build.
include Setup.gmk

# Copy files (can now depend on $(COPY_FILES))
include CopyFiles.gmk

38
# Prepare the find cache. Only used if running on windows.
39
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
40

41 42 43
# Build tools
include Tools.gmk

44 45 46 47
# Include the javah generated headers.
CFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers

48
# Put the libraries here. Different locations for different target apis.
49 50
ifeq ($(OPENJDK_TARGET_OS_API), posix)
  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
51
else
52
  INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
53 54
endif

55
BUILD_LIBRARIES =
56 57 58 59 60

# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib

61 62 63
# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
# not on other platforms.
ifeq ($(OPENJDK_TARGET_OS), windows)
64
  DEBUG_ALL_BINARIES := true
65 66 67 68
endif

# Build everything with debugging on OpenJDK
ifdef OPENJDK
69
  DEBUG_ALL_BINARIES := true
70 71
endif

72 73
##########################################################################################

I
ihse 已提交
74
include lib/CoreLibraries.gmk
75

I
ihse 已提交
76
include lib/PlatformLibraries.gmk
77

I
ihse 已提交
78
include lib/NetworkingLibraries.gmk
79

I
ihse 已提交
80
include lib/NioLibraries.gmk
81

I
ihse 已提交
82
include lib/SecurityLibraries.gmk
83

I
ihse 已提交
84
include lib/ServiceabilityLibraries.gmk
85

I
ihse 已提交
86
include lib/Awt2dLibraries.gmk
87

I
ihse 已提交
88
include lib/SoundLibraries.gmk
89

90 91 92
ifeq ($(OPENJDK_TARGET_OS), linux)
  include lib/JGroupLibraries.gmk
endif
93

94 95 96
# Include the corresponding custom file, if present. 
-include $(CUSTOM_MAKE_DIR)/CompileNativeLibraries.gmk

97 98 99 100 101
##########################################################################################

all: $(COPY_FILES) $(BUILD_LIBRARIES)

.PHONY: all