]> git.sesse.net Git - vlc/blob - Makefile
* ALL: changed "struct foo_s" into "struct foo_t" to make greppers happy.
[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 libvlc-install po-install mozilla-install
317
318 uninstall: vlc-uninstall plugins-uninstall libvlc-install 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) $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc
344 endif
345
346 plugins-uninstall:
347         rm -f $(DESTDIR)$(libdir)/vlc/*.so
348
349 libvlc-install:
350         mkdir -p $(DESTDIR)$(bindir)
351         $(INSTALL) vlc-config $(DESTDIR)$(bindir)
352         mkdir -p $(DESTDIR)$(includedir)/vlc
353         $(INSTALL) -m 644 include/vlc/*.h $(DESTDIR)$(includedir)/vlc
354         mkdir -p $(DESTDIR)$(libdir)
355         $(INSTALL) -m 644 lib/libvlc.a $(DESTDIR)$(libdir)
356
357 libvlc-uninstall:
358         rm -f $(DESTDIR)$(bindir)/vlc-config
359         rm -Rf $(DESTDIR)$(includedir)/vlc
360         rm -f $(DESTDIR)$(libdir)/libvlc.a
361
362 mozilla-install:
363 ifeq ($(MOZILLA),1)
364         -cd mozilla && $(MAKE) install
365 endif
366
367 mozilla-uninstall:
368 ifeq ($(MOZILLA),1)
369         -cd mozilla && $(MAKE) uninstall
370 endif
371
372 po-install:
373         -cd po && $(MAKE) install
374
375 po-uninstall:
376         -cd po && $(MAKE) uninstall
377
378 #
379 # Package generation rules
380 #
381 dist:
382         # Check that tmp isn't in the way
383         @if test -e tmp; then \
384                 echo "Error: please remove ./tmp, it is in the way"; false; \
385         else \
386                 echo "OK."; mkdir tmp; \
387         fi
388         # Copy directory structure in tmp
389         find -type d | grep -v '\(\.dep\|snapshot\|CVS\)' | while read i ; \
390                 do mkdir -p tmp/vlc/$$i ; \
391         done
392         rm -Rf tmp/vlc/tmp
393         find debian -mindepth 1 -maxdepth 1 -type d | \
394                 while read i ; do rm -Rf tmp/vlc/$$i ; done
395         # Copy .c .h .in .cpp .m and .glade files
396         find include src plugins -type f -name '*.[bcdhigmrst]*' | while read i ; \
397                 do cp $$i tmp/vlc/$$i ; done
398         # Grmbl... special case...
399         for i in API BUGS DESIGN TODO ; \
400                 do cp plugins/mad/$$i tmp/vlc/plugins/mad ; done
401         # Copy plugin Makefiles
402         find plugins -type f -name Makefile | while read i ; \
403                 do cp $$i tmp/vlc/$$i ; done
404         # Copy extra programs and documentation
405         cp -a extras/* tmp/vlc/extras
406         cp -a doc/* tmp/vlc/doc
407         find tmp/vlc/extras tmp/vlc/doc \
408                 -type d -name CVS -o -name '.*' -o -name '*.[o]' | \
409                         while read i ; do rm -Rf $$i ; done
410         # Copy gettext stuff
411         cp po/ChangeLog po/vlc.pot po/*.po tmp/vlc/po
412         for i in Makefile.in.in POTFILES.in ; do cp po/$$i tmp/vlc/po ; done
413         # Copy misc files
414         cp FAQ AUTHORS COPYING TODO todo.pl ChangeLog* README* INSTALL* \
415                 ABOUT-NLS BUGS MODULES vlc.spec \
416                 Makefile Makefile.*.in Makefile.dep Makefile.modules \
417                 configure configure.in install-sh install-win32 macosx-dmg \
418                 config.sub config.guess aclocal.m4 mkinstalldirs \
419                         tmp/vlc/
420         # Copy Debian control files
421         for file in debian/*dirs debian/*docs debian/*menu debian/*desktop \
422                 debian/*copyright ; do cp $$file tmp/vlc/debian ; done
423         for file in control changelog rules ; do \
424                 cp debian/$$file tmp/vlc/debian/ ; done
425         # Copy ipkg control files
426         for file in control rules patch ; do \
427                 cp ipkg/$$file tmp/vlc/ipkg/ ; done
428         # Copy fonts and icons
429         for file in share/*vlc* share/*psf; do \
430                 cp $$file tmp/vlc/share ; done
431         # Build archives
432         F=vlc-${VERSION}; \
433         mv tmp/vlc tmp/$$F; (cd tmp ; \
434                 cd $$F && $(MAKE) distclean && cd .. ; \
435                 tar czf ../$$F.tar.gz $$F);
436         # Clean up
437         rm -Rf tmp
438
439 package-win32:
440         # XXX: this rule is probably only useful to you if you have exactly
441         # the same setup as me. Contact sam@zoy.org if you need to use it.
442         #
443         # Check that tmp isn't in the way
444         @if test -e tmp; then \
445                 echo "Error: please remove ./tmp, it is in the way"; false; \
446         else \
447                 echo "OK."; mkdir tmp; \
448         fi
449         # Create installation script
450         cp install-win32 tmp/nsi
451         # Copy relevant files
452         cp vlc.exe tmp/ 
453         $(STRIP) tmp/vlc.exe
454         cp INSTALL.win32 tmp/INSTALL.txt ; unix2dos tmp/INSTALL.txt
455         for file in AUTHORS COPYING ChangeLog README FAQ TODO ; \
456                         do cp $$file tmp/$${file}.txt ; \
457                         unix2dos tmp/$${file}.txt ; done
458         mkdir tmp/plugins
459         cp $(PLUGINS:%=plugins/%.so) tmp/plugins/ 
460         # don't include these two
461         #rm -f tmp/plugins/gtk.so tmp/plugins/sdl.so
462 ifneq (,$(PLUGINS))
463         for i in $(PLUGINS) ; do if test $$i != intfwin ; then $(STRIP) tmp/plugins/$$i.so ; fi ; done
464 endif
465         mkdir tmp/share
466         for file in default8x16.psf default8x9.psf ; \
467                 do cp share/$$file tmp/share/ ; done
468         # Create package 
469         wine ~/.wine/fake_windows/Program\ Files/NSIS/makensis.exe -- /DVERSION=${VERSION} /CD tmp/nsi
470         # Clean up
471         rm -Rf tmp
472
473 package-beos:
474         # Check that tmp isn't in the way
475         @if test -e tmp; then \
476                 echo "Error: please remove ./tmp, it is in the way"; false; \
477         else \
478                 echo "OK."; mkdir tmp; \
479         fi
480         
481         # Create dir
482         mkdir -p tmp/vlc/share
483         # Copy relevant files
484         cp vlc tmp/vlc/
485         strip tmp/vlc/vlc
486         xres -o tmp/vlc/vlc ./share/vlc_beos.rsrc
487         cp AUTHORS COPYING ChangeLog README FAQ TODO tmp/vlc/
488         for file in default8x16.psf default8x9.psf ; \
489                 do cp share/$$file tmp/vlc/share/ ; done
490         mkdir tmp/vlc/plugins
491         cp $(PLUGINS:%=plugins/%.so) tmp/vlc/plugins/ 
492         strip $(PLUGINS:%=tmp/vlc/plugins/%.so)
493         # Create package 
494         mv tmp/vlc tmp/vlc-${VERSION}
495         (cd tmp ; find vlc-${VERSION} | \
496         zip -9 -@ vlc-${VERSION}-BeOS-x86.zip )
497         mv tmp/vlc-${VERSION}-BeOS-x86.zip .
498         # Clean up
499         rm -Rf tmp
500
501 package-macosx:
502         # Check that tmp isn't in the way
503         @if test -e tmp; then \
504                 echo "Error: please remove ./tmp, it is in the way"; false; \
505         else \
506                 echo "OK."; mkdir tmp; \
507         fi
508
509         # Copy relevant files 
510         cp -R vlc.app tmp/
511         cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf FAQ TODO tmp/
512
513         # Create disk image 
514         ./macosx-dmg 0 "vlc-${VERSION}" tmp/* 
515
516         # Clean up
517         rm -Rf tmp
518
519 #
520 # Gtk/Gnome/* aliases and OS X application
521 #
522 gnome-vlc gvlc kvlc qvlc: vlc
523         rm -f $@ && ln -s vlc $@
524
525 .PHONY: vlc.app
526 vlc.app: vlc plugins
527 ifneq (,$(findstring darwin,$(SYS)))
528         rm -Rf vlc.app
529         cd extras/MacOSX ; pbxbuild | grep -v '^ ' | grep -v '^\t' | grep -v "^$$"
530         cp -r extras/MacOSX/build/vlc.bundle ./vlc.app
531         $(INSTALL) -d vlc.app/Contents/MacOS/share
532         $(INSTALL) -d vlc.app/Contents/MacOS/plugins
533         $(INSTALL) vlc vlc.app/Contents/MacOS/
534 ifneq (,$(PLUGINS))
535         $(INSTALL) $(PLUGINS:%=plugins/%.so) vlc.app/Contents/MacOS/plugins
536 endif
537         $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
538 endif
539
540 FORCE:
541
542 #
543 # Generic rules (see below)
544 #
545 src/misc/modules_builtin.h: Makefile.opts Makefile Makefile.config
546         @echo "make[$(MAKELEVEL)]: Creating \`$@'"
547         @rm -f $@ && cp $@.in $@
548 ifneq (,$(BUILTINS))
549         @for i in $(BUILTINS) ; do \
550                 echo "int InitModule__MODULE_"$$i"( module_t* );" >>$@; \
551                 echo "int ActivateModule__MODULE_"$$i"( module_t* );" >>$@; \
552                 echo "int DeactivateModule__MODULE_"$$i"( module_t* );" >>$@; \
553         done
554         @echo "" >> $@ ;
555 endif
556         @echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@ ;
557         @echo "    do \\" >> $@ ;
558         @echo "    { \\" >> $@ ;
559 ifneq (,$(BUILTINS))
560         @for i in $(BUILTINS) ; do \
561                 echo "        ALLOCATE_BUILTIN("$$i"); \\" >> $@ ; \
562         done
563 endif
564         @echo "    } while( 0 );" >> $@ ;
565         @echo "" >> $@ ;
566
567 $(C_DEP): %.d: FORCE
568         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
569
570 $(CPP_DEP): %.dpp: FORCE
571         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
572
573 $(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
574 $(C_OBJ): %.o: $(H_OBJ)
575 $(C_OBJ): %.o: .dep/%.d
576 $(C_OBJ): %.o: %.c
577         $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
578
579 $(CPP_OBJ): %.o: Makefile.opts Makefile.dep Makefile
580 $(CPP_OBJ): %.o: $(H_OBJ)
581 $(CPP_OBJ): %.o: .dep/%.dpp
582 $(CPP_OBJ): %.o: %.cpp
583         $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
584
585 $(M_OBJ): %.o: Makefile.opts Makefile.dep Makefile
586 $(M_OBJ): %.o: $(H_OBJ)
587 $(M_OBJ): %.o: .dep/%.dm
588 $(M_OBJ): %.o: %.m
589         $(CC) $(CFLAGS) $(vlc_CFLAGS) -c -o $@ $<
590
591 $(RESOURCE_OBJ): %.o: Makefile.dep Makefile
592 ifneq (,(findstring mingw32,$(SYS)))
593 $(RESOURCE_OBJ): %.o: %.rc
594         $(WINDRES) -i $< -o $@
595 endif
596
597 #
598 # Main application target
599 #
600 vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ)
601         $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS)
602 ifeq ($(SYS),beos)
603         xres -o $@ ./share/vlc_beos.rsrc
604         mimeset -f $@
605 endif
606
607 # here are the rules for a dynamic link of libvlc:
608 #vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.so $(BUILTIN_OBJ)
609 #       $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(builtins_LDFLAGS) -L./lib -lvlc
610
611 #
612 # Main library target
613 #
614 lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ) $(BUILTIN_OBJ)
615         rm -f $@
616         ar rc $@ $(LIBVLC_OBJ)
617 ifneq (,$(BUILTINS))
618         rm -Rf lib/tmp && mkdir -p lib/tmp
619         cd lib/tmp && for i in $(BUILTINS) ; do ar x ../../plugins/$$i.a ; done
620         ar rcs $@ lib/tmp/*
621         rm -Rf lib/tmp
622 endif
623         $(RANLIB) $@
624
625 #lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
626 #       $(CC) -shared $(LIBVLC_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) -o $@
627 #       chmod a-x $@
628
629 #
630 # Plugins target
631 #
632 plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
633 $(PLUGIN_OBJ): $(H_OBJ) FORCE
634         @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
635
636 #
637 # Built-in modules target
638 #
639 builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
640 $(BUILTIN_OBJ): $(H_OBJ) FORCE
641         @cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
642
643 #
644 # Mozilla plugin target
645 #
646 mozilla/libvlcplugin.so: FORCE
647 ifeq ($(MOZILLA),1)
648         @cd mozilla && $(MAKE) builtins_LDFLAGS="$(builtins_LDFLAGS)"
649 endif
650
651 #
652 # gettext target
653 #
654 po: FORCE
655         @cd po && $(MAKE)
656