blob: 6a9fd0fe7909b2fa50680e42e1fb06d344bbed80 [file] [log] [blame]
Fredrik Ohstrome32ab982012-04-10 08:22:03 -07001#
2# Copyright (c) 2011, 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
Erik Joelssonb9ea1c82012-12-27 20:18:42 +010026# Cache all finds needed for this file. Only used on windows.
27$(eval $(call FillCacheFind,$(JDK_TOPDIR)/make/tools \
28 $(JDK_TOPDIR)/src/solaris/classes \
29 $(JDK_TOPDIR)/makefiles/sun))
30
Erik Joelsson9ff32c22013-01-03 20:55:52 +010031TOOLS_SRC:=$(JDK_TOPDIR)/make/tools/src \
32 $(JDK_TOPDIR)/makefiles/sun/awt/X11 \
33 $(JDK_TOPDIR)/makefiles/sun/osxapp \
34 $(JDK_TOPDIR)/make/tools/swing-beans
35
36ifneq ($(OPENJDK_TARGET_OS),windows)
37 TOOLS_SRC+=$(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
38endif
39
Erik Joelssonf558e392012-06-07 20:40:50 -070040# The exception handling of swing beaninfo which have the own tool directory
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070041ifeq (,$(BUILD_TOOLS))
42$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
43 SETUP:=GENERATE_OLDBYTECODE,\
Erik Joelsson9ff32c22013-01-03 20:55:52 +010044 SRC:=$(TOOLS_SRC),\
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070045 BIN:=$(JDK_OUTPUTDIR)/btclasses))
Erik Joelssonf558e392012-06-07 20:40:50 -070046
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070047endif
48
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070049$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
50 $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
Erik Joelssonf558e392012-06-07 20:40:50 -070051 $(MKDIR) -p $(@D)
52 $(CP) $< $@
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070053
54BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
55
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070056# Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
57TOOL_ADDJSUM=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
58 build.tools.addjsum.AddJsum
59
60# The buildmetaindex tool creates a meta-index to make core class loaders lazier.
61TOOL_BUILDMETAINDEX=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
62 build.tools.buildmetaindex.BuildMetaIndex
63
64# The comment checker is not currently used. Should it be removed or added to javac?
65TOOL_COMMENTCHECKER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
66 build.tools.commentchecker.CommentChecker
67
68TOOL_COMPILEFONTCONFIG=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
69 build.tools.compilefontconfig.CompileFontConfig
70
71TOOL_COMPILEPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
72 build.tools.compileproperties.CompileProperties
73
74TOOL_STRIPPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
75 build.tools.stripproperties.StripProperties
76
77TOOL_JARREORDER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
78 build.tools.jarreorder.JarReorder
79
80TOOL_GENERATECHARACTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
81 build.tools.generatecharacter.GenerateCharacter
82
83TOOL_CHARACTERNAME=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
84 build.tools.generatecharacter.CharacterName
85
86TOOL_DIRDIFF=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
87 build.tools.dirdiff.DirDiff
88
89TOOL_DTDBUILDER=$(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
90 -cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
91
92TOOL_GENERATEBREAKITERATORDATA=$(JAVA) \
93 -cp $(JDK_OUTPUTDIR)/btclasses \
94 build.tools.generatebreakiteratordata.GenerateBreakIteratorData
95
96TOOL_GENERATECURRENCYDATA=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
97 build.tools.generatecurrencydata.GenerateCurrencyData
98
99TOOL_HASHER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
100 build.tools.hasher.Hasher
101
102# Jarsplit used in jdk/makefiles/common/Release.gmk
103TOOL_JARSPLIT=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
104 build.tools.jarsplit.JarSplit
105
Stephen Colebournedf4d2352013-01-22 20:59:21 -0800106TOOL_TZDB=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
107 build.tools.tzdb.TzdbZoneRulesCompiler
108
109
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700110# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
111# and nbproject/project.properties in the same dir. Needs to be looked at.
112TOOL_JDWPGEN=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
113
114# TODO: Lots of files in jdk/make/tools/CharsetMapping dir
115TOOL_CHARSETMAPPING=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
116 build.tools.charsetmapping.Main
117
118TOOL_SPP=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
119
120# TODO: Only referenced in jdk/make/tools/sharing/README.txt. Find out what it means.
121TOOL_MAKECLASSLIST=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
122 build.tools.makeclasslist.MakeClasslist
123
124# Nimbus is used somewhere in the swing build.
125TOOL_GENERATENIMBUS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
126 build.tools.generatenimbus.Generator
Erik Joelssonf558e392012-06-07 20:40:50 -0700127
128TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
129 WrapperGenerator
130
Kelly O'Hair38c629a2012-10-26 14:23:29 -0700131TOOL_X11_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
Erik Joelssonf558e392012-06-07 20:40:50 -0700132 sun.awt.X11.ToBin
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700133
Kelly O'Hair38c629a2012-10-26 14:23:29 -0700134TOOL_OSX_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
135 sun.osxapp.ToBin
136
Naoto Sato73ff23b2012-08-21 11:00:30 -0700137TOOL_CLDRCONVERTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
138 build.tools.cldrconverter.CLDRConverter
139
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700140##########################################################################################
141
142# Tools needed on solaris because OBJCOPY is broken.
143
144$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK,\
145 SRC:=$(JDK_TOPDIR)/make/tools/add_gnu_debuglink,\
146 LANG:=C,\
Kelly O'Hairc363db82012-09-18 11:29:24 -0700147 CC:=$(BUILD_CC),\
148 LDEXE:=$(BUILD_LD),\
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700149 LDFLAGS:=-lelf,\
150 OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/add_gnu_debuglink,\
151 OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
152 PROGRAM:=add_gnu_debuglink))
153
154$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS,\
155 SRC:=$(JDK_TOPDIR)/make/tools/fix_empty_sec_hdr_flags,\
156 LANG:=C,\
Kelly O'Hairc363db82012-09-18 11:29:24 -0700157 CC:=$(BUILD_CC),\
158 LDEXE:=$(BUILD_LD),\
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700159 LDFLAGS:=-lelf,\
160 OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags,\
161 OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
162 PROGRAM:=fix_empty_sec_hdr_flags))