gmodule: New variable. (dist-hook): Handle $(BUILT_EXTRA_DIST).
[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)/gmodule \
4         -DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@
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-os2.c   \
14                 gmodule-win32.c \
15                 gmodule-beos.c  \
16                 gmoduleconf.h.win32 \
17                 gmodule.rc.in
18
19 BUILT_EXTRA_DIST = \
20                 makefile.mingw  \
21                 makefile.msc    \
22                 gmodule.rc
23
24 BUILT_SOURCES = gmoduleconf.h
25 gmoduleconf.h:  gmoduleconf.h.in
26
27 glibincludedir=$(includedir)/glib-2.0
28 glibinclude_HEADERS = \
29                 gmodule.h
30
31 libglib = $(top_builddir)/libglib-1.3.la # -lglib
32
33 top_builddir_full=`cd \$(top_builddir); pwd`
34
35 lib_LTLIBRARIES = libgmodule-1.3.la libgplugin_a.la libgplugin_b.la
36
37 libgmodule_1_3_la_SOURCES = gmodule.c
38 libgmodule_1_3_la_LDFLAGS = \
39         @G_MODULE_LDFLAGS@ \
40         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
41         -export-dynamic
42
43 libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ # $(libglib)
44 # we should really depend on $(libglib) for libgmodule.la, but libtool has a
45 # problem with this ;(
46
47 libgplugin_a_la_SOURCES = libgplugin_a.c
48 libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
49 libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
50
51 libgplugin_b_la_SOURCES = libgplugin_b.c
52 libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
53 libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
54
55 noinst_PROGRAMS = testgmodule
56 testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
57 testgmodule_LDADD = libgmodule-1.3.la $(libglib) @G_MODULE_LIBS@
58
59 gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
60         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
61
62 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.mingw.in
63         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
64
65 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.msc.in
66         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
67
68 .PHONY: files release
69
70 files:
71         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
72           echo $$p; \
73         done
74
75 install-libLTLIBRARIES: libgmodule-1.3.la
76         @$(NORMAL_INSTALL)
77         $(mkinstalldirs) $(DESTDIR)$(libdir)
78         @list='libgmodule-1.3.la'; for p in $$list; do \
79          if test -f $$p; then \
80           echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
81           $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
82          else :; fi; \
83         done
84
85 release:
86         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
87
88 dist-hook: $(BUILT_EXTRA_DIST)
89         @files='$(BUILT_EXTRA_DIST)'; \
90         for f in $$files; do \
91           if test -f $$f; then d=.; else d=$(srcdir); fi; \
92           cp $$d/$$f $(distdir) || exit 1; done
93