Replace INCLUDES by AM_CPPFLAGS, other cleanups.
[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         -I$(top_srcdir)                 \
6         -I$(top_srcdir)/glib            \
7         -I$(top_srcdir)/gthread         \
8         -DG_LOG_DOMAIN=\"GThread\"      \
9         @GTHREAD_COMPILE_IMPL_DEFINES@  \
10         @GLIB_DEBUG_FLAGS@              \
11         -DG_DISABLE_DEPRECATED
12
13 EXTRA_DIST +=                           \
14                 makefile.msc.in         \
15                 gthread-posix.c         \
16                 gthread-win32.c         \
17                 gthread-none.c          \
18                 gthread.def             \
19                 gthread.rc.in
20
21 BUILT_EXTRA_DIST =                      \
22                 makefile.msc            \
23                 gthread.rc
24
25 libglib = $(top_builddir)/glib/libglib-2.0.la
26
27 top_builddir_full=`cd \$(top_builddir); pwd`
28
29 lib_LTLIBRARIES = libgthread-2.0.la
30
31 if MS_LIB_AVAILABLE
32 noinst_DATA = gthread-2.0.lib
33
34 install-ms-lib:
35         $(INSTALL) gthread-2.0.lib $(DESTDIR)$(libdir)
36
37 uninstall-ms-lib:
38         -rm $(DESTDIR)$(libdir)/gthread-2.0.lib
39 else
40 install-ms-lib:
41 uninstall-ms-lib:
42 endif
43
44 if PLATFORM_WIN32
45 no_undefined = -no-undefined
46 endif
47
48 if OS_WIN32
49 export_symbols = -export-symbols $(srcdir)/gthread.def
50
51 install-def-file:
52         $(INSTALL) $(srcdir)/gthread.def $(DESTDIR)$(libdir)/gthread-2.0.def
53
54 uninstall-def-file:
55         -rm $(DESTDIR)$(libdir)/gthread-2.0.def
56 else
57 install-def-file:
58 uninstall-def-file:
59 endif
60
61 if OS_WIN32
62 gthread_win32_res = gthread-win32-res.o
63 gthread_win32_res_ldflag = -Wl,$(gthread_win32_res)
64 endif
65
66 libgthread_2_0_la_SOURCES = gthread-impl.c
67 libgthread_2_0_la_LDFLAGS = \
68         $(gthread_win32_res_ldflag) \
69         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
70         -export-dynamic $(no_undefined) $(export_symbols)
71
72 libgthread_2_0_la_LIBADD = $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(libglib)
73
74 libgthread_2_0_la_DEPENDENCIES = $(gthread_win32_res) $(GTHREAD_DEF)
75
76 if OS_WIN32
77 gthread-win32-res.o: gthread.rc
78         $(WINDRES) gthread.rc $@
79 endif
80
81 gthread-2.0.lib: libgthread-2.0.la gthread.def
82         lib -name:libgthread-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(srcdir)/gthread.def -out:$@
83
84 dist-hook: $(BUILT_EXTRA_DIST)
85         files='$(BUILT_EXTRA_DIST)'; \
86         for f in $$files; do \
87           if test -f $$f; then d=.; else d=$(srcdir); fi; \
88           cp $$d/$$f $(distdir) || exit 1; done
89
90 install-data-local: install-ms-lib install-def-file
91
92 uninstall-local: uninstall-ms-lib uninstall-def-file
93