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