glib/Makefile.am gmodule/Makefile.am gobject/Makefile.am Use srcdir also
[platform/upstream/glib.git] / gthread / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib -I$(top_srcdir)/gthread \
4         -DG_LOG_DOMAIN=\"GThread\" @GTHREAD_COMPILE_IMPL_DEFINES@ \
5         @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED
6
7 EXTRA_DIST =                            \
8                 makefile.mingw.in       \
9                 makefile.msc.in         \
10                 gthread-posix.c         \
11                 gthread-solaris.c       \
12                 gthread-win32.c         \
13                 gthread-none.c          \
14                 gthread.def             \
15                 gthread.rc.in
16
17 BUILT_EXTRA_DIST = \
18                 makefile.mingw          \
19                 makefile.msc            \
20                 gthread.rc
21
22 libglib = $(top_builddir)/glib/libglib-2.0.la
23
24 top_builddir_full=`cd \$(top_builddir); pwd`
25
26 lib_LTLIBRARIES = libgthread-2.0.la
27
28 if MS_LIB_AVAILABLE
29 noinst_DATA = gthread-2.0.lib
30
31 install-ms-lib:
32         $(INSTALL) gthread-2.0.lib $(DESTDIR)$(libdir)
33
34 uninstall-ms-lib:
35         -rm $(DESTDIR)$(libdir)/gthread-2.0.lib
36 else
37 install-ms-lib:
38 uninstall-ms-lib:
39 endif
40
41 if PLATFORM_WIN32
42 no_undefined = -no-undefined
43 endif
44
45 if OS_WIN32
46 export_symbols = -export-symbols $(srcdir)/gthread.def
47
48 install-libtool-import-lib:
49         $(INSTALL) .libs/libgthread-2.0.dll.a $(DESTDIR)$(libdir)
50         $(INSTALL) $(srcdir)/gthread.def $(DESTDIR)$(libdir)/gthread-2.0.def
51
52 uninstall-libtool-import-lib:
53         -rm $(DESTDIR)$(libdir)/libgthread-2.0.dll.a $(DESTDIR)$(libdir)/gthread-2.0.def
54 else
55 install-libtool-import-lib:
56 uninstall-libtool-import-lib:
57 endif
58
59 libgthread_2_0_la_SOURCES = gthread-impl.c
60 libgthread_2_0_la_LDFLAGS = \
61         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
62         -export-dynamic $(no_undefined) $(export_symbols)
63
64 libgthread_2_0_la_LIBADD = $(G_THREAD_WIN32_RESOURCE) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(libglib)
65
66 libgthread_2_0_la_DEPENDENCIES = $(G_THREAD_WIN32_RESOURCE) $(GTHREAD_DEF)
67
68 if OS_WIN32
69 $(G_THREAD_WIN32_RESOURCE): gthread.rc
70         $(top_srcdir)/build/win32/lt-compile-resource gthread.rc $@
71 endif
72
73 gthread-2.0.lib: libgthread-2.0.la gthread.def
74         lib -name:libgthread-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gthread.def -out:$@
75
76 dist-hook: $(BUILT_EXTRA_DIST)
77         files='$(BUILT_EXTRA_DIST)'; \
78         for f in $$files; do \
79           if test -f $$f; then d=.; else d=$(srcdir); fi; \
80           cp $$d/$$f $(distdir) || exit 1; done
81
82 install-data-local: install-ms-lib install-libtool-import-lib
83
84 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
85