jdk/make/tools/freetypecheck/Makefile
author dsamersoff
Thu, 17 Oct 2013 16:08:01 +0400
changeset 21069 728330d2593a
parent 14342 8435a30053c1
permissions -rw-r--r--
8025812: tmtools/jmap/heap_config tests fail on Linux-ia32 because it Cant attach to the core file Summary: Coredump store memsz elf field rounded up to page Reviewed-by: dholmes, sla
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 14091
diff changeset
     2
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3640
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3640
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3640
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3640
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3640
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    25
# Builds and runs test program for freetype sanity check.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    30
# Default name
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    31
PROGRAM = freetype_versioncheck
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    32
FT_OBJ = $(BUILDTOOLBINDIR)/$(PROGRAM).$(OBJECT_SUFFIX)
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    33
FT_TEST = $(BUILDTOOLBINDIR)/$(PROGRAM)$(EXE_SUFFIX)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    35
# Used on openjdk only
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    36
ifeq ($(OPENJDK),true)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
28
a2b62af4c8c5 6638571: Fix freetype sanity check to work on solaris 64bit
ohair
parents: 2
diff changeset
    38
# Start with CFLAGS (which gets us the required -xarch setting on solaris)
a2b62af4c8c5 6638571: Fix freetype sanity check to work on solaris 64bit
ohair
parents: 2
diff changeset
    39
ifeq ($(PLATFORM), windows)
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
    40
  FT_OPTIONS  = -nologo -c
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    41
  FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    42
  FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
11369
d1de4020afbd 7128320: Fix freetype sanity check to make it more generic
ohair
parents: 5506
diff changeset
    43
  ifdef MT
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
    44
    FT_LD_OPTIONS += -manifest
11369
d1de4020afbd 7128320: Fix freetype sanity check to make it more generic
ohair
parents: 5506
diff changeset
    45
  endif
28
a2b62af4c8c5 6638571: Fix freetype sanity check to work on solaris 64bit
ohair
parents: 2
diff changeset
    46
else
a2b62af4c8c5 6638571: Fix freetype sanity check to work on solaris 64bit
ohair
parents: 2
diff changeset
    47
  FT_OPTIONS  = $(CFLAGS)
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    48
  FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    49
  # Add runtime lib search path to ensure test will be runnable
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    50
  ifeq ($(PLATFORM), solaris)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    51
    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH) -lfreetype
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    52
  else
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    53
    ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    54
      FT_LD_OPTIONS += -lfreetype -lz
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    55
    else # linux
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    56
      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11369
diff changeset
    57
    endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
endif
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    60
FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    61
FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)/freetype2
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    62
FT_OPTIONS += -DREQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    63
FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    65
# Create test program
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    66
all: $(FT_TEST)
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    67
	$(FT_TEST)
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    68
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    69
# On windows we need to copy dll to test dir to ensure it will be found
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    70
#   at runtime
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    71
$(FT_TEST): freetypecheck.c
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    72
	$(prep-target)
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    73
ifeq ($(PLATFORM), windows)
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    74
	$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
    75
	$(LINK) $(FT_LD_OPTIONS) -OUT:$(FT_TEST) $(FT_OBJ)
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    76
	$(CP) $(FREETYPE_DLL) $(@D)/
11369
d1de4020afbd 7128320: Fix freetype sanity check to make it more generic
ohair
parents: 5506
diff changeset
    77
  ifdef MT
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    78
	$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
14091
e5c8662f325d 7152336: Enable builds on Windows with MinGW/MSYS
tbell
parents: 12047
diff changeset
    79
	$(MT) -manifest $(FT_TEST).manifest -outputresource:$(FT_TEST);#1
11369
d1de4020afbd 7128320: Fix freetype sanity check to make it more generic
ohair
parents: 5506
diff changeset
    80
  endif
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    81
else
11369
d1de4020afbd 7128320: Fix freetype sanity check to make it more generic
ohair
parents: 5506
diff changeset
    82
	@$(CC) $(FT_OPTIONS) -o $@ $< $(FT_LD_OPTIONS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
endif
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    84
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    85
else
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    86
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    87
# Inform user this is openjdk only
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    88
all:
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    89
	@$(ECHO) "The freetype files are only used with OpenJDK"
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    90
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    91
endif
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    92
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    93
clean::
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    94
	$(RM) $(FT_TEST)
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    95