Use G_BEGIN_DECLS and G_END_DECLS. Define G_MODULE_EXPORT correctly on
[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=\"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
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 if PLATFORM_WIN32
38 no_undefined = -no-undefined
39 endif
40 if OS_WIN32
41 export_symbols = -export-symbols gmodule.def
42 endif
43
44 libgmodule_1_3_la_SOURCES = gmodule.c
45 libgmodule_1_3_la_LDFLAGS = \
46         @G_MODULE_LDFLAGS@ \
47         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
48         -export-dynamic $(no_undefined) $(export_symbols)
49
50 libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
51 # we should really depend on $(libglib) for libgmodule.la, but libtool has a
52 # problem with this ;( Ummm? Does it?
53
54 libgplugin_a_la_SOURCES = libgplugin_a.c
55 libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
56 libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
57
58 libgplugin_b_la_SOURCES = libgplugin_b.c
59 libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
60 libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
61
62 noinst_PROGRAMS = testgmodule
63 testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
64 testgmodule_LDADD = libgmodule-1.3.la $(libglib) @G_MODULE_LIBS@
65
66 gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
67         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
68
69 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.mingw.in
70         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
71
72 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.msc.in
73         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
74
75 .PHONY: files release
76
77 files:
78         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
79           echo $$p; \
80         done
81
82 install-libLTLIBRARIES: libgmodule-1.3.la
83         @$(NORMAL_INSTALL)
84         $(mkinstalldirs) $(DESTDIR)$(libdir)
85         @list='libgmodule-1.3.la'; for p in $$list; do \
86          if test -f $$p; then \
87           echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
88           $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
89          else :; fi; \
90         done
91
92 release:
93         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
94
95 dist-hook: $(BUILT_EXTRA_DIST)
96         @files='$(BUILT_EXTRA_DIST)'; \
97         for f in $$files; do \
98           if test -f $$f; then d=.; else d=$(srcdir); fi; \
99           cp $$d/$$f $(distdir) || exit 1; done
100