Don't use autoconf variables for the resource object files on Win32 any
[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.msc.in         \
9                 gthread-posix.c         \
10                 gthread-solaris.c       \
11                 gthread-win32.c         \
12                 gthread-none.c          \
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 MS_LIB_AVAILABLE
27 noinst_DATA = gthread-2.0.lib
28
29 install-ms-lib:
30         $(INSTALL) gthread-2.0.lib $(DESTDIR)$(libdir)
31
32 uninstall-ms-lib:
33         -rm $(DESTDIR)$(libdir)/gthread-2.0.lib
34 else
35 install-ms-lib:
36 uninstall-ms-lib:
37 endif
38
39 if PLATFORM_WIN32
40 no_undefined = -no-undefined
41 endif
42
43 if OS_WIN32
44 export_symbols = -export-symbols $(srcdir)/gthread.def
45
46 install-def-file:
47         $(INSTALL) $(srcdir)/gthread.def $(DESTDIR)$(libdir)/gthread-2.0.def
48
49 uninstall-def-file:
50         -rm $(DESTDIR)$(libdir)/gthread-2.0.def
51 else
52 install-def-file:
53 uninstall-def-file:
54 endif
55
56 if OS_WIN32
57 gthread_win32_res = gthread-win32-res.o
58 gthread_win32_res_ldflag = -Wl,$(gthread_win32_res)
59 endif
60
61 libgthread_2_0_la_SOURCES = gthread-impl.c
62 libgthread_2_0_la_LDFLAGS = \
63         $(gthread_win32_res_ldflag) \
64         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
65         -export-dynamic $(no_undefined) $(export_symbols)
66
67 libgthread_2_0_la_LIBADD = $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(libglib)
68
69 libgthread_2_0_la_DEPENDENCIES = $(gthread_win32_res) $(GTHREAD_DEF)
70
71 if OS_WIN32
72 gthread-win32-res.o: gthread.rc
73         $(WINDRES) gthread.rc $@
74 endif
75
76 gthread-2.0.lib: libgthread-2.0.la gthread.def
77         lib -name:libgthread-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gthread.def -out:$@
78
79 dist-hook: $(BUILT_EXTRA_DIST)
80         files='$(BUILT_EXTRA_DIST)'; \
81         for f in $$files; do \
82           if test -f $$f; then d=.; else d=$(srcdir); fi; \
83           cp $$d/$$f $(distdir) || exit 1; done
84
85 install-data-local: install-ms-lib install-def-file
86
87 uninstall-local: uninstall-ms-lib uninstall-def-file
88