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