blob: c23b958b066ca325ab0d98fbe69223ee6ee2e9a1 [file] [log] [blame]
ohair92de5662012-04-10 08:22:03 -07001#
denisa8cc3242013-03-22 19:56:20 +04002# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
ohair92de5662012-04-10 08:22:03 -07003# 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
ihsed8990b32013-10-01 11:08:23 +020026default: all
ohair92de5662012-04-10 08:22:03 -070027
28include $(SPEC)
29include MakeBase.gmk
30include NativeCompilation.gmk
31
32# Setup the java compilers for the JDK build.
33include Setup.gmk
34
35# Copy files (can now depend on $(COPY_FILES))
36include CopyFiles.gmk
37
erikj754c7442012-12-27 20:18:42 +010038# Prepare the find cache. Only used if running on windows.
ihsea29e6222013-10-10 15:06:21 +020039$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
erikj754c7442012-12-27 20:18:42 +010040
erikjaf85fc42012-07-03 16:10:44 -070041# Build tools
42include Tools.gmk
43
ohair92de5662012-04-10 08:22:03 -070044# Include the javah generated headers.
45CFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
46CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
47
erikjaf85fc42012-07-03 16:10:44 -070048# Put the libraries here. Different locations for different target apis.
ihsea29e6222013-10-10 15:06:21 +020049ifeq ($(OPENJDK_TARGET_OS_API), posix)
50 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
ohair92de5662012-04-10 08:22:03 -070051else
ihsea29e6222013-10-10 15:06:21 +020052 INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
ohair92de5662012-04-10 08:22:03 -070053endif
54
ihsea29e6222013-10-10 15:06:21 +020055BUILD_LIBRARIES =
ohair92de5662012-04-10 08:22:03 -070056
erikjaf85fc42012-07-03 16:10:44 -070057# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
58# elegant solution to this.
erikjaf85fc42012-07-03 16:10:44 -070059WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
ohair92de5662012-04-10 08:22:03 -070060
ohair46fcac92012-09-18 11:29:24 -070061# Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but
62# not on other platforms.
63ifeq ($(OPENJDK_TARGET_OS), windows)
ihsea29e6222013-10-10 15:06:21 +020064 DEBUG_ALL_BINARIES := true
andrew93196e42013-05-04 17:04:57 +010065endif
66
67# Build everything with debugging on OpenJDK
68ifdef OPENJDK
ihsea29e6222013-10-10 15:06:21 +020069 DEBUG_ALL_BINARIES := true
ohair46fcac92012-09-18 11:29:24 -070070endif
71
ohair92de5662012-04-10 08:22:03 -070072##########################################################################################
73
ihse0962aa62013-10-16 20:24:46 +020074include lib/CoreLibraries.gmk
erikje78df742012-06-07 20:40:50 -070075
ihse0962aa62013-10-16 20:24:46 +020076include lib/PlatformLibraries.gmk
erikje78df742012-06-07 20:40:50 -070077
ihse0962aa62013-10-16 20:24:46 +020078include lib/NetworkingLibraries.gmk
erikjaf85fc42012-07-03 16:10:44 -070079
ihse0962aa62013-10-16 20:24:46 +020080include lib/NioLibraries.gmk
erikjec9918d2012-12-20 13:05:21 +010081
ihse0962aa62013-10-16 20:24:46 +020082include lib/SecurityLibraries.gmk
ohair92de5662012-04-10 08:22:03 -070083
ihse0962aa62013-10-16 20:24:46 +020084include lib/ServiceabilityLibraries.gmk
erikje78df742012-06-07 20:40:50 -070085
ihse0962aa62013-10-16 20:24:46 +020086include lib/Awt2dLibraries.gmk
ohair92de5662012-04-10 08:22:03 -070087
ihse0962aa62013-10-16 20:24:46 +020088include lib/SoundLibraries.gmk
raginip450da982013-01-18 11:33:31 -080089
rriggs15a698c2014-09-08 08:45:58 -040090# Include the corresponding custom file, if present.
91-include $(CUSTOM_MAKE_DIR)/CompileNativeLibraries.gmk
92
raginip450da982013-01-18 11:33:31 -080093##########################################################################################
94
ohair92de5662012-04-10 08:22:03 -070095all: $(COPY_FILES) $(BUILD_LIBRARIES)
96
97.PHONY: all