make/lib/Lib-jdk.jpackage.gmk
author herrick
Wed, 06 Feb 2019 09:10:12 -0500
branchJDK-8200758-branch
changeset 57151 38d0b67617e3
parent 57108 f1c13cb0e713
child 57254 c1b92a014e89
permissions -rw-r--r--
8217317: Create jpackage native library for windows Submitten-by: almatvee Reviewed-by: herrick, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     1
#
57106
ea870b9ce89a 8216492: Update copyright of all new jpackage fils to 2019
kcr
parents: 57064
diff changeset
     2
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     4
#
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    10
#
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    15
# accompanied this code).
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    16
#
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    20
#
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    23
# questions.
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    24
#
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    25
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    26
include LibCommon.gmk
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    27
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    28
################################################################################
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    29
57064
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    30
# Output app launcher library in resources dir, and symbols in the object dir
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    31
$(eval $(call SetupJdkLibrary, BUILD_LIB_APPLAUNCHER, \
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    32
    NAME := applauncher, \
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    33
    OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources, \
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    34
    SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libapplauncher, \
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    35
    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    36
    OPTIMIZATION := LOW, \
57054
32d2b2d2d353 8213747: Makefile Improvements to Lib-jdk.packager.gmk
herrick
parents: 57039
diff changeset
    37
    CFLAGS := $(CXXFLAGS_JDKLIB), \
57027
124983f48645 8212936: Makefile and other improvements for jpackager
herrick
parents: 57017
diff changeset
    38
    CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    39
    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    40
        $(call SET_SHARED_LIBRARY_ORIGIN), \
56885
4c56efca06ca 8210438: [Linux] jpackager fails to build with older compilers
herrick
parents: 56821
diff changeset
    41
    LIBS := $(LIBCXX), \
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    42
    LIBS_windows := user32.lib shell32.lib advapi32.lib ole32.lib, \
56885
4c56efca06ca 8210438: [Linux] jpackager fails to build with older compilers
herrick
parents: 56821
diff changeset
    43
    LIBS_linux := -ldl -lpthread, \
4c56efca06ca 8210438: [Linux] jpackager fails to build with older compilers
herrick
parents: 56821
diff changeset
    44
    LIBS_macosx := -ldl -framework Cocoa, \
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    45
))
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    46
57064
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    47
$(BUILD_LIB_APPLAUNCHER): $(call FindLib, java.base, java)
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    48
57064
a7fdadf67a92 8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents: 57059
diff changeset
    49
TARGETS += $(BUILD_LIB_APPLAUNCHER)
56821
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    50
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    51
################################################################################
565d54ca1f41 8206005: Move prototype jpackager from closed sandbox to open sandbox
herrick
parents:
diff changeset
    52
57151
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    53
ifeq ($(OPENJDK_TARGET_OS), windows)
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    54
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    55
  $(eval $(call SetupJdkLibrary, BUILD_LIB_JPACKAGE, \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    56
      NAME := jpackage, \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    57
      OPTIMIZATION := LOW, \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    58
      CFLAGS := $(CXXFLAGS_JDKLIB), \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    59
      CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    60
      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    61
          $(call SET_SHARED_LIBRARY_ORIGIN), \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    62
      LIBS := $(LIBCXX), \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    63
      LIBS_windows := user32.lib shell32.lib advapi32.lib ole32.lib, \
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    64
  ))
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    65
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    66
  TARGETS += $(BUILD_LIB_JPACKAGE)
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    67
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    68
endif
38d0b67617e3 8217317: Create jpackage native library for windows
herrick
parents: 57108
diff changeset
    69