# @(#)GNUmakefile	1.4 98/08/19

BUILDDIR = ../..
include $(BUILDDIR)/Platform.gmk
LIBRARY = hprof
PRODUCT = sun
include $(BUILDDIR)/makefiles/Defs.gmk

#
# Files to compile.
#
include $(MINCLUDES)java_hprof.cmk

OTHER_INCLUDES = -I$(PLATFORM_SRC)/tools/hprof \
	         -I$(SHARE_SRC)/tools/hprof

LIBSOCKET = -lsocket
OTHER_LDLIBS = $(LIBSOCKET) -lnsl -ldl

#
# Tell library.gmk to copy the txt file first
#
INIT = $(LIBDIR)/jvm.hprof.txt

#
# Library to compile.
#
include $(BUILDDIR)/makefiles/Library.gmk

# We don't want to link against -ljava
LDLIBS_OPT = 
LDLIBS_DBG = 

#
# Add to ambient vpath so we pick up the library files
#
vpath %.c $(SHARE_SRC)/tools/hprof:$(PLATFORM_SRC)/tools/hprof

#
# Install the hprof prelude
#
$(LIBDIR)/jvm.hprof.txt: $(SHARE_SRC)/tools/hprof/jvm.hprof.txt
	-$(RM) $@
	cp $< $@

clean:: FORCE
	$(RM) $(LIBDIR)/jvm.hprof.txt
