duke@435: # coleenp@4148: # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. coleenp@4148: # Copyright (c) 2012 Red Hat, Inc. duke@435: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: # duke@435: # This code is free software; you can redistribute it and/or modify it duke@435: # under the terms of the GNU General Public License version 2 only, as duke@435: # published by the Free Software Foundation. duke@435: # duke@435: # This code is distributed in the hope that it will be useful, but WITHOUT duke@435: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: # version 2 for more details (a copy is included in the LICENSE file that duke@435: # accompanied this code). duke@435: # duke@435: # You should have received a copy of the GNU General Public License version duke@435: # 2 along with this work; if not, write to the Free Software Foundation, duke@435: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: # trims@1907: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: # or visit www.oracle.com if you need additional information or have any trims@1907: # questions. duke@435: # duke@435: # duke@435: duke@435: # Linux does not build jvm_db duke@435: LIBJVM_DB = duke@435: coleenp@4148: # Only OPENJDK builds test and support SDT probes currently. coleenp@4148: ifndef OPENJDK coleenp@4148: REASON = "This JDK does not support SDT probes" coleenp@4148: else coleenp@4148: coleenp@4148: # We need a recent GCC for the default coleenp@4148: ifeq "$(shell expr \( $(CC_VER_MAJOR) \>= 4 \) \& \( $(CC_VER_MINOR) \>= 4 \) )" "0" coleenp@4148: REASON = "gcc version is too old" coleenp@4148: else coleenp@4148: coleenp@4148: # But it does have a SystemTap dtrace compatible sys/sdt.h coleenp@4148: ifneq ($(ALT_SDT_H),) coleenp@4148: SDT_H_FILE = $(ALT_SDT_H) coleenp@4148: else coleenp@4148: SDT_H_FILE = /usr/include/sys/sdt.h coleenp@4148: endif coleenp@4148: DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE)) coleenp@4148: REASON = "$(SDT_H_FILE) not found" coleenp@4148: coleenp@4148: ifneq ($(DTRACE_ENABLED),) coleenp@4148: CFLAGS += -DDTRACE_ENABLED coleenp@4148: endif coleenp@4148: coleenp@4148: endif coleenp@4148: endif coleenp@4148: coleenp@4148: # Phony target used in vm.make build target to check whether enabled. coleenp@4148: .PHONY: dtraceCheck coleenp@4148: ifeq ($(DTRACE_ENABLED),) coleenp@4148: dtraceCheck: coleenp@4148: $(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)" coleenp@4148: else coleenp@4148: dtraceCheck: coleenp@4148: endif coleenp@4148: coleenp@4148: # It doesn't support HAVE_DTRACE_H though. coleenp@4148: