1## Process this file with automake to produce Makefile.in
2include $(top_srcdir)/Makefile.decl
3
4AM_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
12gmodule.def: gmodule.symbols
13	(echo -e EXPORTS; $(CPP) -P - <$(srcdir)/gmodule.symbols | sed -e '/^$$/d' -e 's/^/	/') > gmodule.def
14
15EXTRA_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
29BUILT_EXTRA_DIST = \
30		makefile.msc	\
31		gmodule.rc
32
33BUILT_SOURCES = gmoduleconf.h
34gmoduleconf.h:	gmoduleconf.h.in
35
36glibincludedir=$(includedir)/glib-2.0
37glibinclude_HEADERS = \
38		gmodule.h
39
40libglib = $(top_builddir)/glib/libglib-2.0.la
41
42top_builddir_full=`cd \$(top_builddir); pwd`
43
44lib_LTLIBRARIES = libgmodule-2.0.la
45
46if OS_WIN32_AND_DLL_COMPILATION
47if MS_LIB_AVAILABLE
48noinst_DATA = gmodule-2.0.lib
49
50install_ms_lib_cmd = $(INSTALL) gmodule-2.0.lib $(DESTDIR)$(libdir)
51uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gmodule-2.0.lib
52endif
53endif
54
55install-ms-lib:
56	$(install_ms_lib_cmd)
57
58uninstall-ms-lib:
59	$(uninstall_ms_lib_cmd)
60
61if PLATFORM_WIN32
62no_undefined = -no-undefined
63endif
64
65if OS_WIN32_AND_DLL_COMPILATION
66export_symbols = -export-symbols gmodule.def
67gmodule_def = gmodule.def
68
69gmodule_win32_res = gmodule-win32-res.o
70gmodule_win32_res_ldflag = -Wl,$(gmodule_win32_res)
71
72install-def-file:
73	$(INSTALL) gmodule.def $(DESTDIR)$(libdir)/gmodule-2.0.def
74
75uninstall-def-file:
76	-rm $(DESTDIR)$(libdir)/gmodule-2.0.def
77else
78install-def-file:
79uninstall-def-file:
80endif
81
82libgmodule_2_0_la_SOURCES = gmodule.c
83libgmodule_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
89libgmodule_2_0_la_LIBADD = $(G_MODULE_LIBS_EXTRA) $(G_MODULE_LIBS) $(libglib)
90
91libgmodule_2_0_la_DEPENDENCIES = $(gmodule_win32_res) $(gmodule_def)
92
93gmodule-win32-res.o: gmodule.rc
94	$(WINDRES) gmodule.rc $@
95
96gmodule-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:gmodule.def -out:$@
98
99.PHONY: files release
100
101files:
102	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
103	  echo $$p; \
104	done
105
106release:
107	$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
108
109dist-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
116install-data-local: install-ms-lib install-def-file
117
118uninstall-local: uninstall-ms-lib uninstall-def-file
119