a528c4b370
Reviewed-by: erikj, kbarrett
184 lines
7.2 KiB
Plaintext
184 lines
7.2 KiB
Plaintext
#
|
|
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
#
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
#
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
# accompanied this code).
|
|
#
|
|
# You should have received a copy of the GNU General Public License version
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
#
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
# questions.
|
|
#
|
|
|
|
include LibCommon.gmk
|
|
include LauncherCommon.gmk
|
|
|
|
JPACKAGE_OUTPUT_DIR := \
|
|
$(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources
|
|
|
|
JPACKAGE_CFLAGS_windows := -DUNICODE -D_UNICODE
|
|
JPACKAGE_CXXFLAGS_windows := -EHsc $(JPACKAGE_CFLAGS_windows)
|
|
|
|
################################################################################
|
|
## Build jpackageapplauncher
|
|
################################################################################
|
|
|
|
ifeq ($(call isTargetOs, linux), true)
|
|
JPACKAGEAPPLAUNCHER_LINK_TYPE := C
|
|
JPACKAGEAPPLAUNCHER_INCLUDE_FILES := %.c
|
|
else
|
|
JPACKAGEAPPLAUNCHER_LINK_TYPE := C++
|
|
endif
|
|
|
|
# Output app launcher executable in resources dir, and symbols in the object dir
|
|
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHER, \
|
|
NAME := jpackageapplauncher, \
|
|
LINK_TYPE := $(JPACKAGEAPPLAUNCHER_LINK_TYPE), \
|
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
|
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
|
|
SRC := applauncher, \
|
|
EXTRA_SRC := common, \
|
|
INCLUDE_FILES := $(JPACKAGEAPPLAUNCHER_INCLUDE_FILES), \
|
|
OPTIMIZATION := LOW, \
|
|
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
|
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
|
|
DISABLED_WARNINGS_clang_Log.cpp := unused-const-variable, \
|
|
CFLAGS_FILTER_OUT := -MD, \
|
|
CXXFLAGS_FILTER_OUT := -MD, \
|
|
CFLAGS_macosx := -Wno-format-nonliteral, \
|
|
CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
|
|
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
|
LD_SET_ORIGIN := false, \
|
|
LDFLAGS_macosx := -rpath @executable_path/../Frameworks/ \
|
|
-rpath @executable_path/../PlugIns/, \
|
|
LIBS_macosx := -framework Cocoa, \
|
|
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
|
LIBS_linux := $(LIBDL), \
|
|
MANIFEST := $(JAVA_MANIFEST), \
|
|
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
|
|
))
|
|
|
|
TARGETS += $(BUILD_JPACKAGEAPPLAUNCHER)
|
|
|
|
ifeq ($(call isTargetOs, linux), true)
|
|
##############################################################################
|
|
## Build libjpackageapplauncheraux
|
|
##############################################################################
|
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJPACKAGEAPPLAUNCHERAUX, \
|
|
NAME := jpackageapplauncheraux, \
|
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
|
SYMBOLS_DIR := \
|
|
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncheraux, \
|
|
SRC := libapplauncher, \
|
|
EXTRA_SRC := \
|
|
applauncher \
|
|
common, \
|
|
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
|
|
LINK_TYPE := C++, \
|
|
OPTIMIZATION := LOW, \
|
|
DISABLED_WARNINGS_gcc_Log.cpp := unused-const-variable, \
|
|
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
|
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
|
|
LD_SET_ORIGIN := false, \
|
|
LIBS_linux := $(LIBDL), \
|
|
))
|
|
|
|
TARGETS += $(BUILD_LIBJPACKAGEAPPLAUNCHERAUX)
|
|
endif
|
|
|
|
ifeq ($(call isTargetOs, windows), true)
|
|
##############################################################################
|
|
## Build libjpackage
|
|
##############################################################################
|
|
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBJPACKAGE, \
|
|
NAME := jpackage, \
|
|
OPTIMIZATION := LOW, \
|
|
EXTRA_SRC := common, \
|
|
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
|
|
LDFLAGS := $(LDFLAGS_CXX_JDK), \
|
|
LIBS_windows := advapi32.lib msi.lib ole32.lib shell32.lib shlwapi.lib \
|
|
user32.lib, \
|
|
))
|
|
|
|
TARGETS += $(BUILD_LIBJPACKAGE)
|
|
|
|
##############################################################################
|
|
## Build libwixhelper
|
|
##############################################################################
|
|
|
|
# Build Wix custom action helper
|
|
# Output library in resources dir, and symbols in the object dir
|
|
$(eval $(call SetupJdkLibrary, BUILD_LIBWIXHELPER, \
|
|
NAME := wixhelper, \
|
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
|
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwixhelper, \
|
|
OPTIMIZATION := LOW, \
|
|
EXTRA_SRC := common, \
|
|
CXXFLAGS_FILTER_OUT := -MD, \
|
|
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
|
LDFLAGS := $(LDFLAGS_CXX_JDK), \
|
|
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
|
))
|
|
|
|
TARGETS += $(BUILD_LIBWIXHELPER)
|
|
|
|
##############################################################################
|
|
## Build msiwrapper
|
|
##############################################################################
|
|
|
|
# Build exe installer wrapper for msi installer
|
|
$(eval $(call SetupJdkExecutable, BUILD_MSIWRAPPER, \
|
|
NAME := msiwrapper, \
|
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
|
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/msiwrapper, \
|
|
EXTRA_SRC := common, \
|
|
CXXFLAGS_FILTER_OUT := -MD, \
|
|
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
|
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
|
))
|
|
|
|
TARGETS += $(BUILD_MSIWRAPPER)
|
|
|
|
##############################################################################
|
|
## Build jpackageapplauncherw
|
|
##############################################################################
|
|
|
|
# Build non-console version of launcher
|
|
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHERW, \
|
|
NAME := jpackageapplauncherw, \
|
|
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
|
|
SYMBOLS_DIR := \
|
|
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
|
|
SRC := applauncher, \
|
|
EXTRA_SRC := common, \
|
|
OPTIMIZATION := LOW, \
|
|
CFLAGS_FILTER_OUT := -MD, \
|
|
CXXFLAGS_FILTER_OUT := -MD, \
|
|
CFLAGS := -DJP_LAUNCHERW, \
|
|
CXXFLAGS := -DJP_LAUNCHERW, \
|
|
CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
|
|
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
|
|
LD_SET_ORIGIN := false, \
|
|
LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \
|
|
MANIFEST := $(JAVA_MANIFEST), \
|
|
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \
|
|
))
|
|
|
|
TARGETS += $(BUILD_JPACKAGEAPPLAUNCHERW)
|
|
endif
|