changeset 26455:4d9fad055ac9

Merge TOOLS/Makefile into the top-level Makefile.
author diego
date Tue, 22 Apr 2008 08:50:38 +0000
parents 593921728191
children 3f3d90d27549
files Makefile TOOLS/Makefile
diffstat 2 files changed, 70 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Apr 21 20:58:20 2008 +0000
+++ b/Makefile	Tue Apr 22 08:50:38 2008 +0000
@@ -231,6 +231,7 @@
         libass \
         libmenu \
         osdep \
+        TOOLS \
 
 all:	$(ALL_PRG)
 
@@ -388,7 +389,7 @@
 	  fi ; \
 	done
 
-clean::
+clean:: toolsclean
 	-rm -f mplayer$(EXESUF) mencoder$(EXESUF) codec-cfg$(EXESUF) \
 	  codecs2html$(EXESUF) codec-cfg-test$(EXESUF) cpuinfo$(EXESUF) \
 	  codecs.conf.h help_mp.h version.h TAGS tags
@@ -397,7 +398,6 @@
 
 distclean:: doxygen_clean
 	for part in $(PARTS); do $(MAKE) -C $$part distclean; done
-	$(MAKE) -C TOOLS distclean
 	-rm -f configure.log config.mak config.h
 	rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
 
@@ -444,4 +444,71 @@
 	@help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h
 endif
 
