jdk/makefiles/GensrcX11Wrappers.gmk
author amurillo
Wed, 15 Aug 2012 16:49:38 -0700
changeset 13465 d3fc5d192448
parent 13164 72c5d01a857d
child 13702 efd6a05935b2
permissions -rw-r--r--
7191765: make jdk8 the default jprt release for hs24 Reviewed-by: jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     1
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     2
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     4
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    10
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    15
# accompanied this code).
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    16
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    20
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    23
# questions.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    24
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    25
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    26
GENSRC_X11WRAPPERS :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    27
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    28
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    29
GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    30
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    31
GENSRC_SIZES :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    32
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    33
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    34
GENSRC_SIZES := sizes.32 sizes.64
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    35
else ifeq ($(OPENJDK_TARGET_OS), solaris)
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    36
isalist:=$(shell isainfo)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    37
ifneq (,$(findstring sparcv9, $(isalist)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    38
# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    39
GENSRC_SIZES := sizes.32 sizes.64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    40
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    41
ifneq (,$(findstring amd64, $(isalist)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    42
# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    43
GENSRC_SIZES := sizes.32 sizes.64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    44
else # !sparcv9 : includes (32-bit) sparc, i586
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    45
GENSRC_SIZES := sizes.32
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    46
endif # amd64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    47
endif # sparcv9
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    48
else # !solaris
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    49
ifeq ($(OPENJDK_TARGET_OS), macosx)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    50
GENSRC_SIZES := sizes.32 sizes.64
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    51
else # !macosx
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    52
GENSRC_SIZES := sizes.$(ARCH_DATA_MODEL)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    53
endif # !macosx
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    54
endif # solaris
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    55
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    56
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    57
##########################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    58
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    59
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    60
	$(MKDIR) -p $(@D)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    61
	$(RM) $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    62
	$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    63
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    64
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    65
	(cd $(@D) && $(HOST_CC) -m$* -o $@ $< \
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    66
              -I$(JDK_OUTPUTDIR)/include \
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    67
              -I$(JDK_TOPDIR)/src/share/javavm/export \
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    68
              -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export \
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    69
              -I$(JDK_TOPDIR)//src/share/native/common \
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    70
              -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/common \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    71
              -I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    72
	      -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    73
	      -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    74
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    75
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    76
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    77
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.32 : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.32.exe
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    78
	$< > $@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    79
	$(MV) $@.tmp $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    80
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    81
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(OPENJDK_TARGET_OS)-$(LIBARCH)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    82
	$(MKDIR) -p $(@D)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    83
	$(CP) $< $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    84
else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    85
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    86
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    87
	$< > $@.tmp
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    88
	$(MV) $@.tmp $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    89
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    90
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    91
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    92
$(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    93
	$(MKDIR) -p $(@D)/sun/awt/X11
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    94
	$(RM) $(@D)/sun/awt/X11/*
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    95
	$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    96
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-amd64)
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    97
	$(ECHO) COMPARING $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 and $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
    98
	$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    99
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   100
	$(TOUCH) $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   101
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   102
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes