annotate make/common/Program.gmk @ 6681:2cc729dda2f8

Merge
author asaha
date Tue, 25 Jun 2013 17:20:25 -0700
parents 0bf72cc56dc3 fc52d0a1fcda
children 49b0ce28e2ca
rev   line source
duke@0 1 #
ksrini@4676 2 # Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
ohair@2362 7 # published by the Free Software Foundation. Oracle designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
ohair@2362 9 # by Oracle in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
ohair@2362 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@2362 22 # or visit www.oracle.com if you need additional information or have any
ohair@2362 23 # questions.
duke@0 24 #
duke@0 25
duke@0 26 #
duke@0 27 # Generic makefile for building executables.
duke@0 28 #
duke@0 29
duke@0 30 # WARNING: This file is shared with other workspaces.
duke@0 31 # So when it includes other files, it must use JDK_TOPDIR.
duke@0 32 #
duke@0 33
duke@0 34 #
duke@0 35 # If building programs, use a normal compile approach
duke@0 36 #
duke@0 37 ifeq ($(COMPILE_APPROACH),batch)
duke@0 38 override COMPILE_APPROACH = normal
duke@0 39 endif
duke@0 40
ksrini@4676 41 # set the platform specific directory for macosx, also this platform shares
ksrini@4676 42 # substantial family ties with its siblings (solaris and linux), thus we add
ksrini@4676 43 # solaris src path to its compilation dependencies.
ksrini@4676 44 ifeq ($(PLATFORM), macosx)
ksrini@4676 45 LAUNCHER_PLATFORM_SRC = $(BUILDDIR)/../src/macosx
ksrini@4676 46 LAUNCHER_SOLARIS_PLATFORM_SRC = $(BUILDDIR)/../src/solaris
ksrini@4676 47 else # ! MACOSX
ksrini@4676 48 LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)
ksrini@4676 49 endif # MACOSX
duke@0 50
duke@0 51 ifndef LAUNCHER_SHARE_SRC
ksrini@4676 52 LAUNCHER_SHARE_SRC = $(SHARE_SRC)
duke@0 53 endif
duke@0 54
duke@0 55 ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
duke@0 56 ACTUAL_PROGRAM_DIR = $(BINDIR)
duke@0 57 ACTUAL_PROGRAM = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
duke@0 58
duke@0 59 # Make sure the default rule is all
duke@0 60 program_default_rule: all
duke@0 61
duke@0 62 program: $(ACTUAL_PROGRAM)
duke@0 63
dholmes@4058 64 # Work-around for missing processor specific mapfiles
dholmes@4058 65 ifndef CROSS_COMPILE_ARCH
dholmes@4058 66 # reuse the mapfiles in the launcher's directory, the same should
dholmes@4058 67 # be applicable to the tool launchers as well.
dholmes@4058 68 FILES_m = $(BUILDDIR)/java/main/java/mapfile-$(ARCH)
dholmes@4058 69 include $(BUILDDIR)/common/Mapfile-vers.gmk
dholmes@4058 70 endif
ksrini@3983 71
duke@0 72 include $(JDK_TOPDIR)/make/common/Rules.gmk
duke@0 73
duke@0 74 ifdef NEVER_ACT_AS_SERVER_CLASS_MACHINE
ksrini@4676 75 OTHER_CPPFLAGS += -DNEVER_ACT_AS_SERVER_CLASS_MACHINE
duke@0 76 endif
duke@0 77
duke@0 78 #
duke@0 79 # Create a dependency on libjli (Java Launcher Infrastructure)
duke@0 80 #
duke@0 81 # On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to
duke@0 82 # do this reliably on Linux takes a different syntax than Solaris.
duke@0 83 #
duke@0 84 # On Windows, this is done by using the same directory as the executable
duke@0 85 # itself, as with all the Windows libraries.
duke@0 86 #
michaelm@4628 87 ifeq ($(PLATFORM), macosx)
michaelm@4628 88 ifneq ($(ARCH), universal)
michaelm@4628 89 LDFLAGS += -Wl,-all_load
ksrini@4676 90 endif # ARCH
michaelm@4628 91 LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
michaelm@4628 92
michaelm@4628 93 ifeq ($(SYSTEM_ZLIB),true)
andrew@5351 94 OTHER_LDLIBS += $(ZLIB_LIBS)
ksrini@4676 95 endif # SYSTEM_ZLIB
ksrini@4676 96 endif # PLATFORM
michaelm@4628 97
ksrini@4676 98 ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
ksrini@4676 99 LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
ksrini@4676 100 OTHER_LDLIBS += -ljli
ksrini@4676 101 ifeq ($(PLATFORM), solaris)
ksrini@4676 102 ifeq ($(ARCH_DATA_MODEL), 32)
ksrini@4676 103 LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
ksrini@4676 104 else # ! ARCH_DATA_MODEL 64-bit
ksrini@4676 105 LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
ksrini@4676 106 endif # ARCH_DATA_MODEL
ksrini@4676 107 endif # PLATFORM SOLARIS
ksrini@4676 108 ifeq ($(PLATFORM), linux)
ksrini@4676 109 LDFLAGS += $(LDFLAG_Z_ORIGIN)
ksrini@4676 110 LDFLAGS += -Wl,--allow-shlib-undefined
ksrini@4676 111 LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
ksrini@4676 112 endif # PLATFORM LINUX
ksrini@4676 113 endif # PLATFORM linux solaris
ksrini@4676 114
duke@0 115 ifeq ($(PLATFORM), windows)
ksrini@4676 116 JLI_LCF = $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/jli.lcf
ksrini@4676 117 ifdef STATIC_JLI
ksrini@4676 118 LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static
ksrini@4676 119 else # !STATIC_JLI
ksrini@4676 120 LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)
ksrini@4676 121 endif # STATIC_JLI
ksrini@4676 122 OTHER_LDLIBS += jli.lib
ksrini@4676 123 endif # PLATFORM
duke@0 124
duke@0 125 #
duke@0 126 # Launcher specific files.
duke@0 127 #
ksrini@4676 128 FILES_o = $(OBJDIR)/main.$(OBJECT_SUFFIX)
duke@0 129
mchung@2080 130 $(ACTUAL_PROGRAM):: classes $(INIT)
duke@0 131
duke@0 132 #
duke@0 133 # Windows only
duke@0 134 #
duke@0 135 ifeq ($(PLATFORM), windows)
ksrini@4676 136 # JDK name required here
ksrini@4676 137 RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
ksrini@4676 138 /D "JDK_INTERNAL_NAME=$(PROGRAM)" \
ksrini@4676 139 /D "JDK_FTYPE=0x1L"
duke@0 140
ksrini@4676 141 $(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
ksrini@4676 142 @$(prep-target)
ksrini@4676 143 ifndef LOCAL_RESOURCE_FILE
ksrini@4676 144 $(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
ksrini@4676 145 endif # LOCAL_RESOURCE_FILE
duke@0 146
ksrini@4676 147 $(OBJDIR)/$(PROGRAM).lcf: $(OBJDIR)/$(PROGRAM).res $(FILES_o)
duke@0 148 @$(prep-target)
duke@0 149 @$(ECHO) $(FILES_o) > $@
duke@0 150 ifndef LOCAL_RESOURCE_FILE
duke@0 151 @$(ECHO) $(OBJDIR)/$(PROGRAM).res >> $@
ksrini@4676 152 endif # LOCAL_RESOURCE_FILE
duke@0 153 @$(ECHO) Created $@
duke@0 154
ksrini@4676 155 $(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
duke@0 156 @$(install-file)
duke@0 157
ksrini@4676 158 ifeq ($(ARCH_DATA_MODEL), 32)
ksrini@4676 159 STACK_SIZE=327680
ksrini@4676 160 else # !32 BIT
ksrini@4676 161 # We need more Stack for Windows 64bit
ksrini@4676 162 STACK_SIZE=1048576
ksrini@4676 163 endif # ARCH_DATA_MODEL
duke@0 164
ksrini@4676 165 IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
ksrini@4676 166 $(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest
prr@3356 167 @$(prep-target)
prr@3356 168 $(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@
prr@3356 169
dcubed@4881 170 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@4881 171 MAP_OPTION="-map:$(OBJDIR)/$(PROGRAM).map"
dcubed@4881 172 endif
dcubed@4881 173
ksrini@4676 174 # We used a hand-crafted manifest file for all executables.
ksrini@4676 175 # It is tweaked to embed the build number and executable name.
ksrini@4676 176 # Use ";#2" for .dll and ";#1" for .exe in the MT command below:
ksrini@4676 177 $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest
duke@0 178 @$(prep-target)
duke@0 179 @set -- $?; \
duke@0 180 $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
duke@0 181 $(LINK) -out:$@ /STACK:$(STACK_SIZE) \
dcubed@4881 182 $(MAP_OPTION) $(LFLAGS) $(LDFLAGS) \
duke@0 183 @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
ksrini@4676 184 ifdef MT
tbell@795 185 $(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
ksrini@4676 186 endif # MT
ohair@3419 187 @$(call binary_file_verification,$@)
dcubed@4922 188 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@4922 189 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@4922 190 (set -e ; \
dcubed@4922 191 $(CD) $(OBJDIR) ; \
dcubed@4922 192 $(ZIPEXE) -q $(PROGRAM).diz $(PROGRAM).map $(PROGRAM).pdb ; \
dcubed@4922 193 $(RM) $(PROGRAM).map $(PROGRAM).pdb ; \
dcubed@4922 194 )
dcubed@4922 195 endif
dcubed@4922 196 endif
ksrini@4676 197 else # *NIXES
ksrini@4676 198 #
ksrini@4676 199 # Note that we have to link -lthread even when USE_PTHREADS is true.
ksrini@4676 200 # This is becuase checkForCorrectLibthread() croaks otherwise.
ksrini@4676 201 #
ksrini@4676 202 LIBTHREAD = -lthread
ksrini@4676 203 ifeq ($(USE_PTHREADS),true)
ksrini@4676 204 THREADLIBS = -lpthread $(LIBTHREAD)
ksrini@4676 205 else # !USE_PTHREADS
ksrini@4676 206 THREADLIBS = $(LIBTHREAD)
ksrini@4676 207 endif # USE_PTHREADS
duke@0 208
ksrini@4676 209 ifeq ($(PLATFORM), macosx)
ksrini@4676 210 THREADLIBS = -pthread
ksrini@4676 211 # Needed for linking the various launchers
ksrini@4676 212 LDFLAGS += -framework Cocoa -framework Security \
ksrini@4676 213 -framework ApplicationServices
ksrini@4676 214 OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
duke@0 215
ksrini@4676 216 # Default Info.plist file for the command line tools. This gets overridden by
ksrini@4676 217 # some of the jvmstat tools so that they have task_for_pid() privileges
ksrini@4676 218 ifndef INFO_PLIST_FILE
ksrini@4676 219 INFO_PLIST_FILE = Info-cmdline.plist
ksrini@4676 220 endif # INFO_PLIST_FILE
ksrini@4676 221 LDFLAGS += -sectcreate __TEXT __info_plist $(LAUNCHER_PLATFORM_SRC)/lib/$(INFO_PLIST_FILE)
ksrini@4676 222 else # SOLARIS/LINUX
ksrini@4676 223 INFO_PLIST_FILE=
ksrini@4676 224 endif # MACOSX
duke@0 225
ksrini@4676 226 #
ksrini@4676 227 # This rule only applies on unix. It supports quantify and its ilk.
ksrini@4676 228 #
dcubed@5033 229
dcubed@5033 230 ifeq ($(PLATFORM), solaris)
dcubed@5033 231 ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
dcubed@5033 232 $(ACTUAL_PROGRAM):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
dcubed@5033 233 endif
dcubed@5033 234 endif
dcubed@5033 235
ksrini@4676 236 $(ACTUAL_PROGRAM):: $(FILES_o)
duke@0 237 @$(prep-target)
duke@0 238 @set -- $?; \
ksrini@4676 239 $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
duke@0 240 @$(MKDIR) -p $(TEMPDIR)
duke@0 241 $(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
ksrini@4676 242 $(FILES_o) $(THREADLIBS) $(LDLIBS)
ksrini@4676 243 ifeq ($(findstring privileged, $(INFO_PLIST_FILE)), privileged)
michaelm@4628 244 -codesign -s openjdk_codesign $@
ksrini@4676 245 endif # INFO_PLIST_FILE
ohair@3419 246 @$(call binary_file_verification,$@)
dcubed@4922 247 ifneq ($(PLATFORM), macosx)
dcubed@4922 248 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@4922 249 ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
dcubed@5033 250 ifeq ($(PLATFORM), solaris)
dcubed@5033 251 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
dcubed@5033 252 # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
dcubed@5033 253 # empty section headers until a fixed $(OBJCOPY) is available.
dcubed@5033 254 # An empty section header has sh_addr == 0 and sh_size == 0.
dcubed@5033 255 # This problem has only been seen on Solaris X64, but we call this tool
dcubed@5033 256 # on all Solaris builds just in case.
dcubed@5033 257 #
dcubed@5033 258 # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
dcubed@5033 259 # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
dcubed@5033 260 (set -e ; \
dcubed@5033 261 $(CD) $(@D) ; \
dcubed@5033 262 $(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
dcubed@5033 263 $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
dcubed@5033 264 $(ADD_GNU_DEBUGLINK) $(@F).debuginfo $(@F) ; \
dcubed@5033 265 )
dcubed@5033 266 else # PLATFORM != solaris
dcubed@4922 267 (set -e ; \
dcubed@4922 268 $(CD) $(@D) ; \
dcubed@4922 269 $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
dcubed@4922 270 $(OBJCOPY) --add-gnu-debuglink=$(@F).debuginfo $(@F) ; \
dcubed@4922 271 )
dcubed@5033 272 endif # PLATFORM == solaris
dcubed@4922 273 ifeq ($(STRIP_POLICY),all_strip)
dcubed@4922 274 $(STRIP) $@
dcubed@4922 275 else
dcubed@4922 276 ifeq ($(STRIP_POLICY),min_strip)
dcubed@4922 277 ifeq ($(PLATFORM), solaris)
dcubed@4922 278 $(STRIP) -x $@
dcubed@4922 279 else
dcubed@4922 280 # assume Linux
dcubed@4922 281 $(STRIP) -g $@
dcubed@4922 282 endif
dcubed@4922 283 # implied else here is no stripping at all
dcubed@4922 284 endif
dcubed@4922 285 endif
dcubed@4922 286 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@4922 287 (set -e ; \
dcubed@4922 288 $(CD) $(@D) ; \
dcubed@4922 289 $(ZIPEXE) -q $(@F).diz $(@F).debuginfo ; \
dcubed@4922 290 $(RM) $(@F).debuginfo ; \
dcubed@4922 291 )
dcubed@4923 292 # save ZIP'ed debug info with rest of the program's build artifacts
dcubed@4923 293 $(MV) $@.diz $(OBJDIR)
dcubed@4923 294 else
dcubed@4923 295 # save debug info with rest of the program's build artifacts
dcubed@4923 296 $(MV) $@.debuginfo $(OBJDIR)
dcubed@4922 297 endif
dcubed@4922 298 endif # PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS
dcubed@4922 299 endif # ENABLE_FULL_DEBUG_SYMBOLS
dcubed@4922 300 endif # PLATFORM-!macosx
duke@0 301 endif # PLATFORM
duke@0 302
duke@0 303 clean::
duke@0 304 ifeq ($(PLATFORM), windows)
duke@0 305 $(RM) $(OBJDIR)/$(PROGRAM).rc
duke@0 306 $(RM) $(OBJDIR)/$(PROGRAM).ico
duke@0 307 $(RM) $(OBJDIR)/$(PROGRAM).lcf
duke@0 308 $(RM) $(OBJDIR)/$(PROGRAM).map
dcubed@4922 309 $(RM) $(OBJDIR)/$(PROGRAM).pdb
duke@0 310 $(RM) $(OBJDIR)/$(PROGRAM).exp
duke@0 311 $(RM) $(OBJDIR)/$(PROGRAM).lib
duke@0 312 $(RM) $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
duke@0 313 $(RM) $(OBJDIR)/$(PROGRAM).ilk
duke@0 314 $(RM) *.pdb
dcubed@4922 315 else
dcubed@4922 316 $(RM) $(OBJDIR)/$(PROGRAM).debuginfo
duke@0 317 endif
dcubed@4922 318 $(RM) $(OBJDIR)/$(PROGRAM).diz
duke@0 319
duke@0 320
duke@0 321 clobber::
duke@0 322 $(RM) $(ACTUAL_PROGRAM)
duke@0 323
duke@0 324 #
duke@0 325 # Now include make dependencies (created during compilation, see Rules.gmk)
duke@0 326 #
duke@0 327 ifeq ($(INCREMENTAL_BUILD),true)
ksrini@4676 328 # Workaround: gnumake sometimes says files is empty when it shouldn't
ksrini@4676 329 # was: files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
ksrini@4676 330 files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
ksrini@4676 331 ifneq ($(strip $(files)),)
ksrini@4676 332 include $(files)
ksrini@4676 333 endif # files
duke@0 334 endif # INCREMENTAL_BUILD
duke@0 335
duke@0 336 ifdef JAVA_ARGS
ksrini@4676 337 OTHER_CPPFLAGS += -DJAVA_ARGS='$(JAVA_ARGS)'
ksrini@4676 338 OTHER_CPPFLAGS += -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"'
ksrini@4676 339 endif # JAVA_ARGS
duke@0 340
duke@0 341 ifeq ($(PLATFORM), windows)
ksrini@4676 342 ifdef RELEASE
ksrini@4676 343 OTHER_CPPFLAGS += -DVERSION='"$(RELEASE)"'
ksrini@4676 344 endif #RELEASE
ksrini@4676 345 endif #PLATFORM
duke@0 346
duke@0 347
duke@0 348 ifneq ($(PLATFORM), windows)
ksrini@4676 349 HAVE_GETHRTIME=true
ksrini@4676 350 endif #PLATFORM
duke@0 351
duke@0 352 ifeq ($(HAVE_GETHRTIME),true)
ksrini@4676 353 OTHER_CPPFLAGS += -DHAVE_GETHRTIME
duke@0 354 endif
duke@0 355
duke@0 356 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
michaelm@4628 357 ifeq ($(PLATFORM), macosx)
ksrini@4676 358 OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin
michaelm@4628 359 ifneq ($(SYSTEM_ZLIB), true)
michaelm@4628 360 OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
ksrini@4676 361 endif # SYSTEM_ZLIB
ksrini@4676 362 else # PLATFORM !MACOSX
michaelm@4628 363 OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
michaelm@4628 364 endif
duke@0 365
ksrini@4676 366 OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
duke@0 367 VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
duke@0 368
duke@0 369 VERSION_DEFINES += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
ksrini@4676 370 -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
duke@0 371
duke@0 372
duke@0 373
duke@0 374 $(OBJDIR)/main.$(OBJECT_SUFFIX): $(LAUNCHER_SHARE_SRC)/bin/main.c
duke@0 375 @$(prep-target)
duke@0 376 $(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$(OBJDIR)/main.$(OBJECT_SUFFIX) \
duke@0 377 $(VERSION_DEFINES) $<
duke@0 378
duke@0 379 #
duke@0 380 # Default dependencies
duke@0 381 #
duke@0 382
duke@0 383 all: build
duke@0 384
duke@0 385 build: program
duke@0 386
duke@0 387 debug:
duke@0 388 $(MAKE) VARIANT=DBG build
duke@0 389
duke@0 390 fastdebug:
duke@0 391 $(MAKE) VARIANT=DBG FASTDEBUG=true build
duke@0 392
duke@0 393 .PHONY: all build program clean clobber debug fastdebug