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