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