gthread/: fix up declarations
[platform/upstream/glib.git] / gthread / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
3
4 AM_CPPFLAGS =                           \
5         $(glib_INCLUDES)                \
6         -DG_LOG_DOMAIN=\"GThread\"      \
7         -DGLIB_COMPILATION              \
8         @GTHREAD_COMPILE_IMPL_DEFINES@  \
9         @GLIB_DEBUG_FLAGS@
10
11 EXTRA_DIST +=                           \
12                 makefile.msc.in         \
13                 gthread.def             \
14                 gthread.rc.in
15
16 BUILT_EXTRA_DIST =                      \
17                 makefile.msc            \
18                 gthread.rc
19
20 libglib = $(top_builddir)/glib/libglib-2.0.la
21
22 top_builddir_full=`cd \$(top_builddir); pwd`
23
24 lib_LTLIBRARIES = libgthread-2.0.la
25
26 if OS_WIN32_AND_DLL_COMPILATION
27 if MS_LIB_AVAILABLE
28 noinst_DATA = gthread-2.0.lib
29
30 install_ms_lib_cmd = $(INSTALL) gthread-2.0.lib $(DESTDIR)$(libdir)
31 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gthread-2.0.lib
32 endif
33 endif
34
35 install-ms-lib:
36         $(install_ms_lib_cmd)
37
38 uninstall-ms-lib:
39         $(uninstall_ms_lib_cmd)
40
41 if PLATFORM_WIN32
42 no_undefined = -no-undefined
43 endif
44
45 if OS_WIN32_AND_DLL_COMPILATION
46 export_symbols = -export-symbols $(srcdir)/gthread.def
47 gthread_def = gthread.def
48
49 install-def-file:
50         $(INSTALL) $(srcdir)/gthread.def $(DESTDIR)$(libdir)/gthread-2.0.def
51
52 uninstall-def-file:
53         -rm $(DESTDIR)$(libdir)/gthread-2.0.def
54 else
55 install-def-file:
56 uninstall-def-file:
57 endif
58
59 if OS_WIN32_AND_DLL_COMPILATION
60 gthread_win32_res = gthread-win32-res.o
61 gthread_win32_res_ldflag = -Wl,$(gthread_win32_res)
62 endif
63
64 libgthread_2_0_la_SOURCES = gthread-impl.c
65 libgthread_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
66         $(gthread_win32_res_ldflag) \
67         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
68         -export-dynamic $(no_undefined) $(export_symbols)
69
70 libgthread_2_0_la_LIBADD = $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(libglib)
71
72 libgthread_2_0_la_DEPENDENCIES = $(gthread_win32_res) $(gthread_def)
73
74 gthread-win32-res.o: gthread.rc
75         $(AM_V_GEN) $(WINDRES) gthread.rc $@
76
77 gthread-2.0.lib: libgthread-2.0.la gthread.def
78         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgthread-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(srcdir)/gthread.def -out:$@
79
80 dist-hook: $(BUILT_EXTRA_DIST)
81         files='$(BUILT_EXTRA_DIST)'; \
82         for f in $$files; do \
83           if test -f $$f; then d=.; else d=$(srcdir); fi; \
84           cp $$d/$$f $(distdir) || exit 1; done
85
86 install-data-local: install-ms-lib install-def-file
87
88 uninstall-local: uninstall-ms-lib uninstall-def-file
89
90 if HAVE_GLIB_RUNTIME_LIBDIR
91 install-data-hook:
92         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
93         mv $(DESTDIR)$(libdir)/libgthread-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
94         mv $(DESTDIR)$(libdir)/libgthread-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
95         rm -f $(DESTDIR)$(libdir)/libgthread-2.0.so
96         ln -s $(GLIB_RUNTIME_LIBDIR)/libgthread-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgthread-2.0.so
97 endif