jdk/make/launcher/Launcher-java.base.gmk
author mbaesken
Tue, 14 Feb 2017 16:56:12 +0100
changeset 43890 b7f6e347bda2
parent 43618 6ad08a95d2db
permissions -rw-r--r--
8174242: simplify jexec build settings Reviewed-by: erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
43616
3b2cfa35d931 8173834: cleanup macosx jspawnhelper build settings
mbaesken
parents: 42753
diff changeset
     2
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     4
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    10
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    15
# accompanied this code).
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    16
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    20
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    23
# questions.
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    24
#
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    25
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    26
include LauncherCommon.gmk
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    27
39504
96c700e62710 8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents: 37905
diff changeset
    28
$(eval $(call IncludeCustomExtension, jdk, launcher/Launcher-java.base.gmk))
96c700e62710 8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents: 37905
diff changeset
    29
37905
2145d16bd92d 8156837: RC resource compilation on windows generates false build failure reports
erikj
parents: 35276
diff changeset
    30
JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/common
39504
96c700e62710 8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents: 37905
diff changeset
    31
JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons
33523
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    32
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    34
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    35
# On windows, the debuginfo files get the same name as for java.dll. Build
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    36
# into another dir and copy selectively so debuginfo for java.dll isn't
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
# overwritten.
33523
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    38
$(eval $(call SetupBuildLauncher, java, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    39
    CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    40
    LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR), \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    41
    LIBS_windows := user32.lib comctl32.lib, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    42
    RC_FLAGS := $(JAVA_RC_FLAGS), \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    43
    VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    44
    OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    45
    OPTIMIZATION := HIGH, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    46
    WINDOWS_STATIC_LINK := true, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    47
    NO_JAVA_MS := true, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    48
))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    49
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    50
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    51
	$(MKDIR) -p $(@D)
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    52
	$(RM) $@
33523
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    53
	$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    54
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    55
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    57
ifeq ($(OPENJDK_TARGET_OS), windows)
33523
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    58
  $(eval $(call SetupBuildLauncher, javaw, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    59
      CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    60
      LIBS_windows := user32.lib comctl32.lib, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    61
      RC_FLAGS := $(JAVA_RC_FLAGS), \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    62
      VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    63
      WINDOWS_STATIC_LINK := true, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    64
      NO_JAVA_MS := true, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    65
  ))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    66
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    67
33523
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    68
$(eval $(call SetupBuildLauncher, keytool, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    69
    MAIN_CLASS := sun.security.tools.keytool.Main, \
eb067bcd9414 8141444: Clean up building of JDK launchers
ihse
parents: 33406
diff changeset
    70
))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    71
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    72
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    73
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    74
ifeq ($(OPENJDK_TARGET_OS), linux)
43890
b7f6e347bda2 8174242: simplify jexec build settings
mbaesken
parents: 43618
diff changeset
    75
  $(eval $(call SetupNativeCompilation, BUILD_JEXEC, \
b7f6e347bda2 8174242: simplify jexec build settings
mbaesken
parents: 43618
diff changeset
    76
      SRC := $(JDK_TOPDIR)/src/$(MODULE)/unix/native/launcher, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    77
      INCLUDE_FILES := jexec.c, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    78
      OPTIMIZATION := LOW, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    79
      CFLAGS := $(CFLAGS_JDKEXE) \
43890
b7f6e347bda2 8174242: simplify jexec build settings
mbaesken
parents: 43618
diff changeset
    80
          -I$(JDK_TOPDIR)/src/$(MODULE)/share/native/libjli, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    81
      CFLAGS_linux := -fPIC, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    82
      CFLAGS_solaris := -KPIC, \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33523
diff changeset
    83
      LDFLAGS := $(LDFLAGS_JDKEXE), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    84
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
43890
b7f6e347bda2 8174242: simplify jexec build settings
mbaesken
parents: 43618
diff changeset
    85
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
b7f6e347bda2 8174242: simplify jexec build settings
mbaesken
parents: 43618
diff changeset
    86
      PROGRAM := jexec, \
b7f6e347bda2 8174242: simplify jexec build settings
mbaesken
parents: 43618
diff changeset
    87
  ))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    88
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
    89
  TARGETS += $(BUILD_JEXEC)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    90
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    91
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    92
################################################################################
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    93
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    94
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
43618
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
    95
  $(eval $(call SetupNativeCompilation, BUILD_JSPAWNHELPER, \
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
    96
      SRC := $(JDK_TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
    97
      OPTIMIZATION := LOW, \
43618
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
    98
      CFLAGS := $(CFLAGS_JDKEXE) -I$(JDK_TOPDIR)/src/$(MODULE)/unix/native/libjava, \
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
    99
      EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o, \
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
   100
      LDFLAGS := $(LDFLAGS_JDKEXE), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   101
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
43618
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
   102
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
   103
      PROGRAM := jspawnhelper, \
6ad08a95d2db 8174086: jspawnhelper build settings cleanup
mbaesken
parents: 43616
diff changeset
   104
  ))
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   105
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 25859
diff changeset
   106
  TARGETS += $(BUILD_JSPAWNHELPER)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   107
endif
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   108
3317bb8137f4 8054834: Modular Source Code
chegar
parents:
diff changeset
   109
################################################################################