require automake 1.7. Add calls to libtoolize and gtkdocize. Clean up some
[platform/upstream/glib.git] / gmodule / 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)/gmodule \
4         -DG_LOG_DOMAIN=\"GModule\" @GLIB_DEBUG_FLAGS@ -DG_DISABLE_DEPRECATED
5
6 EXTRA_DIST =    \
7                 makefile.mingw.in \
8                 makefile.msc.in \
9                 gmoduleconf.h.in \
10                 gmodule.def     \
11                 gmodule-dl.c    \
12                 gmodule-dld.c   \
13                 gmodule-dyld.c  \
14                 gmodule-os2.c   \
15                 gmodule-win32.c \
16                 gmodule-beos.c  \
17                 gmoduleconf.h.win32 \
18                 gmodule.rc.in
19
20 BUILT_EXTRA_DIST = \
21                 makefile.mingw  \
22                 makefile.msc    \
23                 gmodule.rc
24
25 BUILT_SOURCES = gmoduleconf.h
26 gmoduleconf.h:  gmoduleconf.h.in
27
28 glibincludedir=$(includedir)/glib-2.0
29 glibinclude_HEADERS = \
30                 gmodule.h
31
32 libglib = $(top_builddir)/glib/libglib-2.0.la
33
34 top_builddir_full=`cd \$(top_builddir); pwd`
35
36 lib_LTLIBRARIES = libgmodule-2.0.la
37
38 if MS_LIB_AVAILABLE
39 noinst_DATA = gmodule-2.0.lib
40
41 install-ms-lib:
42         $(INSTALL) gmodule-2.0.lib $(DESTDIR)$(libdir)
43
44 uninstall-ms-lib:
45         -rm $(DESTDIR)$(libdir)/gmodule-2.0.lib
46 else
47 install-ms-lib:
48 uninstall-ms-lib:
49 endif
50
51 if PLATFORM_WIN32
52 no_undefined = -no-undefined
53 endif
54
55 if OS_WIN32
56 export_symbols = -export-symbols gmodule.def
57
58 install-libtool-import-lib:
59         $(INSTALL) .libs/libgmodule-2.0.dll.a $(DESTDIR)$(libdir)
60         $(INSTALL) gmodule.def $(DESTDIR)$(libdir)/gmodule-2.0.def
61
62 uninstall-libtool-import-lib:
63         -rm $(DESTDIR)$(libdir)/libgmodule-2.0.dll.a $(DESTDIR)$(libdir)/gmodule-2.0.def
64 else
65 install-libtool-import-lib:
66 uninstall-libtool-import-lib:
67 endif
68
69 libgmodule_2_0_la_SOURCES = gmodule.c
70 libgmodule_2_0_la_LDFLAGS = \
71         $(G_MODULE_LDFLAGS) \
72         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
73         -export-dynamic $(no_undefined) $(export_symbols)
74
75 libgmodule_2_0_la_LIBADD = $(G_MODULE_WIN32_RESOURCE) $(G_MODULE_LIBS_EXTRA) $(G_MODULE_LIBS) $(libglib)
76
77 libgmodule_2_0_la_DEPENDENCIES = $(G_MODULE_WIN32_RESOURCE) $(GMODULE_DEF)
78
79 if OS_WIN32
80 $(G_MODULE_WIN32_RESOURCE): gmodule.rc
81         $(top_srcdir)/build/win32/lt-compile-resource gmodule.rc $@
82 endif
83
84 gmodule-2.0.lib: libgmodule-2.0.la gmodule.def
85         lib -name:libgmodule-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gmodule.def -out:$@
86
87 .PHONY: files release
88
89 files:
90         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
91           echo $$p; \
92         done
93
94 release:
95         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
96
97 dist-hook: $(BUILT_EXTRA_DIST)
98         @files='$(BUILT_EXTRA_DIST)'; \
99         for f in $$files; do \
100           if test -f $$f; then d=.; else d=$(srcdir); fi; \
101           cp $$d/$$f $(distdir) || exit 1; done
102
103
104 install-data-local: install-ms-lib install-libtool-import-lib
105
106 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib