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