open-src/font/Makefile.bdf
changeset 837 ee480af8e87c
child 907 3c35d611cdaa
equal deleted inserted replaced
836:2904a8ef7bc6 837:ee480af8e87c
       
     1 # -*- Makefile -*- rules common to most X.Org bdf/pcf font modules
       
     2 #
       
     3 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
       
     4 # Use is subject to license terms.
       
     5 #
       
     6 # Permission is hereby granted, free of charge, to any person obtaining a
       
     7 # copy of this software and associated documentation files (the
       
     8 # "Software"), to deal in the Software without restriction, including
       
     9 # without limitation the rights to use, copy, modify, merge, publish,
       
    10 # distribute, and/or sell copies of the Software, and to permit persons
       
    11 # to whom the Software is furnished to do so, provided that the above
       
    12 # copyright notice(s) and this permission notice appear in all copies of
       
    13 # the Software and that both the above copyright notice(s) and this
       
    14 # permission notice appear in supporting documentation.
       
    15 # 
       
    16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
       
    17 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
       
    19 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
       
    20 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
       
    21 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
       
    22 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
       
    23 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
       
    24 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
       
    25 # 
       
    26 # Except as contained in this notice, the name of a copyright holder
       
    27 # shall not be used in advertising or otherwise to promote the sale, use
       
    28 # or other dealings in this Software without prior written authorization
       
    29 # of the copyright holder.
       
    30 #
       
    31 # ident	"@(#)Makefile.bdf	1.1	09/11/23 SMI"
       
    32 #
       
    33 
       
    34 ### Makefile settings/rules common to most bdf/pcf X.Org font modules
       
    35 
       
    36 PWD:sh=pwd
       
    37 TOP=$(PWD)/../..
       
    38 
       
    39 MODTYPE=font
       
    40 
       
    41 ### Include common definitions
       
    42 include $(TOP)/common/Makefile.init
       
    43 
       
    44 
       
    45 # All the encodings defined in font-util/fontutil.m4.in
       
    46 ALL_ENCODINGS = \
       
    47 	iso8859-1  iso8859-2  iso8859-3  iso8859-4  iso8859-5  \
       
    48 	iso8859-6  iso8859-7  iso8859-8  iso8859-9  iso8859-10 \
       
    49 	iso8859-11 iso8859-12 iso8859-13 iso8859-14 iso8859-15 \
       
    50 	iso8859-16 jisx0201   koi8-r
       
    51 
       
    52 # Encodings we split out into separate subdirs for packaging
       
    53 BDF_SUBDIR_ENCODINGS =	\
       
    54 	iso8859-1       \
       
    55 	iso8859-2       \
       
    56         iso8859-3       \
       
    57         iso8859-4       \
       
    58         iso8859-5       \
       
    59         iso8859-7       \
       
    60         iso8859-8       \
       
    61         iso8859-9       \
       
    62         iso8859-10      \
       
    63         iso8859-11      \
       
    64         iso8859-13      \
       
    65         iso8859-14      \
       
    66         iso8859-15      \
       
    67         iso8859-16
       
    68 
       
    69 BUILD_TYPES = core $(BDF_SUBDIR_ENCODINGS)
       
    70 BUILD_TYPES_SET = yes
       
    71 
       
    72 DISABLE_ALL_ENCODINGS = $(ALL_ENCODINGS:%=--disable-%)
       
    73 core_ENCODING_CONFIG_OPTS = $(BDF_SUBDIR_ENCODINGS:%=--disable-%)
       
    74 
       
    75 iso8859-1_ENCODING_CONFIG_OPTS = \
       
    76 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-1=--enable-iso8859-1)
       
    77 iso8859-2_ENCODING_CONFIG_OPTS = \
       
    78 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-2=--enable-iso8859-2)
       
    79 iso8859-3_ENCODING_CONFIG_OPTS = \
       
    80 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-3=--enable-iso8859-3)
       
    81 iso8859-4_ENCODING_CONFIG_OPTS = \
       
    82 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-4=--enable-iso8859-4)
       
    83 iso8859-5_ENCODING_CONFIG_OPTS = \
       
    84 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-5=--enable-iso8859-5)
       
    85 iso8859-7_ENCODING_CONFIG_OPTS = \
       
    86 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-7=--enable-iso8859-7)
       
    87 iso8859-8_ENCODING_CONFIG_OPTS = \
       
    88 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-8=--enable-iso8859-8)
       
    89 iso8859-9_ENCODING_CONFIG_OPTS = \
       
    90 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-9=--enable-iso8859-9)
       
    91 iso8859-10_ENCODING_CONFIG_OPTS = \
       
    92 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-10=--enable-iso8859-10)
       
    93 iso8859-11_ENCODING_CONFIG_OPTS = \
       
    94 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-11=--enable-iso8859-11)
       
    95 iso8859-13_ENCODING_CONFIG_OPTS = \
       
    96 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-13=--enable-iso8859-13)
       
    97 iso8859-14_ENCODING_CONFIG_OPTS = \
       
    98 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-14=--enable-iso8859-14)
       
    99 iso8859-15_ENCODING_CONFIG_OPTS = \
       
   100 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-15=--enable-iso8859-15)
       
   101 iso8859-16_ENCODING_CONFIG_OPTS = \
       
   102 	$(DISABLE_ALL_ENCODINGS:--disable-iso8859-16=--enable-iso8859-16)
       
   103 
       
   104 ENCODED_FONTDIR=$(X11_FONT_DIR)/$(FONTSUBDIR)-$(BUILD_TYPE:iso%=ISO%)
       
   105 MODULE_FONTDIR=$(ENCODED_FONTDIR:%-core=%)
       
   106 
       
   107 MODULE_CONFIG_OPTS = $($(BUILD_TYPE)_ENCODING_CONFIG_OPTS) \
       
   108 	--with-fontdir="$(MODULE_FONTDIR)"
       
   109 
       
   110 BUILD_DIR = build_$(BUILD_TYPE)
       
   111 
       
   112 core_INSTALL_CORE_FONTS=yes
       
   113 # All other build types are left unset for "no"
       
   114 MODTYPE_MAKEFLAGS_DEFAULT=$($(BUILD_TYPE)_INSTALL_CORE_FONTS:yes=$(POUND_SIGN))
       
   115 $(MODTYPE_MAKEFLAGS_DEFAULT)	MODTYPE_MAKEFLAGS=PCF_FILES=""
       
   116 
       
   117 MODULE_ADD_INSTALL_TARGETS = install_license
       
   118 
       
   119 ### Include common rulesets
       
   120 include ../Makefile.inc
       
   121 
       
   122 CLEAN_RULES = $(BUILD_TYPES:%=clean_%)
       
   123 
       
   124 $(CLEAN_RULES):
       
   125 	-rm -rf $(@:clean_%=build_%)
       
   126 
       
   127 # Clean up old directories when we switch to the new rules
       
   128 clean:: clean_32
       
   129 
       
   130 .PARALLEL: $(CLEAN_RULES) clean_32
       
   131 
       
   132 SOURCE_RULES = $(BUILD_TYPES:%=source_%)
       
   133 
       
   134 source_%: build_%/$(SOURCE_DIRNAME)/$(UNPACK_FILE)
       
   135 
       
   136 build_%/$(SOURCE_DIRNAME)/$(UNPACK_FILE):
       
   137 	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:build_%/$(SOURCE_DIRNAME)/$(UNPACK_FILE)=%)" $(SOURCE_TARGETS)
       
   138 
       
   139 .PARALLEL: $(SOURCE_RULES)
       
   140 
       
   141 CONFIGURE_RULES = $(BUILD_TYPES:%=configure_%)
       
   142 
       
   143 configure_%: source_%
       
   144 	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:configure_%=%)" $(CONFIGURE_TARGETS)
       
   145 
       
   146 .PARALLEL: $(CONFIGURE_RULES)
       
   147 
       
   148 BUILD_RULES = $(BUILD_TYPES:%=build_%)
       
   149 
       
   150 build_%: configure_% 
       
   151 	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:build_%=%)" $(BUILD_TARGETS)
       
   152 
       
   153 .PARALLEL: $(BUILD_RULES)
       
   154 
       
   155 INSTALL_RULES = $(BUILD_TYPES:%=install_%)
       
   156 
       
   157 install_%: build_%
       
   158 	$(MAKE) $(MAKEFLAGS) BUILD_TYPE="$(@:install_%=%)" $(INSTALL_TARGETS)
       
   159 
       
   160 .PARALLEL: $(INSTALL_RULES) install_license
       
   161 
       
   162 configure_$(BUILD_TYPE): $(UNPACK_TARGET)
       
   163 build_$(BUILD_TYPE): configure_$(BUILD_TYPE)
       
   164 install_$(BUILD_TYPE): build_$(BUILD_TYPE)