blob: 6feba0efe4a0f4a4adb3ffe6053a3daec74af032 [file] [log] [blame]
ohair92de5662012-04-10 08:22:03 -07001#
2# Copyright (c) 1995, 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
23# questions.
24#
25
erikje78df742012-06-07 20:40:50 -070026# This must be the first rule
ohair92de5662012-04-10 08:22:03 -070027default: all
28
29include $(SPEC)
30include MakeBase.gmk
31include JavaCompilation.gmk
32include NativeCompilation.gmk
33
34# Setup the java compilers for the JDK build.
35include Setup.gmk
36
37# Setup the build tools.
38include Tools.gmk
39
ohair92de5662012-04-10 08:22:03 -070040all: $(BUILD_TOOLS)
erikje78df742012-06-07 20:40:50 -070041 +$(MAKE) -f GenerateJavaSources.gmk
ohair92de5662012-04-10 08:22:03 -070042# Drop back to the old makefiles for
43# packages/libs that have not yet been converted.
erikje78df742012-06-07 20:40:50 -070044 +$(MAKE) -f LegacyMakefiles.gmk
ohair92de5662012-04-10 08:22:03 -070045# Ok, now gensrc is fully populated.
erikje78df742012-06-07 20:40:50 -070046 +$(MAKE) -f GenerateData.gmk
47 +$(MAKE) -f CompileJavaClasses.gmk
ohair92de5662012-04-10 08:22:03 -070048# The classes have been built, now generate
49# classes that have other sources.
erikje78df742012-06-07 20:40:50 -070050 +$(MAKE) -f GenerateClasses.gmk
ohair92de5662012-04-10 08:22:03 -070051# The classes are now built and
52# any javah files have now been generated.
erikje78df742012-06-07 20:40:50 -070053 +$(MAKE) -f CompileNativeLibraries.gmk
ohair92de5662012-04-10 08:22:03 -070054# Finally compile the launchers.
erikje78df742012-06-07 20:40:50 -070055 +$(MAKE) -f CompileLaunchers.gmk
ohair92de5662012-04-10 08:22:03 -070056# Now we have a complete jdk, which you can run.
57# It is not yet wrapped up as an installed image.
58# The demos are compiled against this jdk.
59ifndef NO_DEMOS
erikje78df742012-06-07 20:40:50 -070060 +$(MAKE) -f CompileDemos.gmk
ohair92de5662012-04-10 08:22:03 -070061endif
62# Now copy the sample sources into the jdk.
63ifndef NO_SAMPLES
erikje78df742012-06-07 20:40:50 -070064 +$(MAKE) -f CopySamples.gmk
ohair92de5662012-04-10 08:22:03 -070065endif
66
erikje78df742012-06-07 20:40:50 -070067# Create the final jdk and jre images in the old way. Kept for reference
68# until conversion is fully done.
69old-images:
70 +$(MAKE) $(IMAGES_MAKE_ARGS) -f OldImages.gmk
71
ohair92de5662012-04-10 08:22:03 -070072# Create the final jdk and jre images, to be wrapped up
erikje78df742012-06-07 20:40:50 -070073# into packages, or installed.
74images:
75 +$(MAKE) -f CreateJars.gmk
76 +$(MAKE) $(IMAGES_MAKE_ARGS) -f Images.gmk
ohair92de5662012-04-10 08:22:03 -070077
78
79BINARIES:=$(shell if test -d $(IMAGES_OUTPUTDIR)/j2sdk-image/bin; then cd $(IMAGES_OUTPUTDIR)/j2sdk-image/bin && $(LS) ; fi)
80INSTALLDIR:=openjdk-$(RELEASE)
81
82# Install the jdk image, in a very crude way. Not taking into
83# account, how to install properly on macosx or windows etc.
84install: images
85 echo Installing jdk image into $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
86 echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
87 $(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
88 $(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
89 $(CP) -rp $(IMAGES_OUTPUTDIR)/j2sdk-image/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
90 $(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
91 $(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
92
93# Create the deb,rpm,tgz,zip, packages.
94packages: images
95 echo Creating packages...well, in the future.
96 $(MKDIR) -p $(OUTPUT_ROOT)/packages
97
erikje78df742012-06-07 20:40:50 -070098.PHONY: all install images