changeset 4892:7c8c16f2c05e

7128320: Fix freetype sanity check to make it more generic Reviewed-by: luchsh, katleman Contributed-by: Jonathan Lu <luchsh@linux.vnet.ibm.com>
author ohair
date Mon, 09 Jan 2012 09:18:37 -0800
parents ddb97d4fa83d
children 664fa4fb0ee4
files make/common/Defs-linux.gmk make/common/Defs-solaris.gmk make/common/Defs-windows.gmk make/common/Demo.gmk make/tools/freetypecheck/Makefile
diffstat 5 files changed, 16 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-linux.gmk	Wed Jan 04 17:42:25 2012 -0800
+++ b/make/common/Defs-linux.gmk	Mon Jan 09 09:18:37 2012 -0800
@@ -72,7 +72,6 @@
 SCRIPT_SUFFIX =
 # CC compiler object code output directive flag value
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
-CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
 # Default OBJCOPY comes from GNU Binutils on Linux:
 DEF_OBJCOPY=/usr/bin/objcopy
--- a/make/common/Defs-solaris.gmk	Wed Jan 04 17:42:25 2012 -0800
+++ b/make/common/Defs-solaris.gmk	Mon Jan 09 09:18:37 2012 -0800
@@ -72,7 +72,6 @@
 SCRIPT_SUFFIX =
 # CC compiler object code output directive flag value
 CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
-CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
 
 ifdef ENABLE_FULL_DEBUG_SYMBOLS
 # Only check for Full Debug Symbols support on Solaris if it is
--- a/make/common/Defs-windows.gmk	Wed Jan 04 17:42:25 2012 -0800
+++ b/make/common/Defs-windows.gmk	Mon Jan 09 09:18:37 2012 -0800
@@ -36,7 +36,6 @@
 
 # CC compiler object code output directive flag value
 CC_OBJECT_OUTPUT_FLAG = -Fo
-CC_PROGRAM_OUTPUT_FLAG = -Fe
 
 # The suffix applied to the library name for FDLIBM
 FDDLIBM_SUFFIX = lib
--- a/make/common/Demo.gmk	Wed Jan 04 17:42:25 2012 -0800
+++ b/make/common/Demo.gmk	Mon Jan 09 09:18:37 2012 -0800
@@ -319,9 +319,12 @@
 	@$(prep-target)
   ifeq ($(PLATFORM),windows)
 	$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(DEMO_VERSION_INFO) $(VERSIONINFO_RESOURCE)
+	$(LINK.demo) $(SHARED_LIBRARY_FLAG) -Fe$@ \
+	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
+  else
+	$(LINK.demo) $(SHARED_LIBRARY_FLAG) -o $@ \
+	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
   endif
-	$(LINK.demo) $(SHARED_LIBRARY_FLAG) $(CC_PROGRAM_OUTPUT_FLAG)$@ \
-	    $(DEMO_FULL_OBJECTS) $(LDLIBS.demo)
 	@$(call binary_file_verification,$@)
 
   # Generation of any javah include file, make sure objects are dependent on it
--- a/make/tools/freetypecheck/Makefile	Wed Jan 04 17:42:25 2012 -0800
+++ b/make/tools/freetypecheck/Makefile	Mon Jan 09 09:18:37 2012 -0800
@@ -40,18 +40,19 @@
   FT_OPTIONS  = /nologo /c
   FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
   FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
-ifdef MT
-  FT_LD_OPTIONS += /manifest
-endif
+  ifdef MT
+    FT_LD_OPTIONS += /manifest
+  endif
 else
   FT_OPTIONS  = $(CFLAGS)
   FT_LD_OPTIONS = -L$(FREETYPE_LIB_PATH)
   # Add runtime lib search path to ensure test will be runnable
-  ifeq ($(PLATFORM), solaris)
-    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH) -lfreetype
-  else #linux
-      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
+  ifeq ($(PLATFORM), linux)
+    FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH)
+  else # other unix
+    FT_LD_OPTIONS += -R $(FREETYPE_LIB_PATH)
   endif
+  FT_LD_OPTIONS += -lfreetype
 endif
 FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)
 FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)/freetype2
@@ -70,12 +71,12 @@
 	$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
 	$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ)
 	$(CP) $(FREETYPE_DLL) $(@D)/
-ifdef MT
+  ifdef MT
 	$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
 	$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1
-endif
+  endif
 else
-	@$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FT_LD_OPTIONS)
+	@$(CC) $(FT_OPTIONS) -o $@ $< $(FT_LD_OPTIONS)
 endif
 
 else