Update build rules for the plugins cache in build tree
[vlc.git] / modules / Makefile.am
1 NULL =
2 BASE_SUBDIRS = \
3         access \
4         audio_filter \
5         audio_mixer \
6         audio_output \
7         codec \
8         control \
9         demux \
10         gui \
11         meta_engine \
12         misc \
13         media_library \
14         notify \
15         packetizer \
16         services_discovery \
17         stream_filter \
18         text_renderer \
19         video_chroma \
20         video_filter \
21         video_output \
22         visualization
23 EXTRA_SUBDIRS = \
24         access_output \
25         mux \
26         stream_out \
27         mmx \
28         mmxext \
29         sse2 \
30         3dnow \
31         altivec \
32         arm_neon \
33         lua \
34         $(NULL)
35
36 SUBDIRS = $(BASE_SUBDIRS)
37 DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS) .
38 if ENABLE_SOUT
39 SUBDIRS += access_output mux stream_out
40 endif
41 if HAVE_MMX
42 SUBDIRS += mmx
43 endif
44 if HAVE_MMXEXT
45 SUBDIRS += mmxext
46 endif
47 if HAVE_SSE2
48 SUBDIRS += sse2
49 endif
50 if HAVE_3DNOW
51 SUBDIRS += 3dnow
52 endif
53 if HAVE_ALTIVEC
54 SUBDIRS += altivec
55 endif
56 if HAVE_NEON
57 SUBDIRS += arm_neon
58 endif
59 if BUILD_LUA
60 SUBDIRS += lua
61 endif
62 SUBDIRS += .
63
64 dist_noinst_SCRIPTS = genmf list.sh
65 dist_noinst_DATA = LIST
66 noinst_DATA = plugins.dat
67 MOSTLYCLEANFILES = $(noinst_DATA)
68
69 .PHONY: plugins.dat
70
71 plugins.dat:
72         $(AM_V_at)rm -f plugins.dat
73         $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
74                 ../bin/vlc-cache-gen$(EXEEXT) . ; \
75         else \
76                 echo "Cross-compilation: cache generation skipped!" ; \
77         fi
78
79 install-exec-hook:
80         if test "$(build)" = "$(host)"; then \
81                 LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
82                 "$(DESTDIR)$(vlclibdir)/vlc-cache-gen$(EXEEXT)" \
83                          "$(DESTDIR)$(vlclibdir)/plugins" ; \
84         else \
85                 echo "Cross-compilation: cache generation skipped!" ; \
86         fi