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