jdk/make/common/Program.gmk
author ksrini
Wed, 06 Apr 2011 19:31:30 -0700
changeset 9241 e77024585d01
parent 8796 604a43386301
child 9275 1df1f7dfab7f
permissions -rw-r--r--
7033954: (launcher) Launchers not built with mapfiles Reviewed-by: ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
9241
e77024585d01 7033954: (launcher) Launchers not built with mapfiles
ksrini
parents: 8796
diff changeset
     2
# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4665
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Generic makefile for building executables.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# WARNING: This file is shared with other workspaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#          So when it includes other files, it must use JDK_TOPDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# If building programs, use a normal compile approach
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
ifeq ($(COMPILE_APPROACH),batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  override COMPILE_APPROACH = normal
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
ifndef LAUNCHER_PLATFORM_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
ifndef LAUNCHER_SHARE_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
LAUNCHER_SHARE_SRC = $(SHARE_SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
ACTUAL_PROGRAM_DIR  = $(BINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
ACTUAL_PROGRAM      = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
# Make sure the default rule is all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
program_default_rule: all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
program: $(ACTUAL_PROGRAM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
9241
e77024585d01 7033954: (launcher) Launchers not built with mapfiles
ksrini
parents: 8796
diff changeset
    58
# reuse the mapfiles in the launcher's directory, the same should
e77024585d01 7033954: (launcher) Launchers not built with mapfiles
ksrini
parents: 8796
diff changeset
    59
# be applicable to the tool launchers as well.
e77024585d01 7033954: (launcher) Launchers not built with mapfiles
ksrini
parents: 8796
diff changeset
    60
FILES_m = $(BUILDDIR)/java/main/java/mapfile-$(ARCH)
e77024585d01 7033954: (launcher) Launchers not built with mapfiles
ksrini
parents: 8796
diff changeset
    61
include $(BUILDDIR)/common/Mapfile-vers.gmk
e77024585d01 7033954: (launcher) Launchers not built with mapfiles
ksrini
parents: 8796
diff changeset
    62
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
include $(JDK_TOPDIR)/make/common/Rules.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
ifdef NEVER_ACT_AS_SERVER_CLASS_MACHINE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
OTHER_CPPFLAGS += -DNEVER_ACT_AS_SERVER_CLASS_MACHINE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
# Create a dependency on libjli (Java Launcher Infrastructure)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
# On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
# do this reliably on Linux takes a different syntax than Solaris.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
# On Windows, this is done by using the same directory as the executable
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
# itself, as with all the Windows libraries.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
ifneq (,$(findstring $(PLATFORM), linux solaris))	# UNIX systems
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    OTHER_LDLIBS += -ljli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
	ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
		LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
		LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
	else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
		LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
		LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
	endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    ifeq ($(PLATFORM), linux)
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8583
diff changeset
    91
	LDFLAGS += $(LDFLAG_Z_ORIGIN)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
	LDFLAGS += -Wl,--allow-shlib-undefined
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
	JLI_LCF = $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/jli.lcf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
	ifdef STATIC_JLI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
	    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
	else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	    LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
	endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
	OTHER_LDLIBS += jli.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
# Launcher specific files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
FILES_o = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
	$(OBJDIR)/main.$(OBJECT_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   113
$(ACTUAL_PROGRAM):: classes $(INIT) 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
# Windows only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
3111
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 1776
diff changeset
   120
# JDK name required here
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 1776
diff changeset
   121
RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 1776
diff changeset
   122
	    /D "JDK_INTERNAL_NAME=$(PROGRAM)" \
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 1776
diff changeset
   123
	    /D "JDK_FTYPE=0x1L"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
$(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
ifndef LOCAL_RESOURCE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
$(OBJDIR)/$(PROGRAM).lcf: $(OBJDIR)/$(PROGRAM).res $(FILES_o)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
	@$(ECHO) $(FILES_o) > $@ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
  ifndef LOCAL_RESOURCE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
	@$(ECHO) $(OBJDIR)/$(PROGRAM).res >> $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
	@$(ECHO) setargv.obj >> $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
	@$(ECHO) Created $@ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
$(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
	@$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
  STACK_SIZE=327680
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
# We need more Stack for Windows 64bit
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
  STACK_SIZE=1048576
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
7945
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   150
IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   151
$(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   152
	@$(prep-target)
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   153
	$(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   154
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   155
# We used a hand-crafted manifest file for all executables.
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   156
# It is tweaked to embed the build number and executable name.
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 2
diff changeset
   157
# Use ";#2" for .dll and ";#1" for .exe in the MT command below:
7945
7296aacd696f 7013109: windows application manifest problems
prr
parents: 7668
diff changeset
   158
$(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
	@set -- $?; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
	$(LINK) -out:$@ /STACK:$(STACK_SIZE) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
	    -map:$(OBJDIR)/$(PROGRAM).map $(LFLAGS) $(LDFLAGS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
	    @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 2
diff changeset
   165
ifdef MT
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 2
diff changeset
   166
	$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 2
diff changeset
   167
endif
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7668
diff changeset
   168
	@$(call binary_file_verification,$@)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
else # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
# Note that we have to link -lthread even when USE_PTHREADS is true.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
# This is becuase checkForCorrectLibthread() croaks otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
LIBTHREAD = -lthread
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
ifeq ($(USE_PTHREADS),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  THREADLIBS = -lpthread $(LIBTHREAD)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
else # USE_PTHREADS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  THREADLIBS = $(LIBTHREAD)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
endif # USE_PTHREADS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
# This rule only applies on unix.  It supports quantify and its ilk.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
$(ACTUAL_PROGRAM):: $(FILES_o)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
	@set -- $?; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
	@$(MKDIR) -p $(TEMPDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
	$(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	    $(FILES_o) $(THREADLIBS) $(LDLIBS)
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7668
diff changeset
   193
	@$(call binary_file_verification,$@)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
clean:: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
	$(RM) $(OBJDIR)/$(PROGRAM).rc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
	$(RM) $(OBJDIR)/$(PROGRAM).ico
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
	$(RM) $(OBJDIR)/$(PROGRAM).lcf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
	$(RM) $(OBJDIR)/$(PROGRAM).map
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
	$(RM) $(OBJDIR)/$(PROGRAM).exp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
	$(RM) $(OBJDIR)/$(PROGRAM).lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
	$(RM) $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
	$(RM) $(OBJDIR)/$(PROGRAM).ilk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
	$(RM) *.pdb
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
clobber:: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
	$(RM) $(ACTUAL_PROGRAM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
# Now include make dependencies (created during compilation, see Rules.gmk)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
ifeq ($(INCREMENTAL_BUILD),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
# Workaround: gnumake sometimes says files is empty when it shouldn't
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
#    was:  files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
ifneq ($(strip $(files)),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
include $(files)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
endif # files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
endif # INCREMENTAL_BUILD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
ifdef JAVA_ARGS
4116
54b55d640d9a 6888709: Change use of -DX=\""Y\"" to -DX='"Y"', consistently for all platforms
ohair
parents: 4111
diff changeset
   227
OTHER_CPPFLAGS += -DJAVA_ARGS='$(JAVA_ARGS)'
54b55d640d9a 6888709: Change use of -DX=\""Y\"" to -DX='"Y"', consistently for all platforms
ohair
parents: 4111
diff changeset
   228
OTHER_CPPFLAGS += -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"'
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
ifdef RELEASE
4116
54b55d640d9a 6888709: Change use of -DX=\""Y\"" to -DX='"Y"', consistently for all platforms
ohair
parents: 4111
diff changeset
   233
OTHER_CPPFLAGS += -DVERSION='"$(RELEASE)"'
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
ifneq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
HAVE_GETHRTIME=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
ifeq ($(HAVE_GETHRTIME),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
OTHER_CPPFLAGS += -DHAVE_GETHRTIME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
VERSION_DEFINES += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
		   -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
$(OBJDIR)/main.$(OBJECT_SUFFIX): $(LAUNCHER_SHARE_SRC)/bin/main.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$(OBJDIR)/main.$(OBJECT_SUFFIX) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
		$(VERSION_DEFINES) $<
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
# Default dependencies
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
all: build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
build: program
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
debug:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
	$(MAKE) VARIANT=DBG build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
fastdebug:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
	$(MAKE) VARIANT=DBG FASTDEBUG=true build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
.PHONY: all build program clean clobber debug fastdebug