Mercurial > libavcodec.hg
annotate Makefile @ 252:ddb1a0e94cf4 libavcodec
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
sure it works ok. Also it's slow, so use it only when you _really_ need to
measure quality.
- Fix libavcodec Makefile to enable profiling.
| author | pulento |
|---|---|
| date | Tue, 26 Feb 2002 22:14:27 +0000 |
| parents | 73df666cacc7 |
| children | 9c975237ec64 |
| rev | line source |
|---|---|
| 2 | 1 include ../config.mak |
| 2 | |
| 9 | 3 CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H |
| 0 | 4 LDFLAGS= -g |
| 5 | |
| 6 OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \ | |
| 23 | 7 mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \ |
| 0 | 8 motion_est.o imgconvert.o imgresample.o msmpeg4.o \ |
|
174
ac5075a55488
new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
138
diff
changeset
|
9 mpeg12.o h263dec.o rv10.o mpegaudiodec.o pcm.o simple_idct.o |
| 2 | 10 ASM_OBJS= |
| 0 | 11 |
| 12 # currently using libac3 for ac3 decoding | |
|
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
13 ifeq ($(CONFIG_AC3),yes) |
| 0 | 14 OBJS+= ac3dec.o \ |
| 15 libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \ | |
| 16 libac3/imdct.o libac3/parse.o | |
|
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
17 endif |
| 0 | 18 |
|
252
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
19 ifeq ($(TARGET_GPROF),yes) |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
20 CFLAGS+=-p |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
21 LDFLAGS+=-p |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
22 endif |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
23 |
| 0 | 24 # i386 mmx specific stuff |
| 2 | 25 ifeq ($(TARGET_MMX),yes) |
| 74 | 26 OBJS += i386/fdct_mmx.o i386/cputest.o \ |
| 32 | 27 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \ |
|
174
ac5075a55488
new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
138
diff
changeset
|
28 i386/idct_mmx.o i386/motion_est_mmx.o \ |
|
ac5075a55488
new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
138
diff
changeset
|
29 i386/simple_idct_mmx.o |
| 0 | 30 endif |
| 31 | |
| 62 | 32 # armv4l specific stuff |
| 33 ifeq ($(TARGET_ARCH_ARMV4L),yes) | |
| 34 ASM_OBJS += armv4l/jrevdct_arm.o | |
| 35 OBJS += armv4l/dsputil_arm.o | |
| 36 endif | |
| 37 | |
| 88 | 38 # sun mediaLib specific stuff |
| 39 # currently only works when libavcodec is used in mplayer | |
| 40 ifeq ($(HAVE_MLIB),yes) | |
| 41 OBJS += mlib/dsputil_mlib.o | |
| 42 CFLAGS += $(MLIB_INC) | |
| 43 endif | |
| 44 | |
|
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
45 # alpha specific stuff |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
46 ifeq ($(TARGET_ARCH_ALPHA),yes) |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
47 OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
48 CFLAGS += -Wa,-mpca56 |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
49 endif |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
50 |
| 2 | 51 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) |
| 52 | |
| 0 | 53 LIB= libavcodec.a |
| 136 | 54 ifeq ($(BUILD_SHARED),yes) |
| 55 SLIB= libffmpeg-$(VERSION).so | |
| 56 endif | |
| 74 | 57 TESTS= imgresample-test dct-test motion-test |
| 0 | 58 |
| 136 | 59 all: $(LIB) $(SLIB) |
| 43 | 60 tests: apiexample cpuid_test $(TESTS) |
| 0 | 61 |
| 2 | 62 $(LIB): $(OBJS) $(ASM_OBJS) |
| 0 | 63 rm -f $@ |
| 2 | 64 $(AR) rcs $@ $(OBJS) $(ASM_OBJS) |
| 0 | 65 |
| 136 | 66 $(SLIB): $(OBJS) $(ASM_OBJS) |
| 67 rm -f $@ | |
| 68 $(CC) -shared -o $@ $(OBJS) $(ASM_OBJS) | |
| 69 ln -sf $@ libffmpeg.so | |
| 0 | 70 dsputil.o: dsputil.c dsputil.h |
| 71 | |
| 72 %.o: %.c | |
| 73 $(CC) $(CFLAGS) -c -o $@ $< | |
| 74 | |
| 62 | 75 %.o: %.S |
| 76 $(CC) $(CFLAGS) -c -o $@ $< | |
| 77 | |
| 2 | 78 # depend only used by mplayer now |
| 79 dep: depend | |
| 80 | |
| 81 depend: | |
| 82 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend | |
| 83 | |
| 0 | 84 clean: |
| 136 | 85 rm -f *.o *~ $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ |
| 62 | 86 armv4l/*.o armv4l/*~ \ |
| 88 | 87 mlib/*.o mlib/*~ \ |
|
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
88 alpha/*.o alpha/*~ \ |
| 0 | 89 libac3/*.o libac3/*~ \ |
| 90 apiexample $(TESTS) | |
| 91 | |
| 2 | 92 distclean: clean |
| 93 rm -f Makefile.bak .depend | |
| 94 | |
| 0 | 95 # api example program |
| 96 apiexample: apiexample.c $(LIB) | |
| 97 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm | |
| 98 | |
| 43 | 99 # cpuid test |
| 100 cpuid_test: i386/cputest.c | |
| 101 $(CC) $(CFLAGS) -D__TEST__ -o $@ $< | |
| 102 | |
| 0 | 103 # testing progs |
| 104 | |
| 105 imgresample-test: imgresample.c | |
| 106 $(CC) $(CFLAGS) -DTEST -o $@ $^ | |
| 107 | |
| 74 | 108 dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \ |
| 32 | 109 fdctref.o jrevdct.o i386/idct_mmx.o |
| 0 | 110 $(CC) -o $@ $^ |
|
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
111 |
| 74 | 112 motion-test: motion_test.o $(LIB) |
| 113 $(CC) -o $@ $^ | |
| 114 | |
| 136 | 115 install: all |
| 137 | 116 # install -m 644 $(LIB) $(prefix)/lib |
| 136 | 117 ifeq ($(BUILD_SHARED),yes) |
| 118 install -s -m 755 $(SLIB) $(prefix)/lib | |
| 119 ln -sf $(prefix)/lib/$(SLIB) $(prefix)/lib/libffmpeg.so | |
| 120 ldconfig | |
| 137 | 121 mkdir -p $(prefix)/include/libffmpeg |
| 122 install -m 644 avcodec.h $(prefix)/include/libffmpeg/avcodec.h | |
| 138 | 123 install -m 644 common.h $(prefix)/include/libffmpeg/common.h |
| 136 | 124 endif |
|
3
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
125 # |
|
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
126 # include dependency files if they exist |
|
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
127 # |
|
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
128 ifneq ($(wildcard .depend),) |
|
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
129 include .depend |
|
1bdbd869c1f0
added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)
glantau
parents:
2
diff
changeset
|
130 endif |
