| 1 | #
|
|---|
| 2 | # Copyright (c) 2000, 2005, 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 |
|
|---|
| 26 | #
|
|---|
| 27 | # Makefile for building JDWP
|
|---|
| 28 | #
|
|---|
| 29 |
|
|---|
| 30 | BUILDDIR = ../..
|
|---|
| 31 | PACKAGE = com.sun.tools.jdwp
|
|---|
| 32 | PRODUCT = jpda
|
|---|
| 33 | include $(BUILDDIR)/common/Defs.gmk
|
|---|
| 34 |
|
|---|
| 35 | #
|
|---|
| 36 | # Where do generated Java source files go?
|
|---|
| 37 | #
|
|---|
| 38 | JAVA_SRC_DEST_DIR = $(GENSRCDIR)
|
|---|
| 39 |
|
|---|
| 40 | #
|
|---|
| 41 | # Where do generated C source files go?
|
|---|
| 42 | # the jdwp build is what needs the generated C files
|
|---|
| 43 | # so they are being placed there for automatic pickup by
|
|---|
| 44 | # the value of GENNATIVESRCDIR when jdwp is being built.
|
|---|
| 45 | #
|
|---|
| 46 | C_SRC_DEST_DIR = $(GENNATIVESRCDIR)/jdwp
|
|---|
| 47 |
|
|---|
| 48 | JDIPKGDIR = com/sun/tools/jdi
|
|---|
| 49 | GEN_JDWP_JAVA_DIR = $(JAVA_SRC_DEST_DIR)/$(JDIPKGDIR)
|
|---|
| 50 | GEN_JDWP_JAVA = $(GEN_JDWP_JAVA_DIR)/JDWP.java
|
|---|
| 51 | GEN_JDWP_C = $(C_SRC_DEST_DIR)/JDWPCommands.h
|
|---|
| 52 |
|
|---|
| 53 | JDWP_SPEC = $(BUILDDIR)/jpda/jdwp/jdwp.spec
|
|---|
| 54 | JDWPGEN_JARFILE = $(BUILDTOOLJARDIR)/jdwpgen.jar
|
|---|
| 55 |
|
|---|
| 56 | build: $(GEN_JDWP_JAVA) $(GEN_JDWP_C)
|
|---|
| 57 |
|
|---|
| 58 | $(GEN_JDWP_JAVA) $(GEN_JDWP_C): $(JDWP_SPEC) $(JDWPGEN_JARFILE)
|
|---|
| 59 | $(MKDIR) -p $(GEN_JDWP_JAVA_DIR)
|
|---|
| 60 | $(MKDIR) -p $(C_SRC_DEST_DIR)
|
|---|
| 61 | $(BOOT_JAVA_CMD) -jar $(JDWPGEN_JARFILE) $(JDWP_SPEC) \
|
|---|
| 62 | -jdi $(GEN_JDWP_JAVA) \
|
|---|
| 63 | -include $(GEN_JDWP_C)
|
|---|
| 64 | @$(java-vm-cleanup)
|
|---|
| 65 |
|
|---|
| 66 | #
|
|---|
| 67 | # Extra clean.
|
|---|
| 68 | #
|
|---|
| 69 | clean clobber::
|
|---|
| 70 | $(RM) -r $(C_SRC_DEST_DIR)
|
|---|
| 71 | $(RM) -r $(JAVA_SRC_DEST_DIR)/$(JDIPKGDIR)
|
|---|
| 72 |
|
|---|
| 73 | #
|
|---|
| 74 | # Rules
|
|---|
| 75 | #
|
|---|
| 76 | include $(BUILDDIR)/common/Rules.gmk
|
|---|
| 77 |
|
|---|