build: Add --disable-compile-warnings
[platform/upstream/glib.git] / gmodule / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/Makefile.decl
3
4 AM_CPPFLAGS =                           \
5         $(glib_INCLUDES)                \
6         -DG_LOG_DOMAIN=\"GModule\"      \
7         @GLIB_DEBUG_FLAGS@              \
8         -DG_DISABLE_DEPRECATED
9
10 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
11
12 EXTRA_DIST +=                           \
13                 makefile.msc.in         \
14                 gmoduleconf.h.in        \
15                 gmodule-dl.c            \
16                 gmodule-dld.c           \
17                 gmodule-dyld.c          \
18                 gmodule-os2.c           \
19                 gmodule-win32.c         \
20                 gmodule-beos.c          \
21                 gmodule-ar.c            \
22                 gmoduleconf.h.win32     \
23                 gmodule.rc.in
24
25 BUILT_EXTRA_DIST = \
26                 makefile.msc    \
27                 gmodule.rc
28
29 BUILT_SOURCES = gmoduleconf.h
30 gmoduleconf.h:  gmoduleconf.h.in
31
32 glibincludedir=$(includedir)/glib-2.0
33 glibinclude_HEADERS = \
34                 gmodule.h
35
36 libglib = $(top_builddir)/glib/libglib-2.0.la
37
38 top_builddir_full=`cd \$(top_builddir); pwd`
39
40 lib_LTLIBRARIES = libgmodule-2.0.la
41
42 if OS_WIN32_AND_DLL_COMPILATION
43 if MS_LIB_AVAILABLE
44 noinst_DATA = gmodule-2.0.lib
45
46 install_ms_lib_cmd = $(INSTALL) gmodule-2.0.lib $(DESTDIR)$(libdir)
47 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gmodule-2.0.lib
48 endif
49 endif
50
51 install-ms-lib:
52         $(install_ms_lib_cmd)
53
54 uninstall-ms-lib:
55         $(uninstall_ms_lib_cmd)
56
57 if PLATFORM_WIN32
58 no_undefined = -no-undefined
59 endif
60
61 if OS_WIN32_AND_DLL_COMPILATION
62 gmodule_win32_res = gmodule-win32-res.o
63 gmodule_win32_res_ldflag = -Wl,$(gmodule_win32_res)
64 endif
65
66 libgmodule_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
67 libgmodule_2_0_la_SOURCES = gmodule.c
68 libgmodule_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
69         $(gmodule_win32_res_ldflag) \
70         $(G_MODULE_LDFLAGS) \
71         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
72         -export-dynamic $(no_undefined)
73
74 libgmodule_2_0_la_LIBADD = $(G_MODULE_LIBS_EXTRA) $(G_MODULE_LIBS) $(libglib)
75
76 libgmodule_2_0_la_DEPENDENCIES = $(gmodule_win32_res) $(gmodule_def)
77
78 gmodule-win32-res.o: gmodule.rc
79         $(AM_V_GEN) $(WINDRES) gmodule.rc $@
80
81 gmodule-2.0.lib: libgmodule-2.0.la gmodule.def
82         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgmodule-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gmodule.def -out:$@
83
84 .PHONY: files release
85
86 files:
87         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
88           echo $$p; \
89         done
90
91 release:
92         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
93
94 dist-hook: $(BUILT_EXTRA_DIST)
95         @files='$(BUILT_EXTRA_DIST)'; \
96         for f in $$files; do \
97           if test -f $$f; then d=.; else d=$(srcdir); fi; \
98           cp $$d/$$f $(distdir) || exit 1; done
99
100
101 install-data-local: install-ms-lib
102
103 uninstall-local: uninstall-ms-lib
104
105 if HAVE_GLIB_RUNTIME_LIBDIR
106 install-data-hook:
107         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
108         mv $(DESTDIR)$(libdir)/libgmodule-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
109         mv $(DESTDIR)$(libdir)/libgmodule-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
110         rm -f $(DESTDIR)$(libdir)/libgmodule-2.0.so
111         ln -s $(GLIB_RUNTIME_LIBDIR)/libgmodule-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgmodule-2.0.so
112 endif