hotspot/make/ide/CreateVSProject.gmk
author lana
Thu, 23 Feb 2017 17:57:07 +0000
changeset 43896 7def1842c506
parent 43424 5c5d1360b2d3
child 43972 1ade39b8381b
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
43424
5c5d1360b2d3 8168137: import-hotspot build target not removed from hotspot-ide-project
ctornqvi
parents: 38097
diff changeset
     2
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     4
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    10
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    15
# accompanied this code).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    16
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    20
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    23
# questions.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    24
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    25
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    26
# This must be the first rule
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
default: all
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
include $(SPEC)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
include MakeBase.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
include JavaCompilation.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
include SetupJavaCompilers.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    34
ifeq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    35
  # The next part is a bit hacky. We include the CompileJvm.gmk to be
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
  # able to extact flags, but we do not wish to execute the rules.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    38
  # Use client as base for defines and includes
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
  JVM_VARIANT=client
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    41
  include HotspotCommon.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    42
  include lib/CompileJvm.gmk
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    44
  # Reset targets so we don't build libjvm.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
  TARGETS :=
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    46
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    47
  # Helper macro to convert a unix path to a Windows path, suitable for
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
  # inclusion in a command line.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
  FixPath = \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
    $(strip $(subst \,\\,$(shell $(CYGPATH) -w $1)))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    52
  JVM_DEFINES_client := $(patsubst -D%,%, $(filter -D%, $(JVM_CFLAGS)))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
  EXTRACTED_DEFINES_client := $(addprefix -define , $(JVM_DEFINES_client))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
  JVM_INCLUDES_client := $(patsubst -I%,%, $(filter -I%, $(JVM_CFLAGS)))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
  EXTRACTED_INCLUDES_client := $(foreach path, $(JVM_INCLUDES_client), -absoluteInclude $(call FixPath, $(path)))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
  # Hand-code variant-specific arguments, based on the fact that we use
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
  # client for general arguments. Not optimal but other solutions require
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
  # major changes in ProjectCreator.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
  ADDITIONAL_VARIANT_ARGS := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
      -define_server COMPILER2 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
      -ignorePath_client adfiles \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
      -ignorePath_client c2_ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
      -ignorePath_client runtime_ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
      -ignorePath_client libadt \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
      -ignorePath_client opto \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
      #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
  IGNORED_PLATFORMS_ARGS := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
    -ignorePath aarch64 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
    -ignorePath aix \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
    -ignorePath arm \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
    -ignorePath bsd \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
    -ignorePath linux \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
    -ignorePath posix \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
    -ignorePath ppc \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
    -ignorePath shark \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
    -ignorePath solaris \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
    -ignorePath sparc \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
    -ignorePath x86_32 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
    -ignorePath zero \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
      #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  ################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
  # Build the ProjectCreator java tool.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
  TOOLS_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/support/tools_classes
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
  $(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
      SETUP := GENERATE_OLDBYTECODE, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
      ADD_JAVAC_FLAGS := -Xlint:-auxiliaryclass, \
38097
1ca3d6f508b1 8150601: Remove the old Hotspot build system
erikj
parents: 37437
diff changeset
    93
      SRC := $(HOTSPOT_TOPDIR)/make/src/classes, \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
      BIN := $(TOOLS_OUTPUTDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
  TARGETS += $(BUILD_PROJECT_CREATOR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
  # Run the ProjectCreator tool
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
  PROJECT_CREATOR_TOOL := $(JAVA_SMALL) -cp $(TOOLS_OUTPUTDIR) build.tools.projectcreator.ProjectCreator
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
  IDE_OUTPUTDIR := $(BUILD_OUTPUT)/ide/hotspot-visualstudio
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
  VCPROJ_FILE := $(IDE_OUTPUTDIR)/jvm.vcxproj
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
  PROJECT_CREATOR_CLASS := build.tools.projectcreator.WinGammaPlatformVC10
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
  # We hard-code gensrc dir to server (since this includes adfiles)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
  PROJECT_CREATOR_ARGS := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
      -sourceBase $(call FixPath, $(HOTSPOT_TOPDIR)) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
      -startAt src \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
      -relativeSrcInclude src \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
      -hidePath .hg \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
      -hidePath .jcheck \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
      -hidePath jdk.hotspot.agent \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
      -hidePath jdk.vm.ci \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
      -hidePath jdk.jfr \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
      -compiler VC10 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
      -jdkTargetRoot $(call FixPath, $(JDK_OUTPUTDIR)) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
      -platformName x64 \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
      -buildBase $(call FixPath, $(IDE_OUTPUTDIR)/vs-output) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
      -buildSpace $(call FixPath, $(IDE_OUTPUTDIR)) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
      -makeBinary $(call FixPath, $(MAKE)) \
43424
5c5d1360b2d3 8168137: import-hotspot build target not removed from hotspot-ide-project
ctornqvi
parents: 38097
diff changeset
   124
      -makeOutput $(call FixPath, $(JDK_OUTPUTDIR)/bin/server) \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
      -absoluteInclude $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
      -absoluteSrcInclude $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
      $(EXTRACTED_DEFINES_client) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
      $(EXTRACTED_INCLUDES_client) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
      $(ADDITIONAL_VARIANT_ARGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
      $(IGNORED_PLATFORMS_ARGS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
      #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
  VCPROJ_VARDEPS := $(PROJECT_CREATOR_CLASS) $(PROJECT_CREATOR_ARGS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
  VCPROJ_VARDEPS_FILE := $(call DependOnVariable, VCPROJ_VARDEPS, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
    $(VCPROJ_FILE).vardeps)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
  $(VCPROJ_FILE): $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
	$(call MakeDir, $(@D))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
	$(call ExecuteWithLog, $@, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
	    $(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
	    $(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $@)) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
	    $(LOG_INFO)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
  TARGETS += $(VCPROJ_FILE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
  all: $(TARGETS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
  all:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
	$(info Hotspot Visual Studio generation only supported on Windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
.PHONY: all