59 CFLAGS_linux:=-fPIC,\ |
69 CFLAGS_linux:=-fPIC,\ |
60 LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
70 LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
61 $(call SET_SHARED_LIBRARY_ORIGIN,../lib/$(LIBARCH)/jli) \ |
71 $(call SET_SHARED_LIBRARY_ORIGIN,../lib/$(LIBARCH)/jli) \ |
62 $(call SET_SHARED_LIBRARY_ORIGIN,../jre/lib/$(LIBARCH)/jli) \ |
72 $(call SET_SHARED_LIBRARY_ORIGIN,../jre/lib/$(LIBARCH)/jli) \ |
63 $3,\ |
73 $3,\ |
64 LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/launchers/mapfile-$(ARCH)),\ |
74 MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(ARCH), \ |
65 LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX),\ |
75 LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX),\ |
66 LDFLAGS_SUFFIX_posix:=$4 -lc,\ |
76 LDFLAGS_SUFFIX_posix:=$4 -lc,\ |
67 LDFLAGS_SUFFIX_winapi:=$5,\ |
77 LDFLAGS_SUFFIX_winapi:=$$($1_WINDOWS_JLI_LIB) \ |
68 BIN:=$(JDK_OUTPUTDIR)/newobjs/$1_objs,\ |
78 $(JDK_OUTPUTDIR)/objs/java.lib advapi32.lib $5,\ |
69 EXE:=$(JDK_OUTPUTDIR)/newobjs/$1$(EXE_SUFFIX),\ |
79 BIN:=$(JDK_OUTPUTDIR)/objs/$1_objs,\ |
70 VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ |
80 EXE:=$(JDK_OUTPUTDIR)/objs/$1$(EXE_SUFFIX),\ |
|
81 VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\ |
71 RC_FLAGS:=$(RC_FLAGS)\ |
82 RC_FLAGS:=$(RC_FLAGS)\ |
72 /D "JDK_FNAME=$1$(EXE_SUFFIX)" \ |
83 /D "JDK_FNAME=$1$(EXE_SUFFIX)" \ |
73 /D "JDK_INTERNAL_NAME=$1" \ |
84 /D "JDK_INTERNAL_NAME=$1" \ |
74 /D "JDK_FTYPE=0x1L") |
85 /D "JDK_FTYPE=0x1L" \ |
75 |
86 $7,\ |
76 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/newobjs/$1$(EXE_SUFFIX) $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX) |
87 MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest) |
|
88 |
|
89 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX) |
77 endef |
90 endef |
78 |
91 |
79 ########################################################################################## |
92 ########################################################################################## |
80 |
93 |
81 XLIBS:=-lX11 |
94 XLIBS:=-lX11 |
82 ifeq ($(PLATFORM),macosx) |
95 ifeq ($(PLATFORM),macosx) |
83 DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"' |
96 DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"' |
84 XLIBS:= |
97 XLIBS:= |
85 endif |
98 endif |
86 |
99 |
|
100 ifdef OPENJDK |
|
101 JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons" |
|
102 else |
|
103 JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows" |
|
104 endif |
|
105 |
87 $(eval $(call SetupLauncher,java,\ |
106 $(eval $(call SetupLauncher,java,\ |
88 -DEXPAND_CLASSPATH_WILDCARDS)) |
107 -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\ |
|
108 $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\ |
|
109 $(JDK_TOPDIR)/src/windows/resource/java.rc)) |
|
110 |
|
111 ifeq ($(HOST_OS),windows) |
|
112 $(eval $(call SetupLauncher,javaw,\ |
|
113 -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\ |
|
114 $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\ |
|
115 $(JDK_TOPDIR)/src/windows/resource/java.rc)) |
|
116 endif |
89 |
117 |
90 ifeq ($(PLATFORM),solaris) |
118 ifeq ($(PLATFORM),solaris) |
91 THREAD_LIB:=-lthread |
119 THREAD_LIB:=-lthread |
92 endif |
120 endif |
93 ifeq ($(PLATFORM),linux) |
121 ifeq ($(PLATFORM),linux) |
255 endif |
283 endif |
256 |
284 |
257 ########################################################################################## |
285 ########################################################################################## |
258 # The order of the object files on the link command line affects the size of the resulting |
286 # The order of the object files on the link command line affects the size of the resulting |
259 # binary (at least on linux) which causes the size to differ between old and new build. |
287 # binary (at least on linux) which causes the size to differ between old and new build. |
260 UNPACKEXE_ZIPOBJS = $(JDK_OUTPUTDIR)/newobjs/libzip/zcrc32$(OBJ_SUFFIX) \ |
288 ifeq ($(USE_EXTERNAL_LIBZ), true) |
261 $(JDK_OUTPUTDIR)/newobjs/libzip/deflate$(OBJ_SUFFIX) \ |
289 UNPACKEXE_ZIPOBJS := -lz |
262 $(JDK_OUTPUTDIR)/newobjs/libzip/trees$(OBJ_SUFFIX) \ |
290 else |
263 $(JDK_OUTPUTDIR)/newobjs/libzip/zadler32$(OBJ_SUFFIX) \ |
291 UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \ |
264 $(JDK_OUTPUTDIR)/newobjs/libzip/compress$(OBJ_SUFFIX) \ |
292 $(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \ |
265 $(JDK_OUTPUTDIR)/newobjs/libzip/zutil$(OBJ_SUFFIX) \ |
293 $(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \ |
266 $(JDK_OUTPUTDIR)/newobjs/libzip/inflate$(OBJ_SUFFIX) \ |
294 $(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \ |
267 $(JDK_OUTPUTDIR)/newobjs/libzip/infback$(OBJ_SUFFIX) \ |
295 $(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \ |
268 $(JDK_OUTPUTDIR)/newobjs/libzip/inftrees$(OBJ_SUFFIX) \ |
296 $(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \ |
269 $(JDK_OUTPUTDIR)/newobjs/libzip/inffast$(OBJ_SUFFIX) |
297 $(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \ |
|
298 $(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \ |
|
299 $(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \ |
|
300 $(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX) |
|
301 |
|
302 |
|
303 $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS) |
|
304 |
|
305 endif |
270 |
306 |
271 $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\ |
307 $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\ |
272 SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\ |
308 SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\ |
273 EXCLUDE_FILES:=jni.cpp,\ |
309 EXCLUDE_FILES:=jni.cpp,\ |
274 LANG:=C++,\ |
310 LANG:=C,\ |
275 CFLAGS:=$(CXXFLAGS_JDKEXE) $(CXX_O_FLAG_NORM) \ |
311 CFLAGS:=$(CXXFLAGS_JDKEXE) $(CXX_O_FLAG_NORM) \ |
276 -DFULL \ |
312 -DFULL \ |
277 -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\ |
313 -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\ |
278 CFLAGS_release:=-DPRODUCT,\ |
314 CFLAGS_release:=-DPRODUCT,\ |
279 CFLAGS_linux:=-fPIC,\ |
315 CFLAGS_linux:=-fPIC,\ |
|
316 MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \ |
280 LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
317 LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
281 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libunpack/mapfile-vers-unpack200) \ |
|
282 $(call SET_SHARED_LIBRARY_ORIGIN), \ |
318 $(call SET_SHARED_LIBRARY_ORIGIN), \ |
283 LDFLAGS_SUFFIX:=$(UNPACKEXE_ZIPOBJS) $(LIBCXX),\ |
319 LDFLAGS_SUFFIX:=$(UNPACKEXE_ZIPOBJS) $(LIBCXX),\ |
284 LDFLAGS_SUFFIX_solaris:=-lc,\ |
320 LDFLAGS_SUFFIX_solaris:=-lc,\ |
285 BIN:=$(JDK_OUTPUTDIR)/newobjs/unpackexe,\ |
321 BIN:=$(JDK_OUTPUTDIR)/objs/unpackexe,\ |
286 EXE:=$(JDK_OUTPUTDIR)/newobjs/unpack200$(EXE_SUFFIX),\ |
322 EXE:=$(JDK_OUTPUTDIR)/objs/unpack200$(EXE_SUFFIX),\ |
287 VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ |
323 VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ |
288 RC_FLAGS:=$(RC_FLAGS)\ |
324 RC_FLAGS:=$(RC_FLAGS)\ |
289 /D "JDK_FNAME=unpack200.exe" \ |
325 /D "JDK_FNAME=unpack200.exe" \ |
290 /D "JDK_INTERNAL_NAME=unpack200" \ |
326 /D "JDK_INTERNAL_NAME=unpack200" \ |
291 /D "JDK_FTYPE=0x1L")) |
327 /D "JDK_FTYPE=0x1L",\ |
292 |
328 MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest)) |
293 $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS) |
|
294 |
|
295 ifeq ($(HOST_OS_API),winapi) |
|
296 UNPACK_MANIFEST:=$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest |
|
297 IMVERSIONVALUE=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER) |
|
298 SED_ALL_MANIFEST=$(SED) -e 's%IMVERSION%$(IMVERSIONVALUE)%g' |
|
299 |
|
300 $(UNPACK_MANIFEST): $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest |
|
301 $(CAT) $< | $(SED_ALL_MANIFEST) > $@ |
|
302 |
|
303 # Adding a dependency to spec file might be a good idea here, to force rerun on version change. |
|
304 $(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest.mt: $(UNPACK_MANIFEST) |
|
305 $(MT) /manifest $< /outputresource:$(JDK_OUTPUTDIR)/newobjs/unpack200$(EXE_SUFFIX);#1 |
|
306 touch $@ |
|
307 |
|
308 $(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest.mt: $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX) |
|
309 endif |
|
310 |
329 |
311 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX) |
330 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX) |
|
331 |
|
332 ########################################################################################## |
|
333 |
|
334 |
|
335 BUILD_JEXEC := |
|
336 BUILD_JEXEC_SRC := |
|
337 BUILD_JEXEC_INC := |
|
338 BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/jexec$(EXE_SUFFIX) |
|
339 |
|
340 # |
|
341 # UNHANDLED: |
|
342 # - COMPILE_APPROACH = normal |
|
343 # |
|
344 |
|
345 # |
|
346 # jdk/make/java/Makefile |
|
347 # |
|
348 ifeq ($(PLATFORM), solaris) |
|
349 ifeq ($(ARCH_DATA_MODEL), 32) |
|
350 BUILD_JEXEC := 1 |
|
351 endif |
|
352 endif |
|
353 |
|
354 ifeq ($(PLATFORM), linux) |
|
355 BUILD_JEXEC := 1 |
|
356 endif # PLATFORM |
|
357 |
|
358 # |
|
359 # jdk/make/java/jexec/Makefile |
|
360 # |
|
361 ifeq ($(BUILD_JEXEC), 1) |
|
362 |
|
363 ifeq ($(PLATFORM),windows) |
|
364 else ifeq ($(PLATFORM),macosx) |
|
365 BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin |
|
366 else |
|
367 BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin |
|
368 endif |
|
369 |
|
370 ifeq ($(PLATFORM), linux) |
|
371 BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/jexec$(EXE_SUFFIX) |
|
372 BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin |
|
373 endif |
|
374 endif |
|
375 |
|
376 # |
|
377 # Note that the two Makefile's seems to contradict each other, |
|
378 # and that src/macosx/bin/jexec.c seems unused |
|
379 # |
|
380 ifneq ($(BUILD_JEXEC_SRC),) |
|
381 $(eval $(call SetupNativeCompilation,BUILD_JEXEC,\ |
|
382 SRC:=$(BUILD_JEXEC_SRC),\ |
|
383 INCLUDE_FILES:=jexec.c,\ |
|
384 LANG:=C,\ |
|
385 CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \ |
|
386 $(BUILD_JEXEC_INC), \ |
|
387 LDFLAGS:=$(LDFLAGS_JDKEXE), \ |
|
388 BIN:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\ |
|
389 EXE:=$(BUILD_JEXEC_DST))) |
|
390 |
|
391 BUILD_LAUNCHERS += $(BUILD_JEXEC_DST) |
|
392 endif |
312 |
393 |
313 ########################################################################################## |
394 ########################################################################################## |
314 |
395 |
315 # |
396 # |
316 # The java-rmi.cgi script in bin/ only gets delivered in certain situations |
397 # The java-rmi.cgi script in bin/ only gets delivered in certain situations |
333 # now. Should probably just be deleted. |
414 # now. Should probably just be deleted. |
334 # http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052 |
415 # http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052 |
335 ifeq ($(HOST_OS_API),winapi) |
416 ifeq ($(HOST_OS_API),winapi) |
336 $(eval $(call SetupLauncher,java-rmi,\ |
417 $(eval $(call SetupLauncher,java-rmi,\ |
337 -DEXPAND_CLASSPATH_WILDCARDS,\ |
418 -DEXPAND_CLASSPATH_WILDCARDS,\ |
338 $(call SET_SHARED_LIBRARY_MAPFILE,makefiles/java/main/java/mapfile-$(ARCH)))) |
419 $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(ARCH)))) |
339 |
420 |
340 $(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/newobjs/java-rmi$(EXE_SUFFIX) |
421 $(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/objs/java-rmi$(EXE_SUFFIX) |
|
422 $(MKDIR) -p $(@D) |
341 $(CP) $< $@ |
423 $(CP) $< $@ |
342 |
424 |
343 BUILD_LAUNCHERS += $(JAVA_RMI_CGI) |
425 BUILD_LAUNCHERS += $(JAVA_RMI_CGI) |
344 else |
426 else |
345 $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh |
427 $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh |
|
428 $(MKDIR) -p $(@D) |
346 $(CP) $< $@ |
429 $(CP) $< $@ |
347 $(CHMOD) a+x $@ |
430 $(CHMOD) a+x $@ |
348 endif |
431 endif |
349 |
432 |
350 ########################################################################################## |
433 ########################################################################################## |
351 |
434 |
352 $(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/newobjs/% |
435 $(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/objs/% |
353 echo Copying $(@F) |
436 $(ECHO) Copying $(@F) |
|
437 $(MKDIR) -p $(@D) |
354 $(CP) $< $@ |
438 $(CP) $< $@ |
355 |
439 |
356 $(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk |
440 $(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk |
357 |
441 |
358 all: $(BUILD_LAUNCHERS) |
442 all: $(BUILD_LAUNCHERS) |