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