2010년 8월 23일 월요일

Compilation of FreeType Library for My STM32F10x Embedded System under Windows system

1. download freetype library

2. extract to $(freetype_dir)

3. create a new file named "config.mk" containing the below under $(freetype_dir)

#
# FreeType 2 configuration rules
#


# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.


include $(TOP_DIR)/builds/gcc-cross/gcc-cross-def.mk
include $(TOP_DIR)/builds/compiler/gcc-cross.mk
include $(TOP_DIR)/builds/link_std.mk


# EOF

4. create new directory named "gcc-cross" under $(freetyep_dir)/buils

5. create new file named "gcc-cross-def.mk" containing the below under /builds/gcc-cross/

#
# FreeType 2 configuration rules
#


# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.


DELETE := rm -f
CAT := cat
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/gcc-cross
PLATFORM := gcc-cross


# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)


# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := lib$(PROJECT)


# Path inclusion flag. Some compilers use a different flag than `-I' to
# specify an additional include path. Examples are `/i=' or `-J'.
#
I := -I


# C flag used to define a macro before the compilation of a given source
# object. Usually it is `-D' like in `-DDEBUG'.
#
D := -D


# The link flag used to specify a given library file on link. Note that
# this is only used to compile the demo programs, not the library itself.
#
L := -l


# Target flag.
#
T := -o$(space)


# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -c -O2 -mthumb -mthumb-interwork -mcpu=cortex-m3 -D__thumb__

# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS :=


# EOF

6. create new file named "gcc-cross.mk" containing the below under $(freetype_dir)/builds/compiler

#
# FreeType 2 gcc-specific definitions
#


# Copyright 1996-2000, 2003, 2005, 2006, 2009 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.


# Compiler command line name
#
CROSS := "C:/Program Files/CodeSourcery/Sourcery G++ Lite/bin/arm-none-eabi-"
CC := $(CROSS)gcc
COMPILER_SEP := /


# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o

# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a


# Path inclusion flag. Some compilers use a different flag than `-I' to
# specify an additional include path. Examples are `/i=' or `-J'.
#
I := -I


# C flag used to define a macro before the compilation of a given source
# object. Usually it is `-D' like in `-DDEBUG'.
#
D := -D


# The link flag used to specify a given library file on link. Note that
# this is only used to compile the demo programs, not the library itself.
#
L := -l


# Target flag.
#
T := -o$(space)

# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#

CFLAGS ?= -c -O2 -Wall -mthumb -mthumb-interwork -mcpu=cortex-m3 -D__thumb__

# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic


# Library linking
#
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
AR := $(CROSS)ar
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)


# EOF

7. finally, compile it to hit "make" and see $(freetype_dir)/docs/CUSTOMIZE to remove unuseable modules and modify $(freetype_dir)/modules.cfg.

댓글 없음:

댓글 쓰기