Makefile revision 0
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# This code is free software; you can redistribute it and/or modify it
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# under the terms of the GNU General Public License version 2 only, as
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# published by the Free Software Foundation. Sun designates this
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# particular file as subject to the "Classpath" exception as provided
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# by Sun in the LICENSE file that accompanied this code.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# This code is distributed in the hope that it will be useful, but WITHOUT
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# version 2 for more details (a copy is included in the LICENSE file that
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# accompanied this code).
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# You should have received a copy of the GNU General Public License version
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# 2 along with this work; if not, write to the Free Software Foundation,
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# CA 95054 USA or visit www.sun.com if you need additional information or
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# have any questions.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncBUILDDIR = ../..
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncLIBRARY = hprof
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncPRODUCT = sun
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncLIBRARY_OUTPUT = hprof_jvmti
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Configure the CFLAGS for this library.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncFILES_m = mapfile-vers
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncinclude $(BUILDDIR)/common/Defs.gmk
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync_OPT=$(CC_HIGHEST_OPT)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncSRCDIR=$(SHARE_SRC)/demo/jvmti/hprof
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncPSRCDIR=$(PLATFORM_SRC)/demo/jvmti/hprof
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Use the mapfile-vers (See the mapfile located with this Makefile)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifdef FILES_m
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncinclude $(BUILDDIR)/common/Mapfile-vers.gmk
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Files to compile.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncFILES_c = \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync debug_malloc.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_blocks.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_check.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_class.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_cpu.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_error.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_event.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_frame.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_init.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_io.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_ioname.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_listener.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_loader.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_md.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_monitor.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_object.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_reference.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_site.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_stack.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_string.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_table.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_tag.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_tls.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_trace.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_tracker.c \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync hprof_util.c
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncOTHER_INCLUDES = -I$(SRCDIR) \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync -I$(SHARE_SRC)/npt \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync -I$(PLATFORM_SRC)/npt \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync -I$(SHARE_SRC)/demo/jvmti/java_crw_demo
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(PLATFORM), windows)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync OTHER_LDLIBS += wsock32.lib winmm.lib
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Tell library.gmk to copy the txt file first
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncINIT += $(LIBDIR)/jvm.hprof.txt
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# This removes all asserts in the optimized version
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncCPPFLAGS_OPT += -DNDEBUG
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# This puts logging code in
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncCPPFLAGS_DBG += -DHPROF_LOGGING
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Library to compile.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncinclude $(BUILDDIR)/common/Library.gmk
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# We don't want to link against -ljava
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncJAVALIB=
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Add to ambient vpath so we pick up the library files
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncvpath %.c $(SRCDIR):$(PSRCDIR)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Install the hprof prelude
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync$(LIBDIR)/jvm.hprof.txt: $(SRCDIR)/jvm.hprof.txt
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(install-file)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncclean clobber::
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(RM) $(LIBDIR)/jvm.hprof.txt
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync