2f977287a99dce2fab2c0c6157a6ded6a0d89ee4
[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@
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)/glib/libglib-1.3.la
32
33 top_builddir_full=`cd \$(top_builddir); pwd`
34
35 lib_LTLIBRARIES = libgmodule-1.3.la
36 noinst_LTLIBRARIES = libgplugin_a.la libgplugin_b.la
37
38 if MS_LIB_AVAILABLE
39 noinst_DATA = gmodule-1.3.lib
40
41 install-ms-lib:
42         $(INSTALL) gmodule-1.3.lib $(DESTDIR)$(libdir)
43
44 uninstall-ms-lib:
45         -rm $(DESTDIR)$(libdir)/gmodule-1.3.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 plugin_rpath = -rpath `pwd`
58
59 install-libtool-import-lib:
60         $(INSTALL) .libs/libgmodule-1.3.dll.a $(DESTDIR)$(libdir)
61 uninstall-libtool-import-lib:
62         -rm $(DESTDIR)$(libdir)/libgmodule-1.3.dll.a
63 else
64 install-libtool-import-lib:
65 uninstall-libtool-import-lib:
66 endif
67
68 libgmodule_1_3_la_SOURCES = gmodule.c
69 libgmodule_1_3_la_LDFLAGS = \
70         @G_MODULE_LDFLAGS@ \
71         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
72         -export-dynamic $(no_undefined) $(export_symbols)
73
74 libgmodule_1_3_la_LIBADD = @G_MODULE_WIN32_RESOURCE@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
75
76 libgmodule_1_3_la_DEPENDENCIES = @G_MODULE_WIN32_RESOURCE@ @GMODULE_DEF@
77
78 libgplugin_a_la_SOURCES = libgplugin_a.c
79 libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined) $(plugin_rpath)
80 libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
81
82 libgplugin_b_la_SOURCES = libgplugin_b.c
83 libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined) $(plugin_rpath)
84 libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
85
86 noinst_PROGRAMS = testgmodule
87 testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
88 testgmodule_LDADD = @TESTGMODULE_EXP@ libgmodule-1.3.la $(libglib) @G_MODULE_LIBS@
89 testgmodule_DEPENDENCIES = @TESTGMODULE_EXP@
90
91 if OS_WIN32
92 @G_MODULE_WIN32_RESOURCE@ : gmodule.rc
93         $(top_srcdir)/build/win32/lt-compile-resource gmodule.rc @G_MODULE_WIN32_RESOURCE@
94 endif
95
96 gmodule-1.3.lib: libgmodule-1.3.la gmodule.def
97         lib -name:libgmodule-1.3-@LT_CURRENT_MINUS_AGE@.dll -def:gmodule.def -out:$@
98
99 testgmodule.exp: testgmodule.o
100         dlltool --output-exp testgmodule.exp testgmodule.o
101
102 gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
103         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
104
105 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.mingw.in
106         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
107
108 makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.msc.in
109         cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
110
111 .PHONY: files release
112
113 files:
114         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
115           echo $$p; \
116         done
117
118 release:
119         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
120
121 dist-hook: $(BUILT_EXTRA_DIST)
122         @files='$(BUILT_EXTRA_DIST)'; \
123         for f in $$files; do \
124           if test -f $$f; then d=.; else d=$(srcdir); fi; \
125           cp $$d/$$f $(distdir) || exit 1; done
126
127
128 install-data-local: install-ms-lib install-libtool-import-lib
129
130 uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib