Dear Friend :

I think that cmake is better than auto make or other tool , I know what I did is simple but I love to share it here , how to build using cmake .

In src directory do the following :-

1- create file CMakeLists.txt
    add this content  :-
    project (yaml_libary)
cmake_minimum_required (VERSION 2.6)
set(Yaml_VERSION_MAJOR 0)
set(Yaml_VERSION_MINOR 1)
set(Yaml_VERSION_PATCH 3)
set(Yaml_VERSION_STRING "0.1.3")
configure_file (
  "yaml_config.h.in"
  "../yaml_config.h"
  )
include_directories (../include)
add_library(yaml SHARED yaml_private.h api.c reader.c scanner.c parser.c loader.c writer.c emitter.c dumper.c)

2- create file yaml_config.h.in
    add this content  :-
#define YAML_VERSION_MAJOR     @Yaml_VERSION_MAJOR@
#define YAML_VERSION_MINOR     @Yaml_VERSION_MINOR@
#define YAML_VERSION_PATCH     @Yaml_VERSION_PATCH@
#define YAML_VERSION_STRING     "@Yaml_VERSION_STRING@"

3- patch yaml_private.h with
10a11,13
> /*include config file*/
> #include "yaml_config.h"
>

4-create build directory .

5- cd build
   cmake ../
   make

6- this will create      libyaml.so and we are done


Web developer 
Ali

email:ali_mousa_zy@yahoo.com 

work-email:a.mousa@itsre.com