Makefile.am 2.38 KB
Newer Older
Tim Janik's avatar
Tim Janik committed
1 2
## Process this file with automake to produce Makefile.in

3 4
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \
	-DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@
Tim Janik's avatar
Tim Janik committed
5 6

EXTRA_DIST =	\
7 8
		makefile.mingw	\
		makefile.mingw.in \
9
		gmoduleconf.h.in \
10
		gmodule.def	\
11
		gmodule-dl.c	\
12
		gmodule-dld.c	\
Asbjørn Pettersen's avatar
Asbjørn Pettersen committed
13
		gmodule-os2.c	\
14
		gmodule-win32.c	\
15
		gmodule-beos.c	\
16
		gmoduleconf.h.win32 \
17 18
		gmodule.rc	\
		gmodule.rc.in
Tim Janik's avatar
Tim Janik committed
19 20 21 22 23 24 25

BUILT_SOURCES = gmoduleconf.h
gmoduleconf.h:	gmoduleconf.h.in

include_HEADERS = \
		gmodule.h

26
libglib = $(top_builddir)/libglib.la # -lglib
27

28 29
top_builddir_full=`cd \$(top_builddir); pwd`

30
lib_LTLIBRARIES = libgmodule.la libgplugin_a.la libgplugin_b.la
Tim Janik's avatar
Tim Janik committed
31

32 33 34 35
libgmodule_la_SOURCES = gmodule.c
libgmodule_la_LDFLAGS = \
	@G_MODULE_LDFLAGS@ \
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
36 37
	-release $(LT_RELEASE) \
	-export-dynamic
38

39
libgmodule_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ # $(libglib)
40
# we should really depend on $(libglib) for libgmodule.la, but libtool has a
41
# problem with this ;(
Tim Janik's avatar
Tim Janik committed
42 43

libgplugin_a_la_SOURCES = libgplugin_a.c
Manish Singh's avatar
Manish Singh committed
44
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
45
libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
Tim Janik's avatar
Tim Janik committed
46 47

libgplugin_b_la_SOURCES = libgplugin_b.c
Manish Singh's avatar
Manish Singh committed
48
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
49
libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
Tim Janik's avatar
Tim Janik committed
50 51 52

noinst_PROGRAMS = testgmodule
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
53
testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
Tim Janik's avatar
Tim Janik committed
54

55
gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
56
	cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
57

58 59 60
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.mingw.in
	cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status

Tim Janik's avatar
Tim Janik committed
61 62 63 64 65 66 67
.PHONY: files release

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done

68 69 70 71 72 73 74 75 76 77
install-libLTLIBRARIES: libgmodule.la
	@$(NORMAL_INSTALL)
	$(mkinstalldirs) $(DESTDIR)$(libdir)
	@list='libgmodule.la'; for p in $$list; do \
	 if test -f $$p; then \
	  echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
	  $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
	 else :; fi; \
	done

Tim Janik's avatar
Tim Janik committed
78 79
release:
	$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`