author | mchung |
Wed, 09 Mar 2011 23:11:07 -0800 | |
changeset 8583 | 15dea0fdc2ea |
parent 7668 | d4a77089c587 |
child 9035 | 1255eb81cc2f |
permissions | -rw-r--r-- |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
1 |
# |
7668 | 2 |
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
4 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
10 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
15 |
# accompanied this code). |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
16 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
20 |
# |
5506 | 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. |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
24 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
25 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
26 |
BUILDDIR = ../../.. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
27 |
PRODUCT = java |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
28 |
include $(BUILDDIR)/common/Defs.gmk |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
29 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
30 |
ifeq ($(PLATFORM), windows) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
31 |
LIB_LOCATION = $(BINDIR) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
32 |
else |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
33 |
LIB_LOCATION = $(LIBDIR)/$(LIBARCH) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
34 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
35 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
36 |
# INCLUDE_SA is false on platforms where SA is not supported. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
37 |
# On platforms where it is supported, we want to allow it to |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
38 |
# not be present, at least temporarily. So, |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
39 |
# if the SA files (well, just sa-jdi.jar) do not exist |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
40 |
# in the HOTSPOT_IMPORT_PATH, then we won't build SA. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
41 |
SA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
42 |
$(ECHO) true; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
43 |
else \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
44 |
$(ECHO) false; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
45 |
fi) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
46 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
47 |
ifeq ($(SA_EXISTS), false) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
48 |
INCLUDE_SA := false |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
49 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
50 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
51 |
IMPORT_LIST = |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
52 |
ifeq ($(INCLUDE_SA), true) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
53 |
IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
54 |
$(LIB_LOCATION)/$(SALIB_NAME) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
55 |
ifeq ($(PLATFORM), windows) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
56 |
IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
57 |
$(LIB_LOCATION)/$(SAPDB_NAME) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
58 |
endif |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
59 |
endif # INCLUDE_SA |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
60 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
61 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
62 |
ifeq ($(INCLUDE_SA), true) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
63 |
# The Serviceability Agent is built in the Hotspot workspace. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
64 |
# It contains two files: |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
65 |
# - sa-jdi.jar: This goes into the same dir as tools.jar. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
66 |
# - a shared library: sawindbg.dll on windows / libproc.sa on unix |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
67 |
# This goes into the same dir as the other |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
68 |
# shared libs, eg. libjdwp.so. |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
69 |
$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
70 |
$(install-importonly-file) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
71 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
72 |
$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
73 |
$(install-import-file) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
74 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
75 |
ifeq ($(PLATFORM), windows) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
76 |
$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
77 |
$(install-import-file) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
78 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
79 |
$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
80 |
$(install-import-file) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
81 |
endif # windows |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
82 |
endif # INCLUDE_SA |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
83 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
84 |
all: $(IMPORT_LIST) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
85 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
diff
changeset
|
86 |
clean clobber:: |