1 # 2 # Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 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 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 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 # 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. 24 # 25 26 # WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk 27 28 # 29 # Makefile for building t2k rasteriser. 30 # 31 32 BUILDDIR = ../../.. 33 MODULE = font 34 PACKAGE = sun.font 35 LIBRARY = t2k 36 PRODUCT = sun 37 38 # Indicate we want the C++ compiler to do the linking. 39 CPLUSPLUSLIBRARY=true 40 41 # Part of the sun.font package, but doesn't rebuild classes (except 42 # for a few ones with native methods) so shouldn't clobber them. 43 DONT_CLOBBER_CLASSES=true 44 45 # Use higher optimization level 46 OPTIMIZATION_LEVEL = HIGHER 47 48 include $(BUILDDIR)/common/Defs.gmk 49 50 # 51 # Files 52 # 53 include FILES_c.gmk 54 55 FILES_export = \ 56 java/awt/Font.java \ 57 sun/font/FileFont.java \ 58 sun/font/FontManager.java \ 59 sun/font/GlyphList.java \ 60 sun/font/NativeFont.java \ 61 sun/font/StrikeCache.java \ 62 sun/font/T2KFontScaler.java 63 64 ifeq ($(PLATFORM), windows) 65 66 # t2k imports several shared methods from fontmanager.dll 67 LDLIBS += user32.lib $(OBJDIR)/../../../sun.font/fontmanager/$(OBJDIRNAME)/fontmanager.lib 68 69 OTHER_CFLAGS += -DCC_NOEX 70 OTHER_CXXFLAGS += -DCC_NOEX 71 72 endif # PLATFORM 73 74 # 75 # In the OpenJDK mode we are not building anything 76 # 77 ifndef OPENJDK 78 include $(BUILDDIR)/common/Mapfile-vers.gmk 79 include $(BUILDDIR)/common/Library.gmk 80 endif 81 82 # 83 # Add to the ambient vpath to pick up files in subdirectories 84 # 85 vpath %.c $(SHARE_SRC)/share/native/$(PKGDIR) 86 vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR) 87 vpath %.c $(CLOSED_SRC)/share/native/$(PKGDIR) 88 vpath %.c $(CLOSED_SRC)/share/native/$(PKGDIR)/t2k 89 vpath %.c $(CLOSED_SRC)/share/native/$(PKGDIR)/t2k/ttHints 90 91 vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR) 92 vpath %.cpp $(CLOSED_SRC)/share/native/$(PKGDIR) 93 94 # Libraries to link, and other C flags. 95 # 96 # setup the list of libraries to link in... 97 ifneq ($(PLATFORM), windows) 98 OTHER_LDLIBS += $(LIBM) $(LIBCXX) -lfontmanager 99 ifeq ($(PLATFORM), linux) 100 ifeq ("$(CC_VER_MAJOR)", "3") 101 OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic 102 endif 103 else 104 ifeq ($(PLATFORM), solaris) 105 OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt 106 endif 107 endif 108 endif 109 110 111 # set up compile flags.. 112 113 CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \ 114 -I$(CLOSED_SRC)/share/native/$(PKGDIR)/t2k \ 115 -I$(CLOSED_SRC)/share/native/$(PKGDIR) \ 116 -I$(SHARE_SRC)/share/native/$(PKGDIR) \ 117 -I$(PLATFORM_SRC)/native/$(PKGDIR) \ 118 -I$(SHARE_SRC)/native/sun/java2d/loops \ 119 -I$(SHARE_SRC)/native/sun/java2d/pipe \ 120 -I$(PLATFORM_SRC)/native/sun/java2d \ 121 -I$(SHARE_SRC)/native/sun/java2d \ 122 -I$(TEMPDIR)/../fontmanager/CClassHeaders