freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnu Make Specifics


From: David Turner
Subject: Re: Gnu Make Specifics
Date: Fri, 25 Feb 2000 13:13:53 +0100

Hi,

> 
> Hi,
>    The thing is that we want to freetype in our own application.
> Which is on 2 platforms WinNT and SGI Irix.

> Therefore what are the file required. I would presume
> all the source stuff and the stuff in config/unix and config/win32.
> Is this correct ??

When you have GNU Make installed, building FreeType 2 looks like:

  - going to the FreeType 2 top directory

  - invoking GNU make for the first time. This will run a series
    of auto-detecting sub-makefiles. Then, a dump of what was found
    is displayed, and a file named "config.mk" is created in the
    current directory. Here is an example of what is displayed
    on my NT system:

------------------------------------------------------------------------------
FreeType build system - automatic system detection

The following settings were detected :

  platform                 :  win32
  compiler                 :  gcc
  configuration directory  :  ./config/win32
  configuration rules      :  .\config\win32\Makefile.gcc  

If this does not correspond to your system or settings please remove the file
'config.mk' from this directory then read the INSTALL file for help.

Otherwise, simple type 'make' again to build the library
----------------------------------------------------------------------------------
 

  - if you're satisfied by what the auto-detection found (read the dump),
    simply invoke GNU make a second time, it will build the library. All
    files go into "freetype2/obj"

  - if you're platform is correctly detected, but if you want to use a different
    compiler than gcc (or "cc" on Unix), use the following on Win32  (95 & NT)

       "make setup visualc"  to use Visual C++ as the compiler
       "make setup lcc"      to use LCC-Win32 as the compiler

    These will create a different version of "config.mk" in the current
    directory. This file contains information relevant to the way the compiler
    is invoked, which compilation flags to use and what object/library file
    extensions are used..

    Then, re-run make..

  - if your platform is not correctly detected, then you will either have to:

    * provide a new sub-directory of "freetype2/config", containing at least the
      following files:

            - "detect.mk"  used to detect your system, set a few make variables
                           and copy one Makefile to "freetype2/config.mk"

            - "ftsystem.c" an implementation of the system component (you can
                           use the one in "config/ansi/ftsystem.c" by default
                           for a start)

            - "ftconfig.h" system-specific macro definitions

            - "ftoption.h" user-toggable configuration macros
                           (used to enable/disable specific features)

            - "ftmodule.h" the modules list, which can be regenerated 
automatically
                           through "make modules" in the top directory.
 
            - a least one sub-Makefile that will be copied to 
"freetype2/config.mk"
              for your platform's compiler(s)

    * if your platform is Unix, you can check the file "config/unix/detect.mk" 
and
      add a few rules to the detection routines found there to add your platform
      to the list.

  In all cases, I recommend reading the files in the "config/<system>" 
directories.
  They'll give you a good idea of what is happenning there.. They are heavily
  commented, and not too hard to understand (even if GNU Make's horrible syntax
  makes things often look worse than they are :-)


> I am hoping to use freetype2. when will the full release be released.
> 
I can't tell for various reason, but expect a final relase of 2.0 in about 3
months. There may be more or less important changes to the API though before
this.. A "real beta" will probably be available in two months (feature & API
freeze) for testing purposes, of course..

- David



> Cheers
> Satpal
> 
> > -----Original Message-----
> > From: David Turner [mailto:address@hidden
> > Sent: Friday, February 25, 2000 11:37 AM
> > To: Satpal Chander
> > Cc: address@hidden
> > Subject: Re: Gnu Make Specifics
> >
> >
> > Hi Saptal,
> >
> > Satpal Chander a écrit :
> > >
> > > Hi,
> > >    could anyone tell me what the the makefile in freetype2 relies on
> > > within gnu make to make it function.
> > >
> > Actually, it relies on lots of things that are easier completely
> > unavailable with other Make tools, or use a very different syntax.
> > Briefly, the list goes as:
> >
> >   - sub-Makefile inclusion (widely available)
> >
> >   - direct evaluation through ":=" instead of "=". This
> >     is extremely important. (a bit less widely available)
> >
> >   - pattern matching is also heavily used in many rules,
> >     e.g.  $(VAR:$(SRC_DIR)%.c=$(OBJ_DIR)%.$O)
> >
> >   - wildcarding : $(wildcard src/*/rules.mk) lists all files named
> >     "rules.mk" in subdirectories of "src"
> >
> >   - shell execution : $(shell ver) returns a string containing what
> >     the "ver" command outputs. $(shell uname) on unix systems..
> >
> >   - accessing the make command line targets through $(MAKECMDGOALS)
> >
> >
> > Most, if not all, of these "advanced" features are required to implement
> > the current features of the build system. Namely :
> >
> >   - automatic host-detection including Unix, Dos, Windows and
> > OS/2 for now.
> >     (and a Automake/Autoconf can be inserted later for Unix, for
> > those who care).
> >
> >   - platform-specific configuration selection, as in "make setup visualc"
> >     which selects a "config.mk" for Visual C++ on Win32 machines.
> >
> >   - rebuilding the list of statically linked modules through
> > "make modules"
> >     (regenerates the file "config/<system>/ftmodule.h" included by
> >     "src/base/ftinit.c"
> >
> >   - automatically compiling all the modules located in the "src" directory
> >     by finding a "rules.mk" find in each sub-directory which contains the
> >     rules specific to that module. This allows adding or removing a module
> >     as easily as moving a directory.
> >
> > A lot of these things have been chosen to allow for a very
> > dynamic build system.
> > For example, to add a new supported platform, all you need to provide is a
> > "config/<system>" directory with relevant files (no need to tweak other
> > Makefiles).
> >
> > Another example : to add a new fot driver, simply add a new directory to
> > "freetype2/src/" containing a "rules.mk" and a "module.mk" (plus all
> > source files), then run "make modules" to rebuild the list of modules
> > automatically.
> >
> > > If I use anything else I get
> > > a missing seperator error on line 34 of the makefile(both
> > Unix(Irix)& WinNt)
> > > I can get around make file but don;t know the in's and out's of them.
> > >
> > I really advise you to install gnu make on your system. It's the only
> > recommended way to compile FreeType 2 on the command line for now.
> >
> > The final release of FreeType 2 will most probably include a
> > Makefile target
> > to be used to copy all required source files to a single
> > directory, which will
> > allow direct compilation. (like invoking "gnu-make flat-compile"
> > to copy all
> > relevant source files to a single direcroy and create one big standard
> > Makefile for them). For now, I'll stick to the current way of doing things
> > because it is much more dynamic and eases many things during development.
> >
> > Cheers,
> >
> > - David
> >
> >
> > > Cheers
> > > Satpal
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]