author | jmasa |
Fri, 29 Aug 2014 08:14:19 -0700 | |
changeset 26331 | 8f17e084029b |
parent 25859 | 3317bb8137f4 |
child 26191 | a0ff4b39d34b |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
24967 | 2 |
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
26 |
default: all |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
27 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
include $(SPEC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
include MakeBase.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
include JavaCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
include NativeCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
33 |
# Setup the java compilers for the JDK build. |
25859 | 34 |
include SetupJava.gmk |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
|
25859 | 36 |
# Prepare the find cache. |
20547 | 37 |
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src)) |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
38 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
39 |
# Append demo goals to this variable. |
20547 | 40 |
BUILD_DEMOS = |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
41 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
42 |
# The demo structure and contents should really be cleaned up. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
43 |
# Now every other demo has its own quirks where to put the |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
44 |
# READMEs and other files. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
45 |
|
25859 | 46 |
DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share |
47 |
DEMO_CLOSED_SHARE_SRC := $(JDK_TOPDIR)/src/closed/demo/share |
|
48 |
DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris |
|
49 |
DEMO_OS_API_SRC := $(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_API_DIR) |
|
50 |
VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc |
|
51 |
||
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
52 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
53 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
54 |
define SetupAppletDemo |
20547 | 55 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \ |
56 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
25859 | 57 |
SRC := $(JDK_TOPDIR)/src/$3demo/share/applets/$1, \ |
20547 | 58 |
BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \ |
59 |
COPY := .html .java .xyz .obj .au .gif, \ |
|
60 |
DISABLE_SJAVAC := $2)) |
|
61 |
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
62 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
63 |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
64 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
65 |
$(eval $(call SetupAppletDemo,ArcTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
66 |
$(eval $(call SetupAppletDemo,BarChart)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
67 |
$(eval $(call SetupAppletDemo,Blink)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
68 |
$(eval $(call SetupAppletDemo,CardTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
69 |
$(eval $(call SetupAppletDemo,Clock)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
70 |
$(eval $(call SetupAppletDemo,DitherTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
71 |
$(eval $(call SetupAppletDemo,DrawTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
72 |
$(eval $(call SetupAppletDemo,Fractal)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
73 |
$(eval $(call SetupAppletDemo,GraphicsTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
74 |
$(eval $(call SetupAppletDemo,NervousText)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
75 |
$(eval $(call SetupAppletDemo,SimpleGraph)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
76 |
$(eval $(call SetupAppletDemo,SortDemo)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
77 |
$(eval $(call SetupAppletDemo,SpreadSheet)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
78 |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
79 |
ifndef OPENJDK |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
80 |
$(eval $(call SetupAppletDemo,Animator,,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
81 |
$(eval $(call SetupAppletDemo,GraphLayout,true,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
82 |
$(eval $(call SetupAppletDemo,JumpingBox,,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
83 |
$(eval $(call SetupAppletDemo,TicTacToe,,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
84 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
85 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
86 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
87 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
88 |
|
20547 | 89 |
PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
90 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
91 |
define SetupDemo |
20547 | 92 |
# Param 1 = Name of the demo |
93 |
# Param 2 = Subdirectory of the demo below the demo directory. |
|
94 |
# Param 3 = Additional javac flags. |
|
95 |
# Param 4 = The main class for the jar. |
|
96 |
# Param 5 = Additional source directory. |
|
97 |
# Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed) |
|
98 |
# Param 7 = List of files to copy |
|
99 |
# Param 8 = Base name of jar file. Defaults to $1 |
|
100 |
# Param 9 = Exclude list |
|
101 |
# Param 10 = Extra copy patterns |
|
102 |
# Param 11 = Extra manifest attribute |
|
103 |
# Param 12 = Suffix for compiler setup name |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
104 |
|
25859 | 105 |
$1_SRC_BASE := $(JDK_TOPDIR)/src/$6demo/share/$2/$1 |
20547 | 106 |
# In some demos the source is found in a subdir called src. |
25859 | 107 |
$1_MAIN_SRC := $$(wildcard $$($1_SRC_BASE)/src) |
20547 | 108 |
ifeq ($$($1_MAIN_SRC), ) |
25859 | 109 |
$1_MAIN_SRC := $$($1_SRC_BASE) |
20547 | 110 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
111 |
|
20547 | 112 |
ifneq ($8, ) |
113 |
$1_JARFILE := $8.jar |
|
114 |
else |
|
115 |
$1_JARFILE := $1.jar |
|
116 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
|
20547 | 118 |
ifeq ($(findstring $1,Laffy SwingSet3), ) |
119 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1, \ |
|
120 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
121 |
ADD_JAVAC_FLAGS := $3, \ |
|
122 |
SRC := $$($1_MAIN_SRC) $5, \ |
|
123 |
BIN := $(JDK_OUTPUTDIR)/democlasses/$2/$1, \ |
|
124 |
COPY := $(PATTERNS_TO_COPY) $(10), \ |
|
125 |
JAR := $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE), \ |
|
126 |
JARMAIN := $4, \ |
|
21805 | 127 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \ |
20547 | 128 |
EXTRA_MANIFEST_ATTR := $(11), \ |
129 |
SRCZIP := $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip, \ |
|
130 |
EXCLUDE_FILES := $9, \ |
|
131 |
DISABLE_SJAVAC := $(12))) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
132 |
|
20547 | 133 |
BUILD_DEMOS += $$(BUILD_DEMO_$1) \ |
134 |
$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \ |
|
135 |
$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip |
|
136 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
137 |
|
20547 | 138 |
# Copy files. |
25859 | 139 |
$1_COPY_TARGETS := $$(patsubst $$($1_SRC_BASE)/%, \ |
20547 | 140 |
$(JDK_OUTPUTDIR)/demo/$2/$1/%, \ |
25859 | 141 |
$$(wildcard $$(addprefix $$($1_SRC_BASE)/, $7))) |
20547 | 142 |
ifneq ($7, ) |
25859 | 143 |
$(JDK_OUTPUTDIR)/demo/$2/$1/%: $$($1_SRC_BASE)/% |
20547 | 144 |
$$(call install-file) |
145 |
$(CHMOD) -f ug+w $$@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
146 |
|
20547 | 147 |
BUILD_DEMOS += $$($1_COPY_TARGETS) |
148 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
149 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
150 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
151 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
152 |
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html)) |
20547 | 153 |
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \ |
154 |
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \ |
|
25859 | 155 |
$(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor |
13702 | 156 |
(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \ |
20547 | 157 |
$(MKDIR) -p _the.tmp/META-INF/services && \ |
25859 | 158 |
$(CP) $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \ |
20547 | 159 |
cd _the.tmp && \ |
160 |
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \ |
|
161 |
cd META-INF/services && \ |
|
162 |
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor) |
|
13702 | 163 |
$(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp |
12892 | 164 |
$(TOUCH) $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
165 |
|
20547 | 166 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
167 |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
168 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
169 |
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
170 |
$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
171 |
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
172 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
173 |
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
174 |
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
175 |
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
176 |
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
177 |
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
178 |
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
179 |
$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*)) |
14521
6196ce8b0c33
8001906: build-infra: warning: [path] bad path element on Solaris
tbell
parents:
14231
diff
changeset
|
180 |
$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
181 |
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*)) |
14521
6196ce8b0c33
8001906: build-infra: warning: [path] bad path element on Solaris
tbell
parents:
14231
diff
changeset
|
182 |
$(eval $(call SetupDemo,JTop,management,,JTop,,,README*)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
183 |
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
184 |
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
185 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
186 |
ifndef OPENJDK |
20547 | 187 |
$(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*)) |
188 |
$(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
189 |
|
20547 | 190 |
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo)) |
191 |
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \ |
|
25859 | 192 |
$(DEMO_SHARE_SRC)/jfc/Notepad,closed/,*.txt,,$(DEMO_SHARE_SRC)/jfc/Notepad/README.txt)) |
20547 | 193 |
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \ |
194 |
SplashScreen-Image: resources/images/splash.png,true)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
195 |
|
25859 | 196 |
BUILD_DEMOS += $(patsubst $(DEMO_CLOSED_SHARE_SRC)/nbproject/%, \ |
20547 | 197 |
$(JDK_OUTPUTDIR)/demo/nbproject/%, \ |
25859 | 198 |
$(call CacheFind, $(DEMO_CLOSED_SHARE_SRC)/nbproject)) |
20547 | 199 |
|
25859 | 200 |
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/% |
20547 | 201 |
$(call install-file) |
202 |
$(CHMOD) -f ug+w $@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
203 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
204 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
205 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
206 |
|
20547 | 207 |
# In the old makefiles, j2dbench was not compiled. |
208 |
#$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
209 |
|
13702 | 210 |
# JVMTI demos are a bit strange and share some files, but be careful the |
20547 | 211 |
# shared files are just the *.c and *.h files, not the README or sample |
212 |
# makefiles. So we always exclude the README.txt and sample.makefile.txt |
|
213 |
# from the extra sources. |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
214 |
define SetupJVMTIDemo |
20547 | 215 |
# Param 1 = Name of the demo |
216 |
# Param 2 = add these directories to the includes, default is agent_util |
|
217 |
# Param 3 = extra CFLAGS |
|
218 |
# Param 4 = C or C++ (defaults to C) |
|
219 |
# Param 5 = libs for posix |
|
220 |
# Param 6 = libs for windows |
|
221 |
# Param 7 = libs for solaris |
|
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
222 |
# Param 8 = libs for linux |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
223 |
# Param 9 = extra directories with required sources |
20547 | 224 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \ |
25859 | 225 |
$$(wildcard $(DEMO_OS_API_SRC)/jvmti/$1) \ |
226 |
$$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, $2)) \ |
|
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
227 |
$9 |
20547 | 228 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \ |
25859 | 229 |
$$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, $2)) \ |
230 |
$$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, $2)) |
|
20547 | 231 |
BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC)) |
232 |
BUILD_DEMO_JVMTI_$1_LANG := C |
|
233 |
ifneq (, $4) |
|
234 |
BUILD_DEMO_JVMTI_$1_LANG := $4 |
|
235 |
endif |
|
236 |
ifeq (C++, $4) |
|
237 |
$1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX) |
|
238 |
endif |
|
13164 | 239 |
|
25859 | 240 |
$1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(DEMO_SHARE_SRC)/jvmti/$1 \ |
20547 | 241 |
$$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \ |
242 |
$(CXXFLAGS_DEBUG_SYMBOLS) |
|
243 |
ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc) |
|
244 |
$1_FILTER := -xregs=no%appl |
|
245 |
$1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS)) |
|
246 |
endif |
|
13164 | 247 |
|
20547 | 248 |
# Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the |
249 |
# eval call below, the comma gets expanded too early. |
|
250 |
BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \ |
|
25859 | 251 |
-I$(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 |
13702 | 252 |
|
20547 | 253 |
# Remove the -incremental:no setting to get .ilk-files like in the old build. |
254 |
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \ |
|
25859 | 255 |
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \ |
20547 | 256 |
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \ |
257 |
OPTIMIZATION := LOW, \ |
|
258 |
CXXFLAGS := $$($1_CXXFLAGS), \ |
|
259 |
LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \ |
|
260 |
LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \ |
|
261 |
LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \ |
|
262 |
LDFLAGS_SUFFIX_posix := $5, \ |
|
263 |
LDFLAGS_SUFFIX_windows := $6, \ |
|
264 |
LDFLAGS_SUFFIX_solaris := $7 -lc, \ |
|
265 |
LDFLAGS_SUFFIX_linux := $8, \ |
|
25859 | 266 |
VERSIONINFO_RESOURCE := $(VERSION_INFO_RESOURCE), \ |
20547 | 267 |
RC_FLAGS := $$(RC_FLAGS) \ |
268 |
-D "JDK_FNAME=$1.dll" \ |
|
269 |
-D "JDK_INTERNAL_NAME=$1" \ |
|
270 |
-D "JDK_FTYPE=0x2L", \ |
|
271 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1, \ |
|
272 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib, \ |
|
273 |
LIBRARY := $1)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
274 |
|
20547 | 275 |
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \ |
25859 | 276 |
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \ |
20547 | 277 |
EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \ |
278 |
ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
279 |
|
25859 | 280 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt |
20547 | 281 |
$$(call install-file) |
282 |
$(CHMOD) -f ug+w $$@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
283 |
|
25859 | 284 |
ifneq (, $$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java)) |
20547 | 285 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \ |
286 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
25859 | 287 |
SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \ |
20547 | 288 |
BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \ |
289 |
COPY := $(PATTERNS_TO_COPY), \ |
|
290 |
JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \ |
|
291 |
EXTRA_MANIFEST_ATTR := Main-Class: \n, \ |
|
21805 | 292 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
293 |
|
20547 | 294 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar |
295 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
296 |
|
20547 | 297 |
BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \ |
298 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \ |
|
299 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt |
|
13702 | 300 |
|
20547 | 301 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
302 |
# These files normally end up in OBJECT_DIR but for demos they |
|
303 |
# are supposed to be included in the distro. |
|
304 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1) |
|
305 |
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@ |
|
13702 | 306 |
|
20547 | 307 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1) |
308 |
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@ |
|
13702 | 309 |
|
20547 | 310 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \ |
311 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp |
|
312 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
313 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
314 |
|
20547 | 315 |
$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util)) |
316 |
$(eval $(call SetupJVMTIDemo,gctest, agent_util)) |
|
317 |
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo)) |
|
318 |
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util)) |
|
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
319 |
|
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
320 |
# On AIX, hprof requires 'dladdr' from src/aix/porting/porting_aix.cpp |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
321 |
BUILD_LIBHPROF_AIX_EXTRA_SRC := |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
322 |
BUILD_LIBHPROF_AIX_EXTRA_CFLAGS := |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
323 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
324 |
BUILD_LIBHPROF_AIX_EXTRA_SRC += $(JDK_TOPDIR)/src/aix/porting |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
325 |
BUILD_LIBHPROF_AIX_EXTRA_CFLAGS += -I$(JDK_TOPDIR)/src/aix/porting |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
326 |
endif |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
327 |
|
20547 | 328 |
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \ |
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
329 |
$(BUILD_LIBHPROF_AIX_EXTRA_CFLAGS), C, \ |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
330 |
-ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread, $(BUILD_LIBHPROF_AIX_EXTRA_SRC))) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
331 |
|
20547 | 332 |
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo)) |
333 |
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo)) |
|
334 |
$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++)) |
|
335 |
$(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
336 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
337 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
338 |
|
25859 | 339 |
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: \ |
340 |
$(JDK_TOPDIR)/src/demo/share/jpda/com/sun/tools/example/README |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
341 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
342 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
343 |
|
25859 | 344 |
$(eval $(call SetupArchive,JPDA_JAR, \ |
345 |
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README, \ |
|
346 |
SRCS := $(JDK_TOPDIR)/src/demo/share/jpda \ |
|
347 |
$(JDK_TOPDIR)/src/jdk.jdi/share/classes \ |
|
348 |
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example, \ |
|
349 |
INCLUDES := com/sun/tools/example README, \ |
|
350 |
SUFFIXES := .java .html .jj README, \ |
|
351 |
JAR := $(JDK_OUTPUTDIR)/demo/jpda/examples.jar, \ |
|
352 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \ |
|
353 |
EXTRA_MANIFEST_ATTR := Main-Class:$$(SPACE), \ |
|
354 |
SKIP_METAINF := true)) |
|
355 |
||
356 |
$(eval $(call SetupZipArchive,JPDA_ZIP, \ |
|
357 |
SRC := $(JDK_TOPDIR)/src/demo/share/jpda \ |
|
358 |
$(JDK_TOPDIR)/src/jdk.jdi/share/classes, \ |
|
359 |
INCLUDES := com/sun/tools/example, \ |
|
360 |
SUFFIXES := .java .html .jj README, \ |
|
361 |
ZIP := $(JDK_OUTPUTDIR)/demo/jpda/src.zip)) |
|
362 |
||
363 |
BUILD_DEMOS += $(JPDA_JAR) $(JPDA_ZIP) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
364 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
365 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
366 |
|
25859 | 367 |
$(JDK_OUTPUTDIR)/demo/management/index.html: $(DEMO_SHARE_SRC)/management/index.html |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
368 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
369 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
370 |
|
25859 | 371 |
$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
372 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
373 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
374 |
|
13702 | 375 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \ |
20547 | 376 |
$(JDK_OUTPUTDIR)/demo/jvmti/index.html |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
377 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
378 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
379 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
380 |
# The netbeans project files are copied into the demo directory. |
22067
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
381 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
25859 | 382 |
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \ |
22067
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
383 |
$(JDK_OUTPUTDIR)/demo/nbproject/%, \ |
25859 | 384 |
$(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \ |
385 |
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))) |
|
22067
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
386 |
else |
25859 | 387 |
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \ |
20547 | 388 |
$(JDK_OUTPUTDIR)/demo/nbproject/%, \ |
25859 | 389 |
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)) |
22067
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
390 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
391 |
|
25859 | 392 |
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/% |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
393 |
$(call install-file) |
12892 | 394 |
$(CHMOD) -f ug+w $@ |
395 |
||
396 |
################################################################################################## |
|
397 |
||
25859 | 398 |
$(JDK_OUTPUTDIR)/demo/README: $(DEMO_SHARE_SRC)/README |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
399 |
$(call install-file) |
12892 | 400 |
|
13702 | 401 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
402 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
403 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
404 |
|
13164 | 405 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
12892 | 406 |
|
25859 | 407 |
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/% |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
408 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
409 |
$(CHMOD) -f ug+w $@ |
12892 | 410 |
|
25859 | 411 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
412 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
413 |
$(CHMOD) -f ug+w $@ |
12892 | 414 |
|
20547 | 415 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar: \ |
416 |
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c |
|
12892 | 417 |
|
20547 | 418 |
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \ |
419 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
25859 | 420 |
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \ |
20547 | 421 |
BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
422 |
HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
423 |
JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \ |
|
21805 | 424 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \ |
20547 | 425 |
SRCZIP := $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \ |
426 |
COPY := README.txt Poller.c, \ |
|
427 |
JARMAIN := Client)) |
|
12892 | 428 |
|
429 |
||
430 |
||
20547 | 431 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \ |
432 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt |
|
12892 | 433 |
|
20547 | 434 |
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \ |
25859 | 435 |
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \ |
20547 | 436 |
LANG := C, \ |
437 |
OPTIMIZATION := LOW, \ |
|
438 |
CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \ |
|
439 |
-I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
440 |
LDFLAGS := $(LDFLAGS_JDKLIB), \ |
|
441 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
442 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jni/Poller, \ |
|
443 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/demoobjs, \ |
|
444 |
LIBRARY := Poller)) |
|
12892 | 445 |
|
20547 | 446 |
# |
447 |
# We can only compile native code after jar has been build (since we depend on generated .h files) |
|
448 |
# |
|
449 |
$(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o: $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar |
|
12892 | 450 |
|
20547 | 451 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \ |
452 |
$(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
453 |
$(call install-file) |
12892 | 454 |
|
20547 | 455 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) |
12892 | 456 |
|
457 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
458 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
459 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
460 |
|
12892 | 461 |
ifndef OPENJDK |
25859 | 462 |
DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db) |
463 |
DB_DEMO_ZIPFILE := $(wildcard $(DB_ZIP_DIR)/*.zip) |
|
12892 | 464 |
|
20547 | 465 |
$(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE) |
12892 | 466 |
$(MKDIR) -p $(@D) |
13702 | 467 |
$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo |
14231 | 468 |
$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $< |
17428 | 469 |
$(MV) $(JDK_OUTPUTDIR)/demo/db-derby-*-bin/demo $(JDK_OUTPUTDIR)/demo/db |
470 |
$(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin |
|
12892 | 471 |
$(TOUCH) $@ |
472 |
||
20547 | 473 |
# Copy this after the unzip above to avoid race with directory creation and mv command. |
474 |
$(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \ |
|
25859 | 475 |
$(DB_ZIP_DIR)/README-JDK-DEMOS.html \ |
20547 | 476 |
| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped |
17428 | 477 |
$(MKDIR) -p $(@D) |
25859 | 478 |
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@ |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
479 |
|
20547 | 480 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html |
12892 | 481 |
endif |
482 |
||
483 |
################################################################################################## |
|
484 |
||
485 |
all: $(BUILD_DEMOS) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
486 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
487 |
.PHONY: all |