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