in plugin/:
[moon.git] / plugin / Makefile.am
blobdaa4d8b16809f597928592848b040b4f1a6a0f92
1 SUBDIRS = . test samples firefox
2 DIST_SUBDIRS = $(SUBDIRS) install
4 CLEANFILES =
6 pluginlibdir=$(pkglibdir)/plugin
7 pluginlib_LTLIBRARIES = libmoonplugin.la libmoonloader.la
8 noinst_LTLIBRARIES = libmoonpluginxpi.la libmoonloaderxpi.la
10 INCLUDES = \
11         -I$(top_srcdir)/src \
12         -I$(top_srcdir)/src/zip \
13         -I/usr/include/X11 \
14         $(PLUGIN_CFLAGS) \
15         -Wall
18 #--- libmoonloader ----------------------
19 libmoonloader_la_LDFLAGS = \
20         -avoid-version
22 libmoonloader_la_LIBADD = -ldl $(LOADER_LIBS)
24 libmoonloader_la_SOURCES = \
25         plugin-proxy.cpp
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 = \
37         -avoid-version
39 libmoonplugin_la_LIBADD = $(top_builddir)/src/libmoon.la $(PLUGIN_LIBS)
41 INCLUDES += -I$(top_srcdir)/src/asf
43 libmoonplugin_la_SOURCES = \
44         cbinding.h      \
45         cbinding.cpp    \
46         browser-bridge.h                \
47         moonlight.h                     \
48         npstream-request.cpp            \
49         npstream-request.h              \
50         plugin.cpp                      \
51         plugin.h                        \
52         plugin-accessibility.cpp        \
53         plugin-accessibility.h          \
54         plugin-downloader.cpp           \
55         plugin-downloader.h             \
56         plugin-entry.cpp                \
57         plugin-glue.cpp                 \
58         plugin-class.cpp                \
59         plugin-class.g.cpp              \
60         plugin-class.h                  \
61         plugin-debug.cpp                \
62         plugin-debug.h                  \
63         plugin-utils.cpp                \
64         plugin-spinner.h                \
65         windowless.cpp                  \
66         windowless.h
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)
76 # custom install rule
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
82 if PLUGIN_INSTALL
83 user-plugin: libmoonloaderxpi.la libmoonpluginxpi.la
84         $(MAKE) $(AM_MAKEFLAGS) -C install
85 else
86 user-plugin:
87         @echo "Error: You must configure with Firefox 2 or 3 support"; exit 1
88 endif
90 untest-plugin:
91         -rm -rf ~/.mozilla/plugins/libmoonplugin.so
92         -rm -rf ~/.mozilla/plugins/libmoonloader.so
94 EXTRA_DIST = moon.config
96 dist-hook:
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
107 all-local:
108         @mkdir -p .libs
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)