annotate make/tools/freetypecheck/Makefile @ 0:37a05a11f281

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 929222887724
rev   line source
duke@0 1 #
duke@0 2 # Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation. Sun designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
duke@0 9 # by Sun in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
duke@0 21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 22 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 23 # have any questions.
duke@0 24
duke@0 25 # Builds test program for freetype sanity check.
duke@0 26 #
duke@0 27 # Makefile should be called with following input parameters
duke@0 28 # FT_TEST - full name of test program
duke@0 29 # FT_HEADERS - path to freetype headers
duke@0 30 # FT_LIB - location of directory with library
duke@0 31 # XARCH - xarch option if required
duke@0 32
duke@0 33 BUILDDIR = ../..
duke@0 34 include $(BUILDDIR)/common/Defs.gmk
duke@0 35
duke@0 36 #test program is expected in the TEMPDIR
duke@0 37 FT_TEST_PATH = $(TEMPDIR)/$(FT_TEST)
duke@0 38
duke@0 39 all: $(FT_TEST_PATH)
duke@0 40
duke@0 41 FT_OPTIONS = -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
duke@0 42 FT_OPTIONS += $(XARCH)
duke@0 43
duke@0 44 #add runtime library search path
duke@0 45 ifeq ($(PLATFORM), windows)
duke@0 46 FREETYPE_LIB=$(FT_LIB)/freetype.lib
duke@0 47 FREETYPE_DLL=$(FT_LIB)/freetype.dll
duke@0 48 DFLAG=/D
duke@0 49 else
duke@0 50 FT_OPTIONS += -L$(FT_LIB)
duke@0 51 DFLAG = -D
duke@0 52
duke@0 53 #add runtime lib search path to ensure test will be runnable
duke@0 54 ifeq ($(PLATFORM), solaris)
duke@0 55 FT_OPTIONS += -R $(FT_LIB) -lfreetype
duke@0 56 else #linux
duke@0 57 FT_OPTIONS += -Wl,-rpath -Wl,$(FT_LIB) -lfreetype
duke@0 58 endif
duke@0 59 endif
duke@0 60
duke@0 61 FT_OPTIONS += $(DFLAG)REQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION)
duke@0 62
duke@0 63 # On windows we need to copy dll to test dir
duke@0 64 # ti ensure it will be found in runtime
duke@0 65 $(FT_TEST_PATH): freetypecheck.c
duke@0 66 @$(CC) $(FT_OPTIONS) $(CC_PROGRAM_OUTPUT_FLAG)$@ $< $(FREETYPE_LIB) $(LFLAGS_$(COMPILER_VERSION))
duke@0 67 ifeq ($(PLATFORM), windows)
duke@0 68 @$(CP) $(FREETYPE_DLL) `dirname $@`
duke@0 69 endif