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