jdk/make/tools/freetypecheck/Makefile
author tbell
Fri, 21 Aug 2009 12:12:48 -0700
changeset 3640 fd536f8d24a6
parent 715 f16baef3a20e
child 5506 202f599c92aa
permissions -rw-r--r--
6705913: freetype_versioncheck.exe - Unable To Locate Component Summary: Update freetype_versioncheck to deal with newer Visual Studio releases Reviewed-by: ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 305
diff changeset
     2
# Copyright 2007-2008 Sun Microsystems, Inc.  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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
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
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
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)
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
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
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    43
ifdef MT
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    44
  FT_LD_OPTIONS += /manifest
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
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
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  ifeq ($(PLATFORM), solaris)
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    51
    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH) -lfreetype
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  else #linux
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    53
      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
endif
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    56
FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    57
FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)/freetype2
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    58
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
    59
FT_LD_OPTIONS += $(LFLAGS_$(COMPILER_VERSION))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    61
# Create test program
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    62
all: $(FT_TEST)
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    63
	$(FT_TEST)
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    64
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    65
# 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
    66
#   at runtime
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    67
$(FT_TEST): freetypecheck.c
3640
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    68
	$(prep-target)
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    69
ifeq ($(PLATFORM), windows)
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    70
	$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    71
	$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ)
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    72
	$(CP) $(FREETYPE_DLL) $(@D)/
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    73
ifdef MT
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    74
	$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    75
	$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    76
endif
fd536f8d24a6 6705913: freetype_versioncheck.exe - Unable To Locate Component
tbell
parents: 715
diff changeset
    77
else
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    78
	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
endif
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    80
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    81
else
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    82
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    83
# Inform user this is openjdk only
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    84
all:
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    85
	@$(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
    86
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    87
endif
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    88
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    89
clean::
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    90
	$(RM) $(FT_TEST)
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 28
diff changeset
    91