blob: b319ee4188939cfabbadadc0ede97647ea6d778b [file] [log] [blame]
duke6e45e102007-12-01 00:00:00 +00001#
michaelm5ac8c152012-03-06 20:34:38 +00002# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
duke6e45e102007-12-01 00:00:00 +00003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
ohair2283b9d2010-05-25 15:58:33 -07007# published by the Free Software Foundation. Oracle designates this
duke6e45e102007-12-01 00:00:00 +00008# particular file as subject to the "Classpath" exception as provided
ohair2283b9d2010-05-25 15:58:33 -07009# by Oracle in the LICENSE file that accompanied this code.
duke6e45e102007-12-01 00:00:00 +000010#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
ohair2283b9d2010-05-25 15:58:33 -070021# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
duke6e45e102007-12-01 00:00:00 +000024#
25
26#
27# Generic makefile for building executables.
28#
29
30# WARNING: This file is shared with other workspaces.
31# So when it includes other files, it must use JDK_TOPDIR.
32#
33
34#
35# If building programs, use a normal compile approach
36#
37ifeq ($(COMPILE_APPROACH),batch)
38 override COMPILE_APPROACH = normal
39endif
40
michaelm5ac8c152012-03-06 20:34:38 +000041# set the platform specific directory for macosx, also this platform shares
42# substantial family ties with its siblings (solaris and linux), thus we add
43# solaris src path to its compilation dependencies.
44ifeq ($(PLATFORM), macosx)
45 LAUNCHER_PLATFORM_SRC = $(BUILDDIR)/../src/macosx
46 LAUNCHER_SOLARIS_PLATFORM_SRC = $(BUILDDIR)/../src/solaris
47else
48 LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)
duke6e45e102007-12-01 00:00:00 +000049endif
50
51ifndef LAUNCHER_SHARE_SRC
michaelm5ac8c152012-03-06 20:34:38 +000052 LAUNCHER_SHARE_SRC = $(SHARE_SRC)
duke6e45e102007-12-01 00:00:00 +000053endif
54
55ACTUAL_PROGRAM_NAME = $(PROGRAM)$(EXE_SUFFIX)
56ACTUAL_PROGRAM_DIR = $(BINDIR)
57ACTUAL_PROGRAM = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
58
duke6e45e102007-12-01 00:00:00 +000059# Make sure the default rule is all
60program_default_rule: all
61
62program: $(ACTUAL_PROGRAM)
63
dholmes5e4d33b2011-05-04 22:16:28 -040064# Work-around for missing processor specific mapfiles
65ifndef CROSS_COMPILE_ARCH
66 # reuse the mapfiles in the launcher's directory, the same should
67 # be applicable to the tool launchers as well.
68 FILES_m = $(BUILDDIR)/java/main/java/mapfile-$(ARCH)
69 include $(BUILDDIR)/common/Mapfile-vers.gmk
70endif
ksrini896eddf2011-04-06 19:31:30 -070071
duke6e45e102007-12-01 00:00:00 +000072include $(JDK_TOPDIR)/make/common/Rules.gmk
73
74ifdef NEVER_ACT_AS_SERVER_CLASS_MACHINE
michaelm5ac8c152012-03-06 20:34:38 +000075 OTHER_CPPFLAGS += -DNEVER_ACT_AS_SERVER_CLASS_MACHINE
duke6e45e102007-12-01 00:00:00 +000076endif
77
78#
79# Create a dependency on libjli (Java Launcher Infrastructure)
80#
81# On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to
82# do this reliably on Linux takes a different syntax than Solaris.
83#
84# On Windows, this is done by using the same directory as the executable
85# itself, as with all the Windows libraries.
86#
michaelm5ac8c152012-03-06 20:34:38 +000087ifeq ($(PLATFORM), macosx)
88 ifneq ($(ARCH), universal)
89 LDFLAGS += -Wl,-all_load
90 endif
91 LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
92
93 ifeq ($(SYSTEM_ZLIB),true)
andrewecc08bc2012-08-15 14:35:36 +010094 OTHER_LDLIBS += $(ZLIB_LIBS)
michaelm5ac8c152012-03-06 20:34:38 +000095 endif
duke6e45e102007-12-01 00:00:00 +000096endif
michaelm5ac8c152012-03-06 20:34:38 +000097
98ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
99 LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
100 OTHER_LDLIBS += -ljli
101 ifeq ($(PLATFORM), solaris)
102 ifeq ($(ARCH_DATA_MODEL), 32)
103 LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
104 LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli
105 else
106 LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
107 LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli
108 endif
109 endif
110 ifeq ($(PLATFORM), linux)
111 LDFLAGS += $(LDFLAG_Z_ORIGIN)
112 LDFLAGS += -Wl,--allow-shlib-undefined
113 LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
114 LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli
115 endif
116endif
117
duke6e45e102007-12-01 00:00:00 +0000118ifeq ($(PLATFORM), windows)
michaelm5ac8c152012-03-06 20:34:38 +0000119 JLI_LCF = $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/jli.lcf
120 ifdef STATIC_JLI
121 LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static
122 else
123 LDFLAGS += -libpath:$(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)
124 endif
125 OTHER_LDLIBS += jli.lib
duke6e45e102007-12-01 00:00:00 +0000126endif
127
128#
omajidacb0d5e2012-08-14 17:11:11 -0400129# Applications expect to be able to link against libjawt without invoking
130# System.loadLibrary("jawt") first. This was the behaviour described in the
131# devloper documentation of JAWT and what worked with OpenJDK6.
132#
133ifeq ($(PLATFORM), solaris)
134 ifeq ($(ARCH_DATA_MODEL), 32)
135 LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)
136 LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)
137 else # ! ARCH_DATA_MODEL 64-bit
138 LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)
139 LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)
140 endif # ARCH_DATA_MODEL
141endif # PLATFORM SOLARIS
142ifeq ($(PLATFORM), linux)
143 LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)
144 LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)
145endif # PLATFORM LINUX
146
147
148#
duke6e45e102007-12-01 00:00:00 +0000149# Launcher specific files.
150#
michaelm5ac8c152012-03-06 20:34:38 +0000151FILES_o = $(OBJDIR)/main.$(OBJECT_SUFFIX)
duke6e45e102007-12-01 00:00:00 +0000152
mchung3baa2d62010-01-07 08:14:48 -0800153$(ACTUAL_PROGRAM):: classes $(INIT)
duke6e45e102007-12-01 00:00:00 +0000154
155#
156# Windows only
157#
158ifeq ($(PLATFORM), windows)
michaelm5ac8c152012-03-06 20:34:38 +0000159 # JDK name required here
tbell02d657c2012-10-23 10:10:23 -0700160 RC_FLAGS += -D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
161 -D "JDK_INTERNAL_NAME=$(PROGRAM)" \
162 -D "JDK_FTYPE=0x1L"
duke6e45e102007-12-01 00:00:00 +0000163
michaelm5ac8c152012-03-06 20:34:38 +0000164 $(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
duke6e45e102007-12-01 00:00:00 +0000165 @$(prep-target)
michaelm5ac8c152012-03-06 20:34:38 +0000166 ifndef LOCAL_RESOURCE_FILE
duke6e45e102007-12-01 00:00:00 +0000167 $(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
michaelm5ac8c152012-03-06 20:34:38 +0000168 endif
duke6e45e102007-12-01 00:00:00 +0000169
michaelm5ac8c152012-03-06 20:34:38 +0000170 $(OBJDIR)/$(PROGRAM).lcf: $(OBJDIR)/$(PROGRAM).res $(FILES_o)
duke6e45e102007-12-01 00:00:00 +0000171 @$(prep-target)
172 @$(ECHO) $(FILES_o) > $@
173 ifndef LOCAL_RESOURCE_FILE
174 @$(ECHO) $(OBJDIR)/$(PROGRAM).res >> $@
175 endif
duke6e45e102007-12-01 00:00:00 +0000176 @$(ECHO) Created $@
177
michaelm5ac8c152012-03-06 20:34:38 +0000178 $(ACTUAL_PROGRAM):: $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
duke6e45e102007-12-01 00:00:00 +0000179 @$(install-file)
180
michaelm5ac8c152012-03-06 20:34:38 +0000181 ifeq ($(ARCH_DATA_MODEL), 32)
182 STACK_SIZE=327680
183 else
184 # We need more Stack for Windows 64bit
185 STACK_SIZE=1048576
186 endif
duke6e45e102007-12-01 00:00:00 +0000187
michaelm5ac8c152012-03-06 20:34:38 +0000188 IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
189 $(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest
prr1a77cbc2011-01-19 17:07:51 -0800190 @$(prep-target)
191 $(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@
192
dcubedb896fcf2012-04-03 12:57:47 -0700193ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
194 MAP_OPTION="-map:$(OBJDIR)/$(PROGRAM).map"
195endif
196
michaelm5ac8c152012-03-06 20:34:38 +0000197 # We used a hand-crafted manifest file for all executables.
198 # It is tweaked to embed the build number and executable name.
199 # Use ";#2" for .dll and ";#1" for .exe in the MT command below:
200 $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest
duke6e45e102007-12-01 00:00:00 +0000201 @$(prep-target)
202 @set -- $?; \
203 $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
tbell02d657c2012-10-23 10:10:23 -0700204 $(LINK) -out:$@ -STACK:$(STACK_SIZE) \
dcubedb896fcf2012-04-03 12:57:47 -0700205 $(MAP_OPTION) $(LFLAGS) $(LDFLAGS) \
duke6e45e102007-12-01 00:00:00 +0000206 @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
michaelm5ac8c152012-03-06 20:34:38 +0000207 ifdef MT
tbell02d657c2012-10-23 10:10:23 -0700208 $(MT) -manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
michaelm5ac8c152012-03-06 20:34:38 +0000209 endif
ohair67e0bbf2011-01-05 14:28:58 -0800210 @$(call binary_file_verification,$@)
dcubed7fe35f32012-04-11 07:26:35 -0700211 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
212 ifeq ($(ZIP_DEBUGINFO_FILES),1)
213 (set -e ; \
214 $(CD) $(OBJDIR) ; \
215 $(ZIPEXE) -q $(PROGRAM).diz $(PROGRAM).map $(PROGRAM).pdb ; \
216 $(RM) $(PROGRAM).map $(PROGRAM).pdb ; \
217 )
218 endif
219 endif
michaelm5ac8c152012-03-06 20:34:38 +0000220else
221 #
222 # Note that we have to link -lthread even when USE_PTHREADS is true.
223 # This is becuase checkForCorrectLibthread() croaks otherwise.
224 #
225 LIBTHREAD = -lthread
226 ifeq ($(USE_PTHREADS),true)
227 THREADLIBS = -lpthread $(LIBTHREAD)
228 else
229 THREADLIBS = $(LIBTHREAD)
230 endif
duke6e45e102007-12-01 00:00:00 +0000231
michaelm5ac8c152012-03-06 20:34:38 +0000232 ifeq ($(PLATFORM), macosx)
233 THREADLIBS = -pthread
234 # Needed for linking the various launchers
235 LDFLAGS += -framework Cocoa -framework Security \
236 -framework ApplicationServices
237 OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
duke6e45e102007-12-01 00:00:00 +0000238
michaelm5ac8c152012-03-06 20:34:38 +0000239 # Default Info.plist file for the command line tools. This gets overridden by
240 # some of the jvmstat tools so that they have task_for_pid() privileges
241 ifndef INFO_PLIST_FILE
242 INFO_PLIST_FILE = Info-cmdline.plist
243 endif
244 LDFLAGS += -sectcreate __TEXT __info_plist $(LAUNCHER_PLATFORM_SRC)/lib/$(INFO_PLIST_FILE)
245 else
246 INFO_PLIST_FILE=
247 endif
duke6e45e102007-12-01 00:00:00 +0000248
michaelm5ac8c152012-03-06 20:34:38 +0000249 #
250 # This rule only applies on unix. It supports quantify and its ilk.
251 #
dcubeda054bf42012-05-25 08:20:12 -0700252
253 ifeq ($(PLATFORM), solaris)
254 ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
255 $(ACTUAL_PROGRAM):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
256 endif
257 endif
258
michaelm5ac8c152012-03-06 20:34:38 +0000259 $(ACTUAL_PROGRAM):: $(FILES_o)
duke6e45e102007-12-01 00:00:00 +0000260 @$(prep-target)
261 @set -- $?; \
michaelm5ac8c152012-03-06 20:34:38 +0000262 $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
duke6e45e102007-12-01 00:00:00 +0000263 @$(MKDIR) -p $(TEMPDIR)
264 $(LINK_PRE_CMD) $(CC) $(CC_OBJECT_OUTPUT_FLAG)$@ $(LDFLAGS) \
ohairf9180a92012-09-11 13:40:59 -0700265 $(sort $(FILES_o)) $(THREADLIBS) $(LDLIBS)
michaelm5ac8c152012-03-06 20:34:38 +0000266 ifeq ($(findstring privileged, $(INFO_PLIST_FILE)), privileged)
267 -codesign -s openjdk_codesign $@
268 endif
ohair67e0bbf2011-01-05 14:28:58 -0800269 @$(call binary_file_verification,$@)
dcubed7fe35f32012-04-11 07:26:35 -0700270 ifneq ($(PLATFORM), macosx)
271 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
272 ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
dcubeda054bf42012-05-25 08:20:12 -0700273 ifeq ($(PLATFORM), solaris)
274# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
275# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
276# empty section headers until a fixed $(OBJCOPY) is available.
277# An empty section header has sh_addr == 0 and sh_size == 0.
278# This problem has only been seen on Solaris X64, but we call this tool
279# on all Solaris builds just in case.
280#
281# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
282# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
283 (set -e ; \
284 $(CD) $(@D) ; \
285 $(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
286 $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
287 $(ADD_GNU_DEBUGLINK) $(@F).debuginfo $(@F) ; \
288 )
289 else # PLATFORM != solaris
dcubed7fe35f32012-04-11 07:26:35 -0700290 (set -e ; \
291 $(CD) $(@D) ; \
292 $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
293 $(OBJCOPY) --add-gnu-debuglink=$(@F).debuginfo $(@F) ; \
294 )
dcubeda054bf42012-05-25 08:20:12 -0700295 endif # PLATFORM == solaris
dcubed7fe35f32012-04-11 07:26:35 -0700296 ifeq ($(STRIP_POLICY),all_strip)
297 $(STRIP) $@
298 else
299 ifeq ($(STRIP_POLICY),min_strip)
300 ifeq ($(PLATFORM), solaris)
301 $(STRIP) -x $@
302 else
303 # assume Linux
304 $(STRIP) -g $@
305 endif
306 # implied else here is no stripping at all
307 endif
308 endif
309 ifeq ($(ZIP_DEBUGINFO_FILES),1)
310 (set -e ; \
311 $(CD) $(@D) ; \
312 $(ZIPEXE) -q $(@F).diz $(@F).debuginfo ; \
313 $(RM) $(@F).debuginfo ; \
314 )
dcubed2ee5be92012-04-12 16:23:24 -0700315 # save ZIP'ed debug info with rest of the program's build artifacts
316 $(MV) $@.diz $(OBJDIR)
317 else
318 # save debug info with rest of the program's build artifacts
319 $(MV) $@.debuginfo $(OBJDIR)
dcubed7fe35f32012-04-11 07:26:35 -0700320 endif
321 endif # PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS
322 endif # ENABLE_FULL_DEBUG_SYMBOLS
323 endif # PLATFORM-!macosx
duke6e45e102007-12-01 00:00:00 +0000324endif # PLATFORM
325
duke6e45e102007-12-01 00:00:00 +0000326clean::
327ifeq ($(PLATFORM), windows)
328 $(RM) $(OBJDIR)/$(PROGRAM).rc
329 $(RM) $(OBJDIR)/$(PROGRAM).ico
330 $(RM) $(OBJDIR)/$(PROGRAM).lcf
331 $(RM) $(OBJDIR)/$(PROGRAM).map
dcubed7fe35f32012-04-11 07:26:35 -0700332 $(RM) $(OBJDIR)/$(PROGRAM).pdb
duke6e45e102007-12-01 00:00:00 +0000333 $(RM) $(OBJDIR)/$(PROGRAM).exp
334 $(RM) $(OBJDIR)/$(PROGRAM).lib
335 $(RM) $(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX)
336 $(RM) $(OBJDIR)/$(PROGRAM).ilk
337 $(RM) *.pdb
dcubed7fe35f32012-04-11 07:26:35 -0700338else
339 $(RM) $(OBJDIR)/$(PROGRAM).debuginfo
duke6e45e102007-12-01 00:00:00 +0000340endif
dcubed7fe35f32012-04-11 07:26:35 -0700341 $(RM) $(OBJDIR)/$(PROGRAM).diz
duke6e45e102007-12-01 00:00:00 +0000342
343
344clobber::
345 $(RM) $(ACTUAL_PROGRAM)
346
347#
348# Now include make dependencies (created during compilation, see Rules.gmk)
349#
350ifeq ($(INCREMENTAL_BUILD),true)
michaelm5ac8c152012-03-06 20:34:38 +0000351 # Workaround: gnumake sometimes says files is empty when it shouldn't
352 # was: files := $(foreach file, $(wildcard */$(ARCH)/*.$(DEPEND_SUFFIX)), $(file))
353 files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null)
354 ifneq ($(strip $(files)),)
355 include $(files)
356 endif
357endif
duke6e45e102007-12-01 00:00:00 +0000358
359ifdef JAVA_ARGS
michaelm5ac8c152012-03-06 20:34:38 +0000360 OTHER_CPPFLAGS += -DJAVA_ARGS='$(JAVA_ARGS)'
361 OTHER_CPPFLAGS += -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"'
duke6e45e102007-12-01 00:00:00 +0000362endif
363
364ifeq ($(PLATFORM), windows)
michaelm5ac8c152012-03-06 20:34:38 +0000365 ifdef RELEASE
366 OTHER_CPPFLAGS += -DVERSION='"$(RELEASE)"'
367 endif
duke6e45e102007-12-01 00:00:00 +0000368endif
369
370
371ifneq ($(PLATFORM), windows)
michaelm5ac8c152012-03-06 20:34:38 +0000372 HAVE_GETHRTIME=true
duke6e45e102007-12-01 00:00:00 +0000373endif
374
375ifeq ($(HAVE_GETHRTIME),true)
michaelm5ac8c152012-03-06 20:34:38 +0000376 OTHER_CPPFLAGS += -DHAVE_GETHRTIME
duke6e45e102007-12-01 00:00:00 +0000377endif
378
379OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
michaelm5ac8c152012-03-06 20:34:38 +0000380ifeq ($(PLATFORM), macosx)
381 OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin
382 ifneq ($(SYSTEM_ZLIB), true)
383 OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
384 endif
385else
386 OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
387endif
duke6e45e102007-12-01 00:00:00 +0000388
michaelm5ac8c152012-03-06 20:34:38 +0000389OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
duke6e45e102007-12-01 00:00:00 +0000390VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
duke6e45e102007-12-01 00:00:00 +0000391
392VERSION_DEFINES += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
michaelm5ac8c152012-03-06 20:34:38 +0000393 -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"'
duke6e45e102007-12-01 00:00:00 +0000394
duke6e45e102007-12-01 00:00:00 +0000395$(OBJDIR)/main.$(OBJECT_SUFFIX): $(LAUNCHER_SHARE_SRC)/bin/main.c
396 @$(prep-target)
397 $(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$(OBJDIR)/main.$(OBJECT_SUFFIX) \
398 $(VERSION_DEFINES) $<
399
400#
duke6e45e102007-12-01 00:00:00 +0000401# Default dependencies
402#
403
404all: build
405
406build: program
407
408debug:
409 $(MAKE) VARIANT=DBG build
410
411fastdebug:
412 $(MAKE) VARIANT=DBG FASTDEBUG=true build
413
414.PHONY: all build program clean clobber debug fastdebug