-.PHONY: all install* uninstall strip doxygen
+
+TOOLS = TOOLS/alaw-gen$(EXESUF) \
+        TOOLS/asfinfo$(EXESUF) \
+        TOOLS/avi-fix$(EXESUF) \
+        TOOLS/avisubdump$(EXESUF) \
+        TOOLS/compare$(EXESUF) \
+        TOOLS/dump_mp4$(EXESUF) \
+        TOOLS/movinfo$(EXESUF) \
+        TOOLS/subrip$(EXESUF) \
+
+ifdef ARCH_X86
+TOOLS += TOOLS/modify_reg$(EXESUF)
+endif
+
+tools: $(TOOLS)
+
+TOOLS_COMMON_LIBS = mp_msg.o mp_fifo.o osdep/$(TIMER) osdep/$(GETCH) \
+              -ltermcap -lm
+
+TOOLS/bmovl-test$(EXESUF): TOOLS/bmovl-test.c -lSDL_image
+
+TOOLS/subrip$(EXESUF): TOOLS/subrip.c vobsub.o spudec.o unrar_exec.o \
+  libswscale/libswscale.a libavutil/libavutil.a $(TOOLS_COMMON_LIBS)
+
+TOOLS/vfw2menc$(EXESUF): TOOLS/vfw2menc.c -lwinmm -lole32
+
+#FIXME: Linking is broken, help welcome.
+TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c libmpdemux/libmpdemux.a $(TOOLS_COMMON_LIBS)
+
+fastmemcpybench: TOOLS/fastmemcpybench.c
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF)  -DNAME=\"mmx\"      -DHAVE_MMX
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF)   -DNAME=\"k6\ \"     -DHAVE_MMX -DHAVE_3DNOW
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF)   -DNAME=\"k7\ \"     -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF)  -DNAME=\"sse\"      -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\"  -DHAVE_MGA -DHAVE_MMX
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF)  -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF)  -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
+	$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\"  -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
+
+REAL_SRCS    = $(wildcard TOOLS/realcodecs/*.c)
+REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
+
+realcodecs: $(REAL_TARGETS)
+
+fastmemcpybench realcodecs: CFLAGS += -g
+
+%.so.6.0: %.o
+	ld -shared -o $@ $< -ldl -lc
+
+# FIXME: netstream linking is a mess that should be fixed properly some day.
+# It does not work with either GUI, LIVE555, libavformat, cdparanoia enabled.
+NETSTREAM_DEPS = libmpdemux/libmpdemux.a \
+                 stream/stream.a \
+                 dvdread/libdvdread.a \
+                 libdvdcss/libdvdcss.a \
+                 libavutil/libavutil.a \
+                 m_option.o \
+                 m_struct.o \
+                 $(TOOLS_COMMON_LIBS)
+
+TOOLS/netstream$(EXESUF): TOOLS/netstream.o $(NETSTREAM_DEPS)
+	$(CC) $(CFLAGS) -o $@ $^
+
+toolsclean:
+	rm -f $(TOOLS) TOOLS/fastmem*-* TOOLS/netstream$(EXESUF)
+	rm -f TOOLS/bmovl-test$(EXESUF) TOOLS/vfw2menc$(EXESUF) $(REAL_TARGETS)
+
+.PHONY: all install* uninstall strip doxygen tools
--- a/TOOLS/Makefile	Mon Apr 21 20:58:20 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-include ../config.mak
-
-CFLAGS = -I..
-
-OBJS = alaw-gen$(EXESUF) \
-	asfinfo$(EXESUF) \
-	avi-fix$(EXESUF) \
-	avisubdump$(EXESUF) \
-	compare$(EXESUF) \
-	dump_mp4$(EXESUF) \
-	movinfo$(EXESUF) \
-	subrip$(EXESUF) \
-#	vivodump$(EXESUF) \
-
-ifdef ARCH_X86
-OBJS += modify_reg$(EXESUF)
-endif
-
-COMMON_LIBS = ../mp_msg.o ../mp_fifo.o ../osdep/$(TIMER) ../osdep/$(GETCH) \
-              -ltermcap -lm
-
-all: $(OBJS)
-
-bmovl-test$(EXESUF): bmovl-test.c -lSDL_image
-
-subrip$(EXESUF): subrip.c ../vobsub.o ../spudec.o ../unrar_exec.o \
-  ../libswscale/libswscale.a ../libavutil/libavutil.a $(COMMON_LIBS)
-
-vfw2menc$(EXESUF): vfw2menc.c -lwinmm -lole32
-
-#FIXME: Linking is broken, help welcome.
-vivodump$(EXESUF): vivodump.c ../libmpdemux/libmpdemux.a $(COMMON_LIBS)
-
-fastmemcpybench: fastmemcpybench.c
-	$(CC) $(CFLAGS) $< -o fastmem-mmx$(EXESUF)  -DNAME=\"mmx\"      -DHAVE_MMX
-	$(CC) $(CFLAGS) $< -o fastmem-k6$(EXESUF)   -DNAME=\"k6\ \"     -DHAVE_MMX -DHAVE_3DNOW
-	$(CC) $(CFLAGS) $< -o fastmem-k7$(EXESUF)   -DNAME=\"k7\ \"     -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
-	$(CC) $(CFLAGS) $< -o fastmem-sse$(EXESUF)  -DNAME=\"sse\"      -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
-	$(CC) $(CFLAGS) $< -o fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\"  -DHAVE_MGA -DHAVE_MMX
-	$(CC) $(CFLAGS) $< -o fastmem2-k6$(EXESUF)  -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW
-	$(CC) $(CFLAGS) $< -o fastmem2-k7$(EXESUF)  -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
-	$(CC) $(CFLAGS) $< -o fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\"  -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE   -DHAVE_MMX2
-
-REAL_SRCS    = $(wildcard realcodecs/*.c)
-REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
-
-realcodecs: $(REAL_TARGETS)
-
-fastmemcpybench realcodecs: CFLAGS += -g
-
-%.so.6.0: %.o
-	ld -shared -o $@ $< -ldl -lc
-
-# FIXME: netstream linking is a mess that should be fixed properly some day.
-# It does not work with either GUI, LIVE555, libavformat, cdparanoia enabled.
-NETSTREAM_DEPS = ../libmpdemux/libmpdemux.a \
-                 ../stream/stream.a \
-                 ../dvdread/libdvdread.a \
-                 ../libdvdcss/libdvdcss.a \
-                 ../libavutil/libavutil.a \
-                 ../m_option.o \
-                 ../m_struct.o \
-                  $(COMMON_LIBS)
-
-netstream$(EXESUF): netstream.o $(NETSTREAM_DEPS)
-	$(CC) $(CFLAGS) -o $@ $^
-
-clean distclean:
-	rm -f *.o *~ $(OBJS)
-	rm -f fastmem*-* netstream$(EXESUF)
-	rm -f bmovl-test$(EXESUF) vfw2menc$(EXESUF)
-	rm -f $(REAL_TARGETS)
-
-.PHONY: all fastmemcpybench realcodecs clean distclean