ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
denis | a8cc324 | 2013-03-22 19:56:20 +0400 | [diff] [blame] | 2 | # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 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 | |
ihse | d8990b3 | 2013-10-01 11:08:23 +0200 | [diff] [blame] | 26 | default: all |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 27 | |
| 28 | include $(SPEC) |
| 29 | include MakeBase.gmk |
| 30 | include NativeCompilation.gmk |
| 31 | |
| 32 | # Setup the java compilers for the JDK build. |
| 33 | include Setup.gmk |
| 34 | |
| 35 | # Copy files (can now depend on $(COPY_FILES)) |
| 36 | include CopyFiles.gmk |
| 37 | |
erikj | 754c744 | 2012-12-27 20:18:42 +0100 | [diff] [blame] | 38 | # Prepare the find cache. Only used if running on windows. |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 39 | $(eval $(call FillCacheFind, $(JDK_TOPDIR)/src)) |
erikj | 754c744 | 2012-12-27 20:18:42 +0100 | [diff] [blame] | 40 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 41 | # Build tools |
| 42 | include Tools.gmk |
| 43 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 44 | # Include the javah generated headers. |
| 45 | CFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers |
| 46 | CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers |
| 47 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 48 | # Put the libraries here. Different locations for different target apis. |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 49 | ifeq ($(OPENJDK_TARGET_OS_API), posix) |
| 50 | INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 51 | else |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 52 | INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 53 | endif |
| 54 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 55 | BUILD_LIBRARIES = |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 56 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 57 | # Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more |
| 58 | # elegant solution to this. |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 59 | WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 60 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 61 | # Use this variable to set DEBUG_SYMBOLS true on windows for all libraries, but |
| 62 | # not on other platforms. |
| 63 | ifeq ($(OPENJDK_TARGET_OS), windows) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 64 | DEBUG_ALL_BINARIES := true |
andrew | 93196e4 | 2013-05-04 17:04:57 +0100 | [diff] [blame] | 65 | endif |
| 66 | |
| 67 | # Build everything with debugging on OpenJDK |
| 68 | ifdef OPENJDK |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 69 | DEBUG_ALL_BINARIES := true |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 70 | endif |
| 71 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 72 | ########################################################################################## |
| 73 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 74 | include lib/CoreLibraries.gmk |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 75 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 76 | include lib/PlatformLibraries.gmk |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 77 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 78 | include lib/NetworkingLibraries.gmk |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 79 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 80 | include lib/NioLibraries.gmk |
erikj | ec9918d | 2012-12-20 13:05:21 +0100 | [diff] [blame] | 81 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 82 | include lib/SecurityLibraries.gmk |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 83 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 84 | include lib/ServiceabilityLibraries.gmk |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 85 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 86 | include lib/Awt2dLibraries.gmk |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 87 | |
ihse | 0962aa6 | 2013-10-16 20:24:46 +0200 | [diff] [blame] | 88 | include lib/SoundLibraries.gmk |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 89 | |
rriggs | 15a698c | 2014-09-08 08:45:58 -0400 | [diff] [blame] | 90 | # Include the corresponding custom file, if present. |
| 91 | -include $(CUSTOM_MAKE_DIR)/CompileNativeLibraries.gmk |
| 92 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 93 | ########################################################################################## |
| 94 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 95 | all: $(COPY_FILES) $(BUILD_LIBRARIES) |
| 96 | |
| 97 | .PHONY: all |