author | dsamersoff |
Thu, 17 Oct 2013 16:08:01 +0400 | |
changeset 21069 | 728330d2593a |
parent 14342 | 8435a30053c1 |
permissions | -rw-r--r-- |
2 | 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 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 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 | 26 |
|
27 |
BUILDDIR = ../.. |
|
28 |
include $(BUILDDIR)/common/Defs.gmk |
|
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 | 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 | 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 | 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 | 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 | 58 |
endif |
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 | 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 | 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 | 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 | 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 |