1 #
   2 # Copyright (c) 2014, 2015, 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.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #
  23 #
  24 
  25 include $(GAMMADIR)/make/altsrc.make
  26 
  27 ifeq ($(INCLUDE_JVMTI), false)
  28       CXXFLAGS += -DINCLUDE_JVMTI=0
  29       CFLAGS += -DINCLUDE_JVMTI=0
  30 
  31       Src_Files_EXCLUDE += jvmtiGetLoadedClasses.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
  32         jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
  33         jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
  34         jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \
  35         jvmtiClassFileReconstituter.cpp
  36 endif
  37 
  38 ifeq ($(INCLUDE_FPROF), false)
  39       CXXFLAGS += -DINCLUDE_FPROF=0
  40       CFLAGS += -DINCLUDE_FPROF=0
  41 
  42       Src_Files_EXCLUDE += fprofiler.cpp
  43 endif
  44 
  45 ifeq ($(INCLUDE_VM_STRUCTS), false)
  46       CXXFLAGS += -DINCLUDE_VM_STRUCTS=0
  47       CFLAGS += -DINCLUDE_VM_STRUCTS=0
  48 
  49       Src_Files_EXCLUDE += vmStructs.cpp
  50 endif
  51 
  52 ifeq ($(INCLUDE_JNI_CHECK), false)
  53       CXXFLAGS += -DINCLUDE_JNI_CHECK=0
  54       CFLAGS += -DINCLUDE_JNI_CHECK=0
  55 
  56       Src_Files_EXCLUDE += jniCheck.cpp
  57 endif
  58 
  59 ifeq ($(INCLUDE_SERVICES), false)
  60       CXXFLAGS += -DINCLUDE_SERVICES=0
  61       CFLAGS += -DINCLUDE_SERVICES=0
  62 
  63       Src_Files_EXCLUDE += heapDumper.cpp heapInspection.cpp \
  64         attachListener_linux.cpp attachListener.cpp
  65 endif
  66 
  67 ifeq ($(INCLUDE_MANAGEMENT), false)
  68       CXXFLAGS += -DINCLUDE_MANAGEMENT=0
  69       CFLAGS += -DINCLUDE_MANAGEMENT=0
  70 endif
  71 
  72 ifeq ($(INCLUDE_CDS), false)
  73       CXXFLAGS += -DINCLUDE_CDS=0
  74       CFLAGS += -DINCLUDE_CDS=0
  75 
  76       Src_Files_EXCLUDE += classListParser.cpp classLoaderExt.cpp \
  77         filemap.cpp metaspaceShared*.cpp sharedClassUtil.cpp sharedPathsMiscInfo.cpp \
  78         systemDictionaryShared.cpp
  79 endif
  80 
  81 ifeq ($(INCLUDE_ALL_GCS), false)
  82       CXXFLAGS += -DINCLUDE_ALL_GCS=0
  83       CFLAGS += -DINCLUDE_ALL_GCS=0
  84 
  85       gc_dir := $(HS_COMMON_SRC)/share/vm/gc
  86       gc_dir_alt := $(HS_ALT_SRC)/share/vm/gc
  87       gc_subdirs := cms g1 parallel
  88       gc_exclude := $(foreach gc,$(gc_subdirs),                         \
  89                      $(notdir $(wildcard $(gc_dir)/$(gc)/*.cpp))        \
  90                      $(notdir $(wildcard $(gc_dir_alt)/$(gc)/*.cpp)))
  91       Src_Files_EXCLUDE += $(gc_exclude)                                \
  92         concurrentGCThread.cpp                                          \
  93         plab.cpp
  94 
  95       # src/share/vm/services
  96       Src_Files_EXCLUDE +=                                              \
  97         g1MemoryPool.cpp                                                \
  98         psMemoryPool.cpp
  99 endif
 100 
 101 ifeq ($(INCLUDE_NMT), false)
 102       CXXFLAGS += -DINCLUDE_NMT=0
 103       CFLAGS += -DINCLUDE_NMT=0
 104 
 105       Src_Files_EXCLUDE += \
 106          memBaseline.cpp memReporter.cpp mallocTracker.cpp virtualMemoryTracker.cpp nmtCommon.cpp \
 107          memTracker.cpp nmtDCmd.cpp mallocSiteTable.cpp
 108 endif
 109 
 110 ifneq (,$(findstring $(Platform_arch_model), aarch64, arm_64, sparc, x86_64))
 111       # JVMCI is supported
 112 else
 113       INCLUDE_JVMCI := false
 114 endif
 115 
 116 ifeq ($(INCLUDE_JVMCI), false)
 117       CXXFLAGS += -DINCLUDE_JVMCI=0
 118       CFLAGS += -DINCLUDE_JVMCI=0
 119 
 120       jvmci_dir := $(HS_COMMON_SRC)/share/vm/jvmci
 121       jvmci_dir_alt := $(HS_ALT_SRC)/share/vm/jvmci
 122       jvmci_exclude := $(notdir $(wildcard $(jvmci_dir)/*.cpp)) \
 123                         $(notdir $(wildcard $(jvmci_dir_alt)/*.cpp))
 124       Src_Files_EXCLUDE += $(jvmci_exclude) \
 125         jvmciCodeInstaller_aarch64.cpp jvmciCodeInstaller_ppc.cpp jvmciCodeInstaller_sparc.cpp \
 126         jvmciCodeInstaller_x86.cpp
 127 endif
 128 
 129 -include $(HS_ALT_MAKE)/excludeSrc.make
 130 
 131 .PHONY: $(HS_ALT_MAKE)/excludeSrc.make