Tizen 2.1 base
[platform/upstream/gcd.git] / pthread_workqueue-0.8.2 / config.inc
1 program="libpthread_workqueue"
2 version="0.8.2"
3 abi_major="0"
4 abi_minor="0"
5 abi_version="$abi_major.$abi_minor"
6 cflags="-Wall -Wextra -Werror -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_GNU_SOURCE -std=c99 -I./include -I./src"
7 ldflags=""
8 ldadd="-lpthread -lrt"
9 sources='src/api.c src/$(API)/manager.c src/$(API)/thread_info.c src/witem_cache.c src/$(API)/thread_rt.c'
10 libdepends=""
11 deps="src/*.h"
12 mans="pthread_workqueue.3"
13 headers="include/pthread_workqueue.h"
14 extra_dist="LICENSE"
15 subdirs=""
16
17 # Package metadata
18 pkg_summary="pthread_workqueue library"
19 pkg_description="pthread_workqueue library"
20 license="BSD"
21 author="Mark Heily"
22
23 pre_configure_hook() {
24   if [ "$debug" = "yes" ] ; then
25       cflags="$cflags -g3 -O0 -DPTHREAD_WORKQUEUE_DEBUG -rdynamic"
26   else
27       cflags="$cflags -g -O2"
28   fi
29   check_header err.h
30 }
31
32 post_configure_hook() {
33
34     cflags="$cflags"
35     case "$target" in
36     windows)
37         cflags="$cflags -mthreads"
38         ldflags="$ldflags -mthreads"
39         ;;
40     solaris)
41         # TODO: would like to have -fvisibility=hidden but not supported
42         #       by SFWgcc
43         #
44         cflags="$cflags -m64 -fpic"
45         ldflags="$ldflags -m64 -fpic -lumem"
46         ;;
47     *)
48         if [ "`uname -m`" = "x86_64" ] ; then
49             arch_flags="-m64"
50         else
51             arch_flags=""
52         fi
53         cflags="$cflags $arch_flags -fpic -fvisibility=hidden -pthread"
54         ldflags="$ldflags $arch_flags -fpic -pthread"
55         ;;
56     esac
57 }