Mercurial > hg > graal-compiler
comparison make/bsd/makefiles/universal.gmk @ 13086:096c224171c4
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 20 Nov 2013 00:10:38 +0100 |
parents | f509b8f4699b |
children | cdf27f6a6d01 |
comparison
equal
deleted
inserted
replaced
12782:92b7ec34ddfa | 13086:096c224171c4 |
---|---|
1 # | 1 # |
2 # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 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 | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 # | 18 # |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 # or visit www.oracle.com if you need additional information or have any | 20 # or visit www.oracle.com if you need additional information or have any |
21 # questions. | 21 # questions. |
22 # | 22 # |
23 # | 23 # |
24 | 24 |
25 # macosx universal builds | 25 # macosx universal builds |
26 universal_product: | 26 universal_product: |
27 $(MAKE) MACOSX_UNIVERSAL=true all_product_universal | 27 $(MAKE) MACOSX_UNIVERSAL=true all_product_universal |
33 | 33 |
34 # Universal builds include 1 or more architectures in a single binary | 34 # Universal builds include 1 or more architectures in a single binary |
35 all_product_universal: | 35 all_product_universal: |
36 # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_PRODUCT_TARGETS) | 36 # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_PRODUCT_TARGETS) |
37 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_PRODUCT_TARGETS) | 37 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_PRODUCT_TARGETS) |
38 $(QUIETLY) $(MAKE) EXPORT_SUBDIR= universalize | 38 $(QUIETLY) $(MAKE) BUILD_FLAVOR=product EXPORT_SUBDIR= universalize |
39 all_fastdebug_universal: | 39 all_fastdebug_universal: |
40 # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_FASTDEBUG_TARGETS) | 40 # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_FASTDEBUG_TARGETS) |
41 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_FASTDEBUG_TARGETS) | 41 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_FASTDEBUG_TARGETS) |
42 $(QUIETLY) $(MAKE) EXPORT_SUBDIR=/fastdebug universalize | 42 $(QUIETLY) $(MAKE) BUILD_FLAVOR=fastdebug EXPORT_SUBDIR=/fastdebug universalize |
43 all_debug_universal: | 43 all_debug_universal: |
44 # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_DEBUG_TARGETS) | 44 # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_DEBUG_TARGETS) |
45 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_DEBUG_TARGETS) | 45 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_DEBUG_TARGETS) |
46 $(QUIETLY) $(MAKE) EXPORT_SUBDIR=/debug universalize | 46 $(QUIETLY) $(MAKE) BUILD_FLAVOR=debug EXPORT_SUBDIR=/debug universalize |
47 | 47 |
48 | 48 |
49 # Consolidate architecture builds into a single Universal binary | 49 # Consolidate architecture builds into a single Universal binary |
50 universalize: $(UNIVERSAL_LIPO_LIST) $(UNIVERSAL_COPY_LIST) | 50 universalize: $(UNIVERSAL_LIPO_LIST) $(UNIVERSAL_COPY_LIST) |
51 $(RM) -r $(EXPORT_PATH)/jre/lib/{i386,amd64} | 51 $(RM) -r $(EXPORT_PATH)/jre/lib/{i386,amd64} |
55 $(UNIVERSAL_LIPO_LIST): | 55 $(UNIVERSAL_LIPO_LIST): |
56 BUILT_LIPO_FILES="`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) 2>/dev/null`"; \ | 56 BUILT_LIPO_FILES="`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) 2>/dev/null`"; \ |
57 if [ -n "$${BUILT_LIPO_FILES}" ]; then \ | 57 if [ -n "$${BUILT_LIPO_FILES}" ]; then \ |
58 $(MKDIR) -p $(shell dirname $@); \ | 58 $(MKDIR) -p $(shell dirname $@); \ |
59 lipo -create -output $@ $${BUILT_LIPO_FILES}; \ | 59 lipo -create -output $@ $${BUILT_LIPO_FILES}; \ |
60 fi | 60 fi |
61 | 61 |
62 | 62 |
63 # Copy built non-universal binaries in place | 63 # Copy built non-universal binaries in place |
64 # - copies directories; including empty dirs | |
65 # - copies files, symlinks, other non-directory files | |
64 $(UNIVERSAL_COPY_LIST): | 66 $(UNIVERSAL_COPY_LIST): |
65 BUILT_COPY_FILES="`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) 2>/dev/null`"; \ | 67 BUILT_COPY_FILES="`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) -prune 2>/dev/null`"; \ |
66 if [ -n "$${BUILT_COPY_FILES}" ]; then \ | 68 if [ -n "$${BUILT_COPY_FILES}" ]; then \ |
67 for i in $${BUILT_COPY_FILES}; do \ | 69 for i in $${BUILT_COPY_FILES}; do \ |
68 if [ -f $${i} ]; then \ | 70 $(MKDIR) -p $(shell dirname $@); \ |
69 $(MKDIR) -p $(shell dirname $@); \ | 71 $(CP) -R $${i} $@; \ |
70 $(CP) $${i} $@; \ | |
71 fi; \ | |
72 done; \ | 72 done; \ |
73 fi | 73 fi |
74 | 74 |
75 | 75 |
76 # Replace arch specific binaries with universal binaries | 76 # Replace arch specific binaries with universal binaries |