open-src/lib/freetype/Makefile
changeset 591 a2c6b61a92aa
parent 561 3c2df35483af
child 780 2ea47e897e86
equal deleted inserted replaced
590:923763de5bba 591:a2c6b61a92aa
    28 # Except as contained in this notice, the name of a copyright holder
    28 # Except as contained in this notice, the name of a copyright holder
    29 # shall not be used in advertising or otherwise to promote the sale, use
    29 # shall not be used in advertising or otherwise to promote the sale, use
    30 # or other dealings in this Software without prior written authorization
    30 # or other dealings in this Software without prior written authorization
    31 # of the copyright holder.
    31 # of the copyright holder.
    32 #
    32 #
    33 # @(#)Makefile	1.77	08/10/06
    33 # @(#)Makefile	1.78	08/11/26
    34 #
    34 #
    35 
    35 
    36 PWD:sh=pwd
    36 PWD:sh=pwd
    37 TOP=$(PWD)/../..
    37 TOP=$(PWD)/../..
    38 
    38 
    73 # Additional command line options to GNU autoconf configure script
    73 # Additional command line options to GNU autoconf configure script
    74 MODULE_CONFIG_OPTS= \
    74 MODULE_CONFIG_OPTS= \
    75 	--with-zlib \
    75 	--with-zlib \
    76 	--with-pic
    76 	--with-pic
    77 
    77 
    78 
       
    79 FT_LIB=$(FT_DIR)/objs/.libs/libfreetype.so.6.3.17
       
    80 
       
    81 # What to build
       
    82 BUILD_TARGETS=$(GNUMAKE) $(FT_LIB)
       
    83 
       
    84 # pkg-config files that need to have -R added
    78 # pkg-config files that need to have -R added
    85 FIX_PC_FILES=builds/unix/freetype2.in
    79 FIX_PC_FILES=builds/unix/freetype2.in
    86 
    80 
    87 # License file
    81 # License file
    88 LICENSE_FILE=docs/FTL.TXT
    82 LICENSE_FILE=docs/FTL.TXT
    90 
    84 
    91 # Need to use GNU Make to build
    85 # Need to use GNU Make to build
    92 MODULE_MAKE=$(GNUMAKE)
    86 MODULE_MAKE=$(GNUMAKE)
    93 MODULE_MAKE_SET=yes
    87 MODULE_MAKE_SET=yes
    94 
    88 
    95 # Don't run normal configure/build/install rules - freetype is different
    89 # Don't run normal configure/install rules - freetype is different
    96 CONFIGURE_TARGETS=$(SOURCE_DIR)/config.mk
    90 CONFIGURE_TARGETS=$(SOURCE_DIR)/config.mk
    97 CONFIGURE_TARGETS_SET=yes
    91 CONFIGURE_TARGETS_SET=yes
    98 BUILD_TARGETS=$(FT_LIB)
    92 INSTALL_TARGETS=install_freetype
    99 BUILD_TARGETS_SET=yes
       
   100 INSTALL_TARGETS=
       
   101 INSTALL_TARGETS_SET=yes
    93 INSTALL_TARGETS_SET=yes
       
    94 
       
    95 # Environment variables to pass to configure & build steps
       
    96 MODULE_ENV = \
       
    97     SHELL="/bin/bash" \
       
    98     MAKESHELL="/bin/bash" \
       
    99     CONFIG_SHELL="/bin/bash" \
       
   100     CPP="$(CC) -E $(LIB_CFLAGS)" \
       
   101     CXXCPP="$(CXX) -E $(CXXFLAGS)" \
       
   102     MAKE=$(GNUMAKE) GNUMAKE=$(GNUMAKE) CFG="$(CONFIG_OPTS)"
       
   103 
       
   104 MODULE_CONFIG_ENV = $(MODULE_ENV)
       
   105 MODULE_BUILD_ENV = $(CONFIG_ENV)
       
   106 
       
   107 MODULE_INSTALL_MAKEFLAGS=bindir=$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)
   102 
   108 
   103 ### Include common rulesets
   109 ### Include common rulesets
   104 include ../Makefile.inc
   110 include ../Makefile.inc
   105 
   111 
   106 ### Rules specific to this directory:
   112 ### Rules specific to this directory:
   108 # Run configure script (Freetype helpfully does this the first time you call
   114 # Run configure script (Freetype helpfully does this the first time you call
   109 # gmake - this isn't normal for autoconf programs)
   115 # gmake - this isn't normal for autoconf programs)
   110 $(SOURCE_DIR)/config.mk: $(UNPACK_TARGET)
   116 $(SOURCE_DIR)/config.mk: $(UNPACK_TARGET)
   111 	(cd $(SOURCE_DIR) ; \
   117 	(cd $(SOURCE_DIR) ; \
   112 	chmod a+x builds/unix/configure builds/unix/mkinstalldirs builds/unix/install-sh ; \
   118 	chmod a+x builds/unix/configure builds/unix/mkinstalldirs builds/unix/install-sh ; \
   113 	    SHELL="/bin/bash" \
   119 	$(CONFIG_ENV) $(GNUMAKE) )
   114 	    MAKESHELL="/bin/bash" \
       
   115 	    CONFIG_SHELL="/bin/bash" \
       
   116 	    CC="$(CC)" \
       
   117 	    CXX="$(CXX)" \
       
   118 	    CPP="$(CC) -E $(LIB_CFLAGS)" \
       
   119 	    CXXCPP="$(CXX) -E $(CXXFLAGS)" \
       
   120 	    CFLAGS="$(LIB_CFLAGS)" \
       
   121 	    CXXFLAGS="$(LIB_CXXFLAGS)" \
       
   122 	    LDFLAGS="$(LIB_LDFLAGS)" \
       
   123 	    CFG="$(FT_CFG)" \
       
   124 	    LD="$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS)" \
       
   125 	    MAKE=$(GNUMAKE) GNUMAKE=$(GNUMAKE) CFG="$(CONFIG_OPTS)" \
       
   126 	    INSTALL="$(TOP)/common/install-sh -c" CPPROG="cp -p" \
       
   127 	    $(GNUMAKE) )
       
   128 
       
   129 # Build Freetype
       
   130 $(FT_LIB): $(CONFIGURE_TARGETS)
       
   131 	(cd $(SOURCE_DIR) ; \
       
   132 	    SHELL="/bin/bash" \
       
   133 	    MAKESHELL="/bin/bash" \
       
   134 	    CONFIG_SHELL="/bin/bash" \
       
   135 	    CC="$(CC)" \
       
   136 	    CXX="$(CXX)" \
       
   137 	    CPP="$(CC) -E $(LIB_CFLAGS)" \
       
   138 	    CXXCPP="$(CXX) -E $(CXXFLAGS)" \
       
   139 	    CFLAGS="$(LIB_CFLAGS)" \
       
   140 	    CXXFLAGS="$(LIB_CXXFLAGS)" \
       
   141 	    LDFLAGS="$(LIB_LDFLAGS)" \
       
   142 	    MAKE=$(GNUMAKE) GNUMAKE=$(GNUMAKE) \
       
   143 	    LDFLAGS="$(LIB_LDFLAGS)" \
       
   144 	    CFG="$(FT_CFG)" \
       
   145 	    LD="$(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS)" \
       
   146 	    INSTALL="$(TOP)/common/install-sh -c" \
       
   147 	    $(GNUMAKE) )
       
   148 
   120 
   149 FT_bindir=$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)
   121 FT_bindir=$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)
   150 FT_libdir=$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)
   122 FT_libdir=$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)
   151 
   123 
   152 install_gen:: $(FT_LIB)
   124 # Have to override default_install since the -e causes our BUILD_DIR to
       
   125 # clash with the one in freetype's Makefiles
       
   126 install_freetype:: $(BUILD_TARGETS)
   153 	mkdir -p $(PROTODIR)/usr/bin$(ARCHLIBSUBDIR)
   127 	mkdir -p $(PROTODIR)/usr/bin$(ARCHLIBSUBDIR)
   154 	( cd $(SOURCE_DIR)/builds/unix ; \
   128 	( cd $(SOURCE_DIR)/builds/unix ; \
   155 	    ./config.status --file ftconfig ; \
   129 	    ./config.status --file ftconfig ; \
   156 	    rm -f ftconfig.h ; \
   130 	    rm -f ftconfig.h ; \
   157 	    mv ftconfig ftconfig.h ; \
   131 	    mv ftconfig ftconfig.h ; \