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