1 SUBDIRS = . test samples firefox
2 DIST_SUBDIRS = $(SUBDIRS) install
6 pluginlibdir=$(pkglibdir)/plugin
7 pluginlib_LTLIBRARIES = libmoonplugin.la libmoonloader.la
8 noinst_LTLIBRARIES = libmoonpluginxpi.la libmoonloaderxpi.la
12 -I$(top_srcdir)/src/zip \
18 #--- libmoonloader ----------------------
19 libmoonloader_la_LDFLAGS = \
22 libmoonloader_la_LIBADD = -ldl $(LOADER_LIBS)
24 libmoonloader_la_SOURCES = \
27 #--- libmoonloaderxpi -------------------
28 libmoonloaderxpi_la_LDFLAGS = $(libmoonloader_la_LDFLAGS) -rpath /nowhere
30 libmoonloaderxpi_la_LIBADD = $(libmoonloader_la_LIBADD)
32 libmoonloaderxpi_la_SOURCES = $(libmoonloader_la_SOURCES)
34 #--- libmoonplugin ----------------------
36 libmoonplugin_la_LDFLAGS = \
39 libmoonplugin_la_LIBADD = $(top_builddir)/src/libmoon.la $(PLUGIN_LIBS)
41 INCLUDES += -I$(top_srcdir)/src/asf
43 libmoonplugin_la_SOURCES = \
48 npstream-request.cpp \
52 plugin-accessibility.cpp \
53 plugin-accessibility.h \
54 plugin-downloader.cpp \
69 #--- libmoonpluginxpi ----------------------
70 libmoonpluginxpi_la_LDFLAGS = $(libmoonplugin_la_LDFLAGS) -rpath /nowhere
72 libmoonpluginxpi_la_LIBADD = $(PLUGIN_XPI_LIBS)
74 libmoonpluginxpi_la_SOURCES = $(libmoonplugin_la_SOURCES)
77 test-plugin: libmoonloader.la libmoonplugin.la
78 mkdir -p ~/.mozilla/plugins
79 -rm -f ~/.mozilla/plugins/libmoon.so ~/.mozilla/plugins/libmoonplugin.so ~/.mozilla/plugins/libmoonloader.so
80 cp .libs/libmoonloader.so ~/.mozilla/plugins
83 user-plugin: libmoonloaderxpi.la libmoonpluginxpi.la
84 $(MAKE) $(AM_MAKEFLAGS) -C install
87 @echo "Error: You must configure with Firefox 2 or 3 support"; exit 1
91 -rm -rf ~/.mozilla/plugins/libmoonplugin.so
92 -rm -rf ~/.mozilla/plugins/libmoonloader.so
94 EXTRA_DIST = moon.config
97 mkdir $(distdir)/moz-sdk
98 -cp $(srcdir)/moz-sdk/*.h $(distdir)/moz-sdk
100 inst-%: $(OUTPUT_DIR)/%
101 -mkdir -p $(DESTDIR)$(pkglibdir)/plugin/
102 $(INSTALL) -c -m 755 $(OUTPUT_DIR)/$* $(DESTDIR)$(pkglibdir)/plugin/$*
103 test ! -f $(OUTPUT_DIR)/$*.mdb || $(INSTALL) -c -m 755 $(OUTPUT_DIR)/$*.mdb $(DESTDIR)$(pkglibdir)/plugin/$*.mdb
106 # gross hack needed because of the way the bridges are located
109 test -L .libs/libmoonplugin-ff2bridge.so || (cd .libs && ln -s ../firefox/ff2/.libs/libmoonplugin-ff2bridge.so)
110 test -L .libs/libmoonplugin-ff3bridge.so || (cd .libs && ln -s ../firefox/ff3/.libs/libmoonplugin-ff3bridge.so)