Merge branch 'GVariant-bytestring-docs' into 'master'
[glib.git] / gmodule / Makefile.am
blob26578dd0c51ade64810e831b520b7e8f2fa01e63
1 ## Process this file with automake to produce Makefile.in
2 include $(top_srcdir)/glib.mk
4 AM_CPPFLAGS =                           \
5         $(glib_INCLUDES)                \
6         -DG_LOG_DOMAIN=\"GModule\"      \
7         @GLIB_DEBUG_FLAGS@              \
8         -DG_DISABLE_DEPRECATED
10 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
12 EXTRA_DIST +=                           \
13                 gmoduleconf.h.in        \
14                 gmodule-dl.c            \
15                 gmodule-dyld.c          \
16                 gmodule-win32.c         \
17                 gmodule-ar.c            \
18                 gmodule.rc.in
20 BUILT_EXTRA_DIST += \
21                 gmodule.rc
23 BUILT_SOURCES += gmoduleconf.h
24 gmoduleconf.h:  gmoduleconf.h.in
26 glibincludedir=$(includedir)/glib-2.0
27 glibinclude_HEADERS = \
28                 gmodule.h
30 libglib = $(top_builddir)/glib/libglib-2.0.la
32 top_builddir_full=`cd \$(top_builddir); pwd`
34 lib_LTLIBRARIES = libgmodule-2.0.la
36 if OS_WIN32_AND_DLL_COMPILATION
37 if MS_LIB_AVAILABLE
38 noinst_DATA += gmodule-2.0.lib
40 install_ms_lib_cmd = $(INSTALL) gmodule-2.0.lib $(DESTDIR)$(libdir)
41 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gmodule-2.0.lib
42 endif
43 endif
45 install-ms-lib:
46         $(install_ms_lib_cmd)
48 uninstall-ms-lib:
49         $(uninstall_ms_lib_cmd)
51 if PLATFORM_WIN32
52 no_undefined = -no-undefined
53 endif
55 if OS_WIN32_AND_DLL_COMPILATION
56 gmodule_win32_res = gmodule-win32-res.o
57 gmodule_win32_res_ldflag = -Wl,$(gmodule_win32_res)
58 endif
60 libgmodule_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS)
61 libgmodule_2_0_la_SOURCES = gmodule.c
62 libgmodule_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
63         $(gmodule_win32_res_ldflag) \
64         $(G_MODULE_LDFLAGS) \
65         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
66         -export-dynamic $(no_undefined)
68 libgmodule_2_0_la_LIBADD = $(G_MODULE_LIBS_EXTRA) $(G_MODULE_LIBS) $(libglib)
70 libgmodule_2_0_la_DEPENDENCIES = $(gmodule_win32_res) $(gmodule_def)
72 gmodule-win32-res.o: gmodule.rc
73         $(AM_V_GEN) $(WINDRES) gmodule.rc $@
75 gmodule.def: libgmodule-2.0.la
76         $(AM_V_GEN) dumpbin.exe -exports .libs/libgmodule-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gmodule.def.tmp && mv gmodule.def.tmp gmodule.def
78 gmodule-2.0.lib: libgmodule-2.0.la gmodule.def
79         $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgmodule-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gmodule.def -out:$@
81 .PHONY: files release
83 files:
84         @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
85           echo $$p; \
86         done
88 release:
89         $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
91 dist-hook: $(BUILT_EXTRA_DIST)
92         @files='$(BUILT_EXTRA_DIST)'; \
93         for f in $$files; do \
94           if test -f $$f; then d=.; else d=$(srcdir); fi; \
95           cp $$d/$$f $(distdir) || exit 1; done
98 install-data-local: install-ms-lib
100 uninstall-local: uninstall-ms-lib
102 if HAVE_GLIB_RUNTIME_LIBDIR
103 install-data-hook:
104         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
105         mv $(DESTDIR)$(libdir)/libgmodule-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
106         mv $(DESTDIR)$(libdir)/libgmodule-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
107         rm -f $(DESTDIR)$(libdir)/libgmodule-2.0.so
108         ln -s $(GLIB_RUNTIME_LIBDIR)/libgmodule-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgmodule-2.0.so
109 endif