Program.gmk revision 2362
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# 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.
#
#
# Generic makefile for building executables.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
#
# If building programs, use a normal compile approach
#
ACTUAL_PROGRAM_DIR = $(BINDIR)
# Make sure the default rule is all
#
# Create a dependency on libjli (Java Launcher Infrastructure)
#
# On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to
# do this reliably on Linux takes a different syntax than Solaris.
#
# On Windows, this is done by using the same directory as the executable
# itself, as with all the Windows libraries.
#
OTHER_LDLIBS += -ljli
else
else
#
# Launcher specific files.
#
FILES_o = \
# We either need to import (copy) binaries in, or build them
COMPILE_IT=true
else
COMPILE_IT=false
#
# Windows only
#
# JDK name required here
/D "JDK_FTYPE=0x1L"
@$(ECHO) setargv.obj >> $@
STACK_SIZE=327680
else
# We need more Stack for Windows 64bit
STACK_SIZE=1048576
# In VS2005 or VS2008 the link command creates a .manifest file that we want
# to insert into the linked artifact so we do not need to track it separately.
# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
@set -- $?; \
else # PLATFORM
#
# Note that we have to link -lthread even when USE_PTHREADS is true.
# This is becuase checkForCorrectLibthread() croaks otherwise.
#
else # USE_PTHREADS
THREADLIBS = $(LIBTHREAD)
endif # USE_PTHREADS
#
# This rule only applies on unix. It supports quantify and its ilk.
#
$(ACTUAL_PROGRAM):: $(FILES_o)
@set -- $?; \
endif # PLATFORM
else # COMPILE_IT
$(ACTUAL_PROGRAM)::
# Copies in the file from the JDK_IMPORT_PATH area
endif # COMPILE_IT
clean::
clobber::
$(RM) $(ACTUAL_PROGRAM)
#
# Now include make dependencies (created during compilation, see Rules.gmk)
#
# Workaround: gnumake sometimes says files is empty when it shouldn't
# was: files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
endif # files
endif # INCREMENTAL_BUILD
HAVE_GETHRTIME=true
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
$(VERSION_DEFINES) $<
#
# Default dependencies
#