synced with r24310
[mplayer/glamo.git] / TOOLS / Makefile
blobb4cd5f855c3f323c33d75af553788d3255ada7dc
1 include ../config.mak
3 CFLAGS = -I..
5 OBJS = alaw-gen$(EXESUF) \
6 asfinfo$(EXESUF) \
7 avi-fix$(EXESUF) \
8 avisubdump$(EXESUF) \
9 dump_mp4$(EXESUF) \
10 modify_reg$(EXESUF) \
11 movinfo$(EXESUF) \
12 subrip$(EXESUF) \
13 # vivodump$(EXESUF) \
15 COMMON_LIBS = ../mp_msg.o ../mp_fifo.o ../osdep/libosdep.a -ltermcap -lm
17 all: $(OBJS)
19 subrip$(EXESUF): subrip.c
20 $(CC) $(CFLAGS) -o $@ $< ../vobsub.o ../spudec.o \
21 ../unrarlib.o ../libswscale/libswscale.a ../libavutil/libavutil.a \
22 ../libmpcodecs/img_format.o $(COMMON_LIBS)
24 #FIXME: Linking is broken, help welcome.
25 vivodump$(EXESUF): vivodump.c
26 $(CC) $(CFLAGS) -o $@ $< ../libmpdemux/libmpdemux.a \
27 ../stream/stream.a $(COMMON_LIBS)
29 fastmemcpybench: fastmemcpybench.c
30 $(CC) $(CFLAGS) $< -o fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX
31 $(CC) $(CFLAGS) $< -o fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_3DNOW
32 $(CC) $(CFLAGS) $< -o fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
33 $(CC) $(CFLAGS) $< -o fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
34 $(CC) $(CFLAGS) $< -o fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DHAVE_MGA -DHAVE_MMX
35 $(CC) $(CFLAGS) $< -o fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW
36 $(CC) $(CFLAGS) $< -o fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DHAVE_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
37 $(CC) $(CFLAGS) $< -o fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DHAVE_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
39 bmovl-test$(EXESUF): bmovl-test.c
40 $(CC) $(CFLAGS) -o $@ $< -lSDL_image
42 vfw2menc$(EXESUF): vfw2menc.c
43 $(CC) $< -o $@ -lwinmm -lole32
45 REAL_SRCS = $(wildcard realcodecs/*.c)
46 REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
48 realcodecs: $(REAL_TARGETS)
50 subrip fastmemcpybench realcodecs: CFLAGS += -g
52 %.so.6.0: %.o
53 ld -shared -o $@ $< -ldl -lc
55 # FIXME: netstream linking is a mess that should be fixed properly some day.
56 # It does not work with either GUI, LIVE555, libavformat, cdparanoia enabled.
57 NETSTREAM_DEPS = ../libmpdemux/libmpdemux.a \
58 ../stream/stream.a \
59 ../dvdread/libdvdread.a \
60 ../libdvdcss/libdvdcss.a \
61 ../libavutil/libavutil.a \
62 ../m_option.o \
63 ../m_struct.o \
64 $(COMMON_LIBS)
66 ifeq ($(TARGET_WIN32),yes)
67 NETSTREAM_DEPS += -lwsock32
68 endif
70 netstream: netstream.o $(NETSTREAM_DEPS)
71 $(CC) -o $@ $^
73 clean distclean:
74 rm -f *.o *~ $(OBJS)
75 rm -f fastmem-* fastmem2-* fastmemcpybench netstream
76 rm -f bmovl-test$(EXESUF) vfw2menc$(EXESUF)
77 rm -f $(REAL_TARGETS)
79 .PHONY: all fastmemcpybench realcodecs clean distclean