Mercurial > mplayer.hg
comparison Makefile @ 18012:2b4e71051200
first stage of build system cleanup:
- remove .developer nonsense
- correct version.h dependencies
- remove some old shared dvdkit cruft that was not used
who's going to buy me the cola if this breaks?? :)
author | rfelker |
---|---|
date | Sun, 02 Apr 2006 03:14:54 +0000 |
parents | f21e0fe4e965 |
children | 4cfe6a25ccfc |
comparison
equal
deleted
inserted
replaced
18011:11c9dfbe120c | 18012:2b4e71051200 |
---|---|
252 endif | 252 endif |
253 ifeq ($(FAME),yes) | 253 ifeq ($(FAME),yes) |
254 COMMON_DEPS += libfame/libfame.a | 254 COMMON_DEPS += libfame/libfame.a |
255 endif | 255 endif |
256 ifeq ($(DVDKIT2),yes) | 256 ifeq ($(DVDKIT2),yes) |
257 ifeq ($(DVDKIT_SHARED),yes) | |
258 COMMON_DEPS += libmpdvdkit2/libmpdvdkit.so | |
259 else | |
260 COMMON_DEPS += libmpdvdkit2/libmpdvdkit.a | 257 COMMON_DEPS += libmpdvdkit2/libmpdvdkit.a |
261 endif | |
262 endif | 258 endif |
263 | 259 |
264 ifeq ($(GUI),yes) | 260 ifeq ($(GUI),yes) |
265 COMMON_DEPS += Gui/libgui.a | 261 COMMON_DEPS += Gui/libgui.a |
266 GUI_LIBS = Gui/libgui.a | 262 GUI_LIBS = Gui/libgui.a |
268 | 264 |
269 .SUFFIXES: .cc .c .o | 265 .SUFFIXES: .cc .c .o |
270 | 266 |
271 #.PHONY: $(COMMON_DEPS) | 267 #.PHONY: $(COMMON_DEPS) |
272 | 268 |
273 all: version.h $(ALL_PRG) | 269 all: $(ALL_PRG) |
274 | 270 |
275 .c.o: | 271 .c.o: |
276 $(CC) -c $(CFLAGS) -o $@ $< | 272 $(CC) -c $(CFLAGS) -o $@ $< |
277 | 273 |
278 libaf/libaf.a: | 274 libaf/libaf.a: |
279 $(MAKE) -C libaf | 275 $(MAKE) -C libaf |
280 | 276 |
281 libmpdvdkit2/libmpdvdkit.a: | 277 libmpdvdkit2/libmpdvdkit.a: |
282 $(MAKE) -C libmpdvdkit2 | 278 $(MAKE) -C libmpdvdkit2 |
283 | |
284 libmpdvdkit2/libmpdvdkit.so: | |
285 $(MAKE) -C libmpdvdkit2 libmpdvdkit.so | |
286 | 279 |
287 loader/libloader.a: | 280 loader/libloader.a: |
288 $(MAKE) -C loader | 281 $(MAKE) -C loader |
289 | 282 |
290 libfame/libfame.a: | 283 libfame/libfame.a: |
444 | 437 |
445 codec-cfg.o: codecs.conf.h | 438 codec-cfg.o: codecs.conf.h |
446 | 439 |
447 codecs2html: mp_msg.o | 440 codecs2html: mp_msg.o |
448 $(CC) -DCODECS2HTML codec-cfg.c mp_msg.o -o $@ | 441 $(CC) -DCODECS2HTML codec-cfg.c mp_msg.o -o $@ |
449 | |
450 # Every mplayer dependency depends on version.h, to force building version.h | |
451 # first (in serial mode) before any other of the dependencies for a parallel make | |
452 # run. This is necessary, because the make rule for version.h removes objects | |
453 # in a recursive "make distclean" and we must wait for this "make distclean" to | |
454 # finish before we can start building new object files. | |
455 # help_mp.h is also required by a lot of files, so force generating it early. | |
456 $(MPLAYER_DEP): version.h help_mp.h | |
457 $(MENCODER_DEP): version.h help_mp.h | |
458 | 442 |
459 $(PRG_CFG): version.h codec-cfg.c codec-cfg.h help_mp.h | 443 $(PRG_CFG): version.h codec-cfg.c codec-cfg.h help_mp.h |
460 $(HOST_CC) $(HOST_CFLAGS) -I. codec-cfg.c -o $(PRG_CFG) \ | 444 $(HOST_CC) $(HOST_CFLAGS) -I. codec-cfg.c -o $(PRG_CFG) \ |
461 -DCODECS2HTML $(EXTRA_LIB) $(EXTRA_INC) | 445 -DCODECS2HTML $(EXTRA_LIB) $(EXTRA_INC) |
462 | 446 |
504 @$(INSTALL) -d $(prefix)/share/applications | 488 @$(INSTALL) -d $(prefix)/share/applications |
505 $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/mplayer.desktop | 489 $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/mplayer.desktop |
506 endif | 490 endif |
507 @$(INSTALL) -d $(CONFDIR) | 491 @$(INSTALL) -d $(CONFDIR) |
508 @if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi | 492 @if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi |
509 ifeq ($(DVDKIT_SHARED),yes) | |
510 ifeq ($(DVDKIT2),yes) | |
511 $(INSTALL) -d $(LIBDIR) | |
512 $(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit2/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so | |
513 else | |
514 ifeq ($(DVDKIT),yes) | |
515 $(INSTALL) -d $(LIBDIR) | |
516 $(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so | |
517 endif | |
518 endif | |
519 endif | |
520 | 493 |
521 uninstall: | 494 uninstall: |
522 -rm -f $(BINDIR)/$(PRG) $(BINDIR)/gmplayer $(MANDIR)/man1/mplayer.1 | 495 -rm -f $(BINDIR)/$(PRG) $(BINDIR)/gmplayer $(MANDIR)/man1/mplayer.1 |
523 -rm -f $(BINDIR)/$(PRG_MENCODER) $(MANDIR)/man1/mencoder.1 | 496 -rm -f $(BINDIR)/$(PRG_MENCODER) $(MANDIR)/man1/mencoder.1 |
524 -rm -f $(prefix)/share/pixmaps/mplayer-desktop.xpm | 497 -rm -f $(prefix)/share/pixmaps/mplayer-desktop.xpm |
558 # ./configure must be run if it changed in CVS | 531 # ./configure must be run if it changed in CVS |
559 config.h: configure | 532 config.h: configure |
560 @echo "############################################################" | 533 @echo "############################################################" |
561 @echo "####### Please run ./configure again - it's changed! #######" | 534 @echo "####### Please run ./configure again - it's changed! #######" |
562 @echo "############################################################" | 535 @echo "############################################################" |
563 ifeq ($(wildcard .developer),) | |
564 @exit 1 | |
565 endif | |
566 | 536 |
567 # do not rebuild after cvs commits if .developer file is present! | 537 # do not rebuild after cvs commits if .developer file is present! |
568 | 538 |
569 # rebuild at every config.h/config.mak change: | 539 # rebuild at every config.h/config.mak change: |
570 version.h: | 540 version.h: |
571 ./version.sh `$(CC) -dumpversion` | 541 ./version.sh `$(CC) -dumpversion` |
572 ifeq ($(wildcard .developer),) | |
573 $(MAKE) distclean | |
574 endif | |
575 $(MAKE) depend | |
576 | 542 |
577 doxygen: | 543 doxygen: |
578 doxygen DOCS/tech/Doxyfile | 544 doxygen DOCS/tech/Doxyfile |
579 | 545 |
580 doxygen_clean: | 546 doxygen_clean: |
594 @echo '// untranslated messages from the English master file:' >> help_mp.h | 560 @echo '// untranslated messages from the English master file:' >> help_mp.h |
595 @help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h | 561 @help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h |
596 endif | 562 endif |
597 | 563 |
598 # rebuild at every CVS update or config/makefile change: | 564 # rebuild at every CVS update or config/makefile change: |
599 ifeq ($(wildcard .developer),) | 565 #ifneq ($(wildcard CVS/Entries),) |
600 ifneq ($(wildcard CVS/Entries),) | 566 #version.h: CVS/Entries |
601 version.h: CVS/Entries | 567 #endif |
602 endif | |
603 version.h: config.h config.mak Makefile | 568 version.h: config.h config.mak Makefile |
604 endif | |
605 | 569 |
606 # | 570 # |
607 # include dependencies to get make to recurse into lib dirs, | 571 # include dependencies to get make to recurse into lib dirs, |
608 # if the user desires such behavior | 572 # if the user desires such behavior |
609 # | 573 # |