]> git.sesse.net Git - vlc/blob - Makefile
ff4752694719221196392091a7d3a20429d9e9b7
[vlc] / Makefile
1 ###############################################################################
2 # vlc (VideoLAN Client) main Makefile - (c)1998 VideoLAN
3 ###############################################################################
4
5 ifeq ($(shell [ ! -r Makefile.opts ] && echo 1),)
6     include Makefile.opts
7 endif
8 ifeq ($(shell [ ! -r Makefile.config ] && echo 1),)
9     include Makefile.config
10 endif
11
12 ###############################################################################
13 # Objects and files
14 ###############################################################################
15
16
17 # All possible plugin directories, needed for make clean
18 #
19 PLUGINS_DIR :=  a52 \
20                 a52_system \
21                 aa \
22                 ac3_adec \
23                 ac3_spdif \
24                 access \
25                 alsa \
26                 arts \
27                 avi \
28                 beos \
29                 chroma \
30                 directx \
31                 downmix \
32                 dsp \
33                 dummy \
34                 dvd \
35                 dvdread \
36                 esd \
37                 fb \
38                 ffmpeg \
39                 mp4 \
40                 filter \
41                 fx \
42                 ggi \
43                 glide \
44                 gtk \
45                 idct \
46                 imdct \
47                 kde \
48                 lirc \
49                 lpcm_adec \
50                 macosx \
51                 mad \
52                 memcpy \
53                 mga \
54                 motion \
55                 mpeg_system \
56                 mpeg_adec \
57                 mpeg_vdec \
58                 network \
59                 ogg \
60                 qnx \
61                 qt \
62                 satellite \
63                 sdl \
64                 spudec \
65                 text \
66                 vcd \
67                 win32 \
68                 x11 \
69                 xosd
70
71 PLUGINS_TARGETS := a52/a52 \
72                 aa/aa \
73                 a52_system/a52_system \
74                 ac3_adec/ac3_adec \
75                 ac3_spdif/ac3_spdif \
76                 access/file \
77                 access/udp \
78                 access/http \
79                 alsa/alsa \
80                 arts/arts \
81                 avi/avi \
82                 beos/beos \
83                 chroma/chroma_i420_rgb \
84                 chroma/chroma_i420_rgb_mmx \
85                 chroma/chroma_i420_yuy2 \
86                 chroma/chroma_i420_yuy2_mmx \
87                 chroma/chroma_i422_yuy2 \
88                 chroma/chroma_i422_yuy2_mmx \
89                 chroma/chroma_i420_ymga \
90                 chroma/chroma_i420_ymga_mmx \
91                 directx/directx \
92                 downmix/downmix \
93                 downmix/downmixsse \
94                 downmix/downmix3dn \
95                 dsp/dsp \
96                 dummy/dummy \
97                 dummy/null \
98                 dvd/dvd \
99                 dvdread/dvdread \
100                 esd/esd \
101                 fb/fb \
102                 ffmpeg/ffmpeg \
103                 mp4/mp4 \
104                 filter/filter_clone \
105                 filter/filter_crop \
106                 filter/filter_deinterlace \
107                 filter/filter_distort \
108                 filter/filter_invert \
109                 filter/filter_transform \
110                 filter/filter_wall \
111                 filter/filter_clone \
112                 fx/fx_scope \
113                 ggi/ggi \
114                 glide/glide \
115                 gtk/gnome \
116                 gtk/gtk \
117                 idct/idct \
118                 idct/idctclassic \
119                 idct/idctmmx \
120                 idct/idctmmxext \
121                 idct/idctaltivec \
122                 imdct/imdct \
123                 imdct/imdct3dn \
124                 imdct/imdctsse \
125                 kde/kde \
126                 lirc/lirc \
127                 lpcm_adec/lpcm_adec \
128                 macosx/macosx \
129                 mad/mad \
130                 memcpy/memcpy \
131                 memcpy/memcpymmx \
132                 memcpy/memcpymmxext \
133                 memcpy/memcpy3dn \
134                 memcpy/memcpyaltivec \
135                 mga/mga \
136                 mga/xmga \
137                 motion/motion \
138                 motion/motionmmx \
139                 motion/motionmmxext \
140                 motion/motion3dnow \
141                 motion/motionaltivec \
142                 mpeg_system/mpeg_audio \
143                 mpeg_system/mpeg_es \
144                 mpeg_system/mpeg_ps \
145                 mpeg_system/mpeg_ts \
146                 mpeg_system/mpeg_ts_dvbpsi \
147                 mpeg_adec/mpeg_adec \
148                 mpeg_vdec/mpeg_vdec \
149                 network/ipv4 \
150                 network/ipv6 \
151                 ogg/vorbis \
152                 qnx/qnx \
153                 qt/qt \
154                 satellite/satellite \
155                 sdl/sdl \
156                 spudec/spudec \
157                 text/logger \
158                 text/ncurses \
159                 text/rc \
160                 vcd/vcd \
161                 win32/waveout \
162                 win32/intfwin \
163                 x11/x11 \
164                 x11/xvideo \
165                 xosd/xosd
166
167 #
168 # C Objects
169
170 VLC := vlc
171 LIBVLC := libvlc
172 INTERFACE := interface intf_eject
173 PLAYLIST := playlist
174 INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system
175 VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
176 AUDIO_OUTPUT := audio_output aout_ext-dec aout_pcm aout_spdif
177 MISC := mtime modules threads cpu configuration netutils iso_lang messages objects extras
178
179 LIBVLC_OBJ :=   $(LIBVLC:%=src/%.o) \
180                 $(INTERFACE:%=src/interface/%.o) \
181                 $(PLAYLIST:%=src/playlist/%.o) \
182                 $(INPUT:%=src/input/%.o) \
183                 $(VIDEO_OUTPUT:%=src/video_output/%.o) \
184                 $(AUDIO_OUTPUT:%=src/audio_output/%.o) \
185                 $(MISC:%=src/misc/%.o)
186
187 VLC_OBJ := $(VLC:%=src/%.o)
188
189 C_OBJ := $(VLC_OBJ) $(LIBVLC_OBJ)
190
191 #
192 # Misc Objects
193
194 ifeq ($(NEED_GETOPT),1)
195 LIBVLC_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o 
196 endif
197
198 ifeq ($(NEED_SYMBOLS),1)
199 LIBVLC_OBJ += src/misc/symbols.o
200 endif
201
202 ifeq ($(SYS),beos)
203 CPP_OBJ :=      src/misc/beos_specific.o
204 endif
205
206 ifneq (,$(findstring darwin,$(SYS)))
207 LIBVLC_OBJ +=   src/misc/darwin_specific.o
208 endif
209
210 ifneq (,$(findstring mingw32,$(SYS)))
211 LIBVLC_OBJ +=   src/misc/win32_specific.o
212 RESOURCE_OBJ := share/vlc_win32_rc.o
213 endif
214
215 LIBVLC_OBJ += $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ)
216 VLC_OBJ += $(RESOURCE_OBJ)
217
218 #
219 # Generated header
220 #
221 H_OBJ :=        src/misc/modules_builtin.h
222
223 #
224 # Other lists of files
225 #
226 C_DEP := $(C_OBJ:%.o=.dep/%.d)
227 CPP_DEP := $(CPP_OBJ:%.o=.dep/%.dpp)
228
229 #
230 # Translate plugin names
231 #
232 ifneq (,$(PLUGINS))
233 PLUGIN_OBJ := $(shell for i in $(PLUGINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@plugins/\1.so@' -e 's@^ .*@@' ; done)
234 endif
235 ifneq (,$(BUILTINS))
236 BUILTIN_OBJ := $(shell for i in $(BUILTINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@plugins/\1.a@' -e 's@^ .*@@' ; done)
237 endif
238
239 #
240 # Misc variables
241 #
242 VERSION := $(shell grep '^ *VERSION=' configure.in | head -1 | sed 's/"//g' | cut -f2 -d=)
243
244 # All symbols must be exported
245 export
246
247 ###############################################################################
248 # Targets
249 ###############################################################################
250
251 #
252 # Virtual targets
253 #
254 all: Makefile.opts vlc ${ALIASES} vlc.app plugins po mozilla/libvlcplugin.so
255
256 Makefile.opts:
257         @echo "**** No configuration found, please run ./configure"
258         @exit 1
259 #       ./configure
260 #       $(MAKE) $(MAKECMDGOALS)
261 #       exit    
262
263 show:
264         @echo CC: $(CC)
265         @echo CFLAGS: $(CFLAGS)
266         @echo LDFLAGS: $(LDFLAGS)
267         @echo plugins_CFLAGS: $(plugins_CFLAGS)
268         @echo plugins_LDFLAGS: $(plugins_LDFLAGS)
269         @echo builtins_CFLAGS: $(builtins_CFLAGS)
270         @echo builtins_LDFLAGS: $(builtins_LDFLAGS)
271         @echo C_OBJ: $(C_OBJ)
272         @echo CPP_OBJ: $(CPP_OBJ)
273         @echo PLUGIN_OBJ: $(PLUGIN_OBJ)
274         @echo BUILTIN_OBJ: $(BUILTIN_OBJ)
275
276 #
277 # Cleaning rules
278 #
279 clean: plugins-clean po-clean vlc-clean mozilla-clean
280         rm -f src/*/*.o extras/*/*.o
281         rm -f lib/*.so* lib/*.a
282         rm -f plugins/*.so plugins/*.a plugins/*.lib plugins/*.tds
283         rm -Rf extras/MacOSX/build
284
285 po-clean:
286         -cd po && $(MAKE) clean
287
288 plugins-clean:
289         for dir in $(PLUGINS_DIR) ; do \
290                 ( cd plugins/$${dir} \
291                         && $(MAKE) -f ../../Makefile.modules clean ) ; done
292         rm -f plugins/*/*.o plugins/*/*.lo plugins/*/*.moc plugins/*/*.bak
293
294 vlc-clean:
295         rm -f $(C_OBJ) $(CPP_OBJ)
296         rm -f vlc gnome-vlc gvlc kvlc qvlc vlc.exe
297         rm -Rf vlc.app
298
299 mozilla-clean:
300         -cd mozilla && $(MAKE) clean
301
302 distclean: clean
303         -cd po && $(MAKE) maintainer-clean
304         rm -f **/*.o **/*~ *.log
305         rm -f Makefile.opts Makefile.config
306         rm -f include/defs.h include/modules_builtin.h
307         rm -f src/misc/modules_builtin.h
308         rm -f config*status config*cache config*log conftest*
309         rm -f gmon.out core build-stamp
310         rm -Rf .dep
311         rm -f .gdb_history
312
313 #
314 # Install/uninstall rules
315 #
316 install: vlc-install plugins-install po-install mozilla-install
317
318 uninstall: vlc-uninstall plugins-uninstall po-uninstall mozilla-uninstall
319
320 vlc-install:
321         mkdir -p $(DESTDIR)$(bindir)
322         $(INSTALL) vlc $(DESTDIR)$(bindir)
323 ifneq (,$(ALIASES))
324         for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
325 endif
326         mkdir -p $(DESTDIR)$(datadir)/vlc
327         $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/vlc
328         $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/vlc
329         $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/vlc
330
331 vlc-uninstall:
332         rm -f $(DESTDIR)$(bindir)/vlc
333 ifneq (,$(ALIASES))
334         for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias ; fi ; done
335 endif
336         rm -f $(DESTDIR)$(datadir)/vlc/*.psf
337         rm -f $(DESTDIR)$(datadir)/vlc/*.png
338         rm -f $(DESTDIR)$(datadir)/vlc/*.xpm
339
340 plugins-install:
341         mkdir -p $(DESTDIR)$(libdir)/vlc
342 ifneq (,$(PLUGINS))
343         $(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc
344 endif
345
346 plugins-uninstall:
347         rm -f $(DESTDIR)$(libdir)/vlc/*.so
348
349 mozilla-install:
350 ifeq ($(MOZILLA),1)
351         -cd mozilla && $(MAKE) install
352 endif
353
354 mozilla-uninstall:
355 ifeq ($(MOZILLA),1)
356         -cd mozilla && $(MAKE) uninstall
357 endif
358
359 po-install:
360         -cd po && $(MAKE) install
361
362 po-uninstall:
363         -cd po && $(MAKE) uninstall
364
365 #
366 # Package generation rules
367 #
368 dist:
369         # Check that tmp isn't in the way
370         @if test -e tmp; then \
371                 echo "Error: please remove ./tmp, it is in the way"; false; \
372         else \
373                 echo "OK."; mkdir tmp; \
374         fi
375         # Copy directory structure in tmp
376         find -type d | grep -v '\(\.dep\|snapshot\|CVS\)' | while read i ; \
377                 do mkdir -p tmp/vlc/$$i ; \
378         done
379         rm -Rf tmp/vlc/tmp
380         find debian -mindepth 1 -maxdepth 1 -type d | \
381                 while read i ; do rm -Rf tmp/vlc/$$i ; done
382         # Copy .c .h .in .cpp .m and .glade files
383         find include src plugins -type f -name '*.[bcdhigmrst]*' | while read i ; \
384                 do cp $$i tmp/vlc/$$i ; done
385         # Grmbl... special case...
386         for i in API BUGS DESIGN TODO ; \
387                 do cp plugins/mad/$$i tmp/vlc/plugins/mad ; done
388         # Copy plugin Makefiles
389         find plugins -type f -name Makefile | while read i ; \
390                 do cp $$i tmp/vlc/$$i ; done
391         # Copy extra programs and documentation
392         cp -a extras/* tmp/vlc/extras
393         cp -a doc/* tmp/vlc/doc
394         find tmp/vlc/extras tmp/vlc/doc \
395                 -type d -name CVS -o -name '.*' -o -name '*.[o]' | \
396                         while read i ; do rm -Rf $$i ; done
397         # Copy gettext stuff
398         cp po/ChangeLog po/vlc.pot po/*.po tmp/vlc/po
399         for i in Makefile.in.in POTFILES.in ; do cp po/$$i tmp/vlc/po ; done
400         # Copy misc files
401         cp FAQ AUTHORS COPYING TODO todo.pl ChangeLog* README* INSTALL* \
402                 ABOUT-NLS BUGS MODULES vlc.spec \
403                 Makefile Makefile.*.in Makefile.dep Makefile.modules \
404                 configure configure.in install-sh install-win32 macosx-dmg \
405                 config.sub config.guess aclocal.m4 mkinstalldirs \
406                         tmp/vlc/
407         # Copy Debian control files
408         for file in debian/*dirs debian/*docs debian/*menu debian/*desktop \
409                 debian/*copyright ; do cp $$file tmp/vlc/debian ; done
410         for file in control changelog rules ; do \
411                 cp debian/$$file tmp/vlc/debian/ ; done
412         # Copy ipkg control files
413         for file in control rules patch ; do \
414                 cp ipkg/$$file tmp/vlc/ipkg/ ; done
415         # Copy fonts and icons
416         for file in share/*vlc* share/*psf; do \
417                 cp $$file tmp/vlc/share ; done
418         # Build archives
419         F=vlc-${VERSION}; \
420         mv tmp/vlc tmp/$$F; (cd tmp ; \
421                 cd $$F && $(MAKE) distclean && cd .. ; \
422                 tar czf ../$$F.tar.gz $$F);
423         # Clean up
424         rm -Rf tmp
425
426 package-win32:
427         # XXX: this rule is probably only useful to you if you have exactly
428         # the same setup as me. Contact sam@zoy.org if you need to use it.
429         #
430         # Check that tmp isn't in the way
431         @if test -e tmp; then \
432                 echo "Error: please remove ./tmp, it is in the way"; false; \
433         else \
434                 echo "OK."; mkdir tmp; \
435         fi
436         # Create installation script
437         cp install-win32 tmp/nsi
438         # Copy relevant files
439         cp vlc.exe tmp/ 
440         $(STRIP) tmp/vlc.exe
441         cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
442         for file in AUTHORS COPYING ChangeLog README FAQ TODO ; \
443                         do cp $$file tmp/$${file}.txt ; \
444                         unix2dos tmp/$${file}.txt ; done
445         mkdir tmp/plugins
446         cp $(PLUGINS:%=plugins/%.so) tmp/plugins/ 
447         # don't include these two
448         #rm -f tmp/plugins/gtk.so tmp/plugins/sdl.so
449 ifneq (,$(PLUGINS))
450         for i in $(PLUGINS) ; do if test $$i != intfwin ; then $(STRIP) tmp/plugins/$$i.so ; fi ; done
451 endif
452         mkdir tmp/share
453         for file in default8x16.psf default8x9.psf ; \
454                 do cp share/$$file tmp/share/ ; done
455         # Create package 
456         wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} /CD tmp/nsi
457         # Clean up
458         rm -Rf tmp
459
460 package-beos:
461         # Check that tmp isn't in the way
462         @if test -e tmp; then \
463                 echo "Error: please remove ./tmp, it is in the way"; false; \
464         else \
465                 echo "OK."; mkdir tmp; \
466         fi
467         
468         # Create dir
469         mkdir -p tmp/vlc/share
470         # Copy relevant files
471         cp vlc tmp/vlc/
472         strip tmp/vlc/vlc
473         xres -o tmp/vlc/vlc ./share/vlc_beos.rsrc
474         cp AUTHORS COPYING ChangeLog README FAQ TODO tmp/vlc/
475         for file in default8x16.psf default8x9.psf ; \
476                 do cp share/$$file tmp/vlc/share/ ; done
477         mkdir tmp/vlc/plugins
478         cp $(PLUGINS:%=plugins/%.so) tmp/vlc/plugins/ 
479         strip $(PLUGINS:%=tmp/vlc/plugins/%.so)
480         # Create package 
481         mv tmp/vlc tmp/vlc-${VERSION}
482         (cd tmp ; find vlc-${VERSION} | \
483         zip -9 -@ vlc-${VERSION}-BeOS-x86.zip )
484         mv tmp/vlc-${VERSION}-BeOS-x86.zip .
485         # Clean up
486         rm -Rf tmp
487
488 package-macosx:
489         # Check that tmp isn't in the way
490         @if test -e tmp; then \
491                 echo "Error: please remove ./tmp, it is in the way"; false; \
492         else \
493                 echo "OK."; mkdir tmp; \
494         fi
495
496         # Copy relevant files 
497         cp -R vlc.app tmp/
498         cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf FAQ TODO tmp/
499
500         # Create disk image 
501         ./macosx-dmg 0 "vlc-${VERSION}" tmp/* 
502
503         # Clean up
504         rm -Rf tmp
505
506 #
507 # Gtk/Gnome/* aliases and OS X application
508 #
509 gnome-vlc gvlc kvlc qvlc: vlc
510         rm -f $@ && ln -s vlc $@
511
512 .PHONY: vlc.app
513 vlc.app: vlc plugins
514 ifneq (,$(findstring darwin,$(SYS)))
515         rm -Rf vlc.app
516         cd extras/MacOSX ; pbxbuild | grep -v '^ ' | grep -v '^\t' | grep -v "^$$"
517         cp -r extras/MacOSX/build/vlc.bundle ./vlc.app
518         $(INSTALL) -d vlc.app/Contents/MacOS/share
519         $(INSTALL) -d vlc.app/Contents/MacOS/plugins
520         $(INSTALL) vlc vlc.app/Contents/MacOS/
521 ifneq (,$(PLUGINS))
522         $(INSTALL) $(PLUGINS:%=plugins/%.so) vlc.app/Contents/MacOS/plugins
523 endif
524         $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
525 endif
526
527 FORCE:
528
529 #
530 # Generic rules (see below)
531 #
532 src/misc/modules_builtin.h: Makefile.opts Makefile Makefile.config
533         @echo "make[$(MAKELEVEL)]: Creating \`$@'"
534         @rm -f $@ && cp $@.in $@
535 ifneq (,$(BUILTINS))
536         @for i in $(BUILTINS) ; do \
537                 echo "int InitModule__MODULE_"$$i"( module_t* );" >>$@; \
538                 echo "int ActivateModule__MODULE_"$$i"( module_t* );" >>$@; \
539                 echo "int DeactivateModule__MODULE_"$$i"( module_t* );" >>$@; \
540         done
541         @echo "" >> $@ ;
542 endif
543         @echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@ ;
544         @echo "    do \\" >> $@ ;
545         @echo "    { \\" >> $@ ;
546 ifneq (,$(BUILTINS))
547         @for i in $(BUILTINS) ; do \
548                 echo "        ALLOCATE_BUILTIN("$$i"); \\" >> $@ ; \
549         done
550 endif
551         @echo "    } while( 0 );" >> $@ ;
552         @echo "" >> $@ ;
553
554 $(C_DEP): %.d: FORCE
555         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
556
557 $(CPP_DEP): %.dpp: FORCE
558         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
559
560 $(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
561 $(C_OBJ): %.o: $(H_OBJ)
562 $(C_OBJ): %.o: .dep/%.d
563 $(C_OBJ): %.o: %.c
564         $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
565
566 $(CPP_OBJ): %.o: Makefile.opts Makefile.dep Makefile
567 $(CPP_OBJ): %.o: $(H_OBJ)
568 $(CPP_OBJ): %.o: .dep/%.dpp
569 $(CPP_OBJ): %.o: %.cpp
570         $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
571
572 $(M_OBJ): %.o: Makefile.opts Makefile.dep Makefile
573 $(M_OBJ): %.o: $(H_OBJ)
574 $(M_OBJ): %.o: .dep/%.dm
575 $(M_OBJ): %.o: %.m
576         $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
577
578 $(RESOURCE_OBJ): %.o: Makefile.dep Makefile
579 ifneq (,(findstring mingw32,$(SYS)))
580 $(RESOURCE_OBJ): %.o: %.rc
581         $(WINDRES) -i $< -o $@
582 endif
583
584 #
585 # Main application target
586 #
587 vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ)
588         $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS)
589 ifeq ($(SYS),beos)
590         xres -o $@ ./share/vlc_beos.rsrc
591         mimeset -f $@
592 endif
593
594 # here are the rules for a dynamic link of libvlc:
595 #vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.so $(BUILTIN_OBJ)
596 #       $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(builtins_LDFLAGS) -L./lib -lvlc
597
598 #
599 # Main library target
600 #
601 lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
602         rm -f $@
603         ar rc $@ $(LIBVLC_OBJ)
604         $(RANLIB) $@
605
606 #lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
607 #       $(CC) -shared $(LIBVLC_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) -o $@
608 #       chmod a-x $@
609
610 #
611 # Plugins target
612 #
613 plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
614 $(PLUGIN_OBJ): $(H_OBJ) FORCE
615         @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
616
617 #
618 # Built-in modules target
619 #
620 builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
621 $(BUILTIN_OBJ): $(H_OBJ) FORCE
622         @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
623
624 #
625 # Mozilla plugin target
626 #
627 mozilla/libvlcplugin.so: FORCE
628 ifeq ($(MOZILLA),1)
629         @cd mozilla && $(MAKE) builtins_LDFLAGS="$(builtins_LDFLAGS)"
630 endif
631
632 #
633 # gettext target
634 #
635 po: FORCE
636         @cd po && $(MAKE)
637