blob: 5a538c9dd5feb17a073b4bf4457b1387dd318048 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
2# Copyright 2000-2005 Sun Microsystems, Inc. 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. Sun designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22# CA 95054 USA or visit www.sun.com if you need additional information or
23# have any questions.
24#
25
26#
27# Makefile for building JDWP
28#
29
30BUILDDIR = ../..
31PACKAGE = com.sun.tools.jdwp
32PRODUCT = jpda
33include $(BUILDDIR)/common/Defs.gmk
34
35#
36# Where do generated Java source files go?
37#
38JAVA_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#
46C_SRC_DEST_DIR = $(GENNATIVESRCDIR)/jdwp
47
48JDIPKGDIR = com/sun/tools/jdi
49GEN_JDWP_JAVA_DIR = $(JAVA_SRC_DEST_DIR)/$(JDIPKGDIR)
50GEN_JDWP_JAVA = $(GEN_JDWP_JAVA_DIR)/JDWP.java
51GEN_JDWP_C = $(C_SRC_DEST_DIR)/JDWPCommands.h
52
53JDWP_SPEC = $(BUILDDIR)/jpda/jdwp/jdwp.spec
54JDWPGEN_JARFILE = $(BUILDTOOLJARDIR)/jdwpgen.jar
55
56build: $(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#
69clean clobber::
70 $(RM) -r $(C_SRC_DEST_DIR)
71 $(RM) -r $(JAVA_SRC_DEST_DIR)/$(JDIPKGDIR)
72
73#
74# Rules
75#
76include $(BUILDDIR)/common/Rules.gmk
77