blob: b45d5dcc15d7a5c74f7c50e3c9b08406eff38e4f [file] [log] [blame]
ihse554e46f2013-11-14 11:19:32 +01001#
erikj6d801d42014-10-13 11:34:50 +02002# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
ihse554e46f2013-11-14 11:19:32 +01003# 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
26# Cache all finds needed for this file. Only used on windows.
27$(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/src/classes))
28
29TOOLS_SRC := $(JDK_TOPDIR)/make/src/classes
30
31ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
32 TOOLS_SRC += $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
33endif
34
35# The exception handling of swing beaninfo which have the own tool directory
36ifeq (, $(BUILD_TOOLS))
37 $(eval $(call SetupJavaCompilation,BUILD_TOOLS, \
38 SETUP := GENERATE_OLDBYTECODE, \
39 SRC := $(TOOLS_SRC), \
40 BIN := $(JDK_OUTPUTDIR)/btclasses))
41endif
42
43$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template: \
44 $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
45 $(call install-file)
46
47BUILD_TOOLS += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
48
49# Resource used by CheckDeps tool
50$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed: \
51 $(JDK_TOPDIR)/make/data/checkdeps/refs.allowed
52 $(call install-file)
53
54BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
55
56# Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
erikj6d801d42014-10-13 11:34:50 +020057TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010058 build.tools.addjsum.AddJsum
59
60# The buildmetaindex tool creates a meta-index to make core class loaders lazier.
erikj6d801d42014-10-13 11:34:50 +020061TOOL_BUILDMETAINDEX = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010062 build.tools.buildmetaindex.BuildMetaIndex
63
erikj6d801d42014-10-13 11:34:50 +020064TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010065 build.tools.compilefontconfig.CompileFontConfig
66
erikj6d801d42014-10-13 11:34:50 +020067TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010068 build.tools.compileproperties.CompileProperties
69
erikj6d801d42014-10-13 11:34:50 +020070TOOL_STRIPPROPERTIES = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010071 build.tools.stripproperties.StripProperties
72
erikj6d801d42014-10-13 11:34:50 +020073TOOL_JARREORDER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010074 build.tools.jarreorder.JarReorder
75
erikj6d801d42014-10-13 11:34:50 +020076TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010077 build.tools.generatecharacter.GenerateCharacter
78
erikj6d801d42014-10-13 11:34:50 +020079TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010080 build.tools.generatecharacter.CharacterName
81
erikj6d801d42014-10-13 11:34:50 +020082TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(JDK_TOPDIR)/make/data/dtdbuilder \
ihse09d7a232014-03-24 10:40:19 +010083 -Djava.awt.headless=true \
ihse554e46f2013-11-14 11:19:32 +010084 -cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
85
erikj6d801d42014-10-13 11:34:50 +020086TOOL_GENERATEBREAKITERATORDATA = $(JAVA_SMALL) \
ihse554e46f2013-11-14 11:19:32 +010087 -cp $(JDK_OUTPUTDIR)/btclasses \
88 build.tools.generatebreakiteratordata.GenerateBreakIteratorData
89
erikj6d801d42014-10-13 11:34:50 +020090TOOL_GENERATECURRENCYDATA = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010091 build.tools.generatecurrencydata.GenerateCurrencyData
92
erikj6d801d42014-10-13 11:34:50 +020093TOOL_HASHER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010094 build.tools.hasher.Hasher
95
erikj6d801d42014-10-13 11:34:50 +020096TOOL_TZDB = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +010097 build.tools.tzdb.TzdbZoneRulesCompiler
98
99
100# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
101# and nbproject/project.properties in the same dir. Needs to be looked at.
erikj6d801d42014-10-13 11:34:50 +0200102TOOL_JDWPGEN = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
ihse554e46f2013-11-14 11:19:32 +0100103
104# TODO: Lots of files in jdk/make/tools/CharsetMapping dir
erikj6d801d42014-10-13 11:34:50 +0200105TOOL_CHARSETMAPPING = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +0100106 build.tools.charsetmapping.Main
107
erikj6d801d42014-10-13 11:34:50 +0200108TOOL_SPP = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
ihse554e46f2013-11-14 11:19:32 +0100109
110# Nimbus is used somewhere in the swing build.
erikj6d801d42014-10-13 11:34:50 +0200111TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +0100112 build.tools.generatenimbus.Generator
113
erikj6d801d42014-10-13 11:34:50 +0200114TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +0100115 WrapperGenerator
116
erikj6d801d42014-10-13 11:34:50 +0200117TOOL_AWT_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +0100118 build.tools.icondata.awt.ToBin
119
erikj6d801d42014-10-13 11:34:50 +0200120TOOL_OSX_TOBIN = $(JAVA_SMALL) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +0100121 build.tools.icondata.osxapp.ToBin
122
erikj6d801d42014-10-13 11:34:50 +0200123TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
ihse554e46f2013-11-14 11:19:32 +0100124 build.tools.cldrconverter.CLDRConverter
125
erikj6d801d42014-10-13 11:34:50 +0200126TOOL_REMOVEMETHODS = $(JAVA_SMALL) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
dholmesbb588872014-12-17 20:25:47 -0500127 -cp '$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)' \
ihse554e46f2013-11-14 11:19:32 +0100128 build.tools.classfile.RemoveMethods
129
erikj6d801d42014-10-13 11:34:50 +0200130TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
dholmesbb588872014-12-17 20:25:47 -0500131 -cp '$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)' \
ihse554e46f2013-11-14 11:19:32 +0100132 build.tools.deps.CheckDeps
133
erikj6d801d42014-10-13 11:34:50 +0200134TOOL_ADDTORESTRICTEDPKGS=$(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
135 build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
ihse554e46f2013-11-14 11:19:32 +0100136
137##########################################################################################
138
139# Tools needed on solaris because OBJCOPY is broken.
140
141ifeq ($(OPENJDK_TARGET_OS), solaris)
142$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
143 SRC := $(JDK_TOPDIR)/make/src/native/add_gnu_debuglink, \
144 LANG := C, \
145 CC := $(BUILD_CC), \
146 LDEXE := $(BUILD_LD), \
147 LDFLAGS := -lelf, \
148 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/add_gnu_debuglink, \
149 OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
150 PROGRAM := add_gnu_debuglink))
151
152$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
153 SRC := $(JDK_TOPDIR)/make/src/native/fix_empty_sec_hdr_flags, \
154 LANG := C, \
155 CC := $(BUILD_CC), \
156 LDEXE := $(BUILD_LD), \
157 LDFLAGS := -lelf, \
158 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
159 OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
160 PROGRAM := fix_empty_sec_hdr_flags))
161endif