Mercurial > libavcodec.hg
annotate Makefile @ 356:e8ecb4413557 libavcodec
ar -s has portability problems, anyway rc is enough without s -- suggested by Atmosfear
| author | arpi_esp |
|---|---|
| date | Fri, 03 May 2002 18:46:55 +0000 |
| parents | ae9e9af0b627 |
| children | 80518daaab05 |
| rev | line source |
|---|---|
| 2 | 1 include ../config.mak |
| 2 | |
| 340 | 3 CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H -I. -I.. |
| 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 \ |
| 329 | 9 mpeg12.o h263dec.o rv10.o mpegaudiodec.o pcm.o simple_idct.o \ |
| 10 ratecontrol.o | |
| 2 | 11 ASM_OBJS= |
| 0 | 12 |
| 338 | 13 # currently using liba52 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
|
14 ifeq ($(CONFIG_AC3),yes) |
| 338 | 15 OBJS+= a52dec.o |
| 16 endif | |
| 17 | |
| 18 # using builtin liba52 or runtime linked liba52.so.0 | |
| 19 ifeq ($(CONFIG_A52BIN),no) | |
| 20 OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \ | |
| 21 liba52/imdct.o liba52/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
|
22 endif |
| 0 | 23 |
|
258
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
24 ifeq ($(CONFIG_MP3LAME),yes) |
|
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
25 OBJS += mp3lameaudio.o |
| 348 | 26 EXTRALIBS += -lmp3lame |
|
258
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
27 endif |
|
9c975237ec64
- Added MP3 encoding through libmp3lame contributed by Lennert Buytenhek.
pulento
parents:
252
diff
changeset
|
28 |
|
252
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
29 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
|
30 CFLAGS+=-p |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
31 LDFLAGS+=-p |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
32 endif |
|
ddb1a0e94cf4
- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm
pulento
parents:
214
diff
changeset
|
33 |
| 0 | 34 # i386 mmx specific stuff |
| 2 | 35 ifeq ($(TARGET_MMX),yes) |
| 74 | 36 OBJS += i386/fdct_mmx.o i386/cputest.o \ |
| 32 | 37 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \ |
| 338 | 38 i386/idct_mmx.o i386/motion_est_mmx.o \ |
|
174
ac5075a55488
new IDCT code by Michael Niedermayer (michaelni@gmx.at) - #define SIMPLE_IDCT to enable
arpi_esp
parents:
138
diff
changeset
|
39 i386/simple_idct_mmx.o |
| 0 | 40 endif |
| 41 | |
| 62 | 42 # armv4l specific stuff |
| 43 ifeq ($(TARGET_ARCH_ARMV4L),yes) | |
| 44 ASM_OBJS += armv4l/jrevdct_arm.o | |
| 45 OBJS += armv4l/dsputil_arm.o | |
| 46 endif | |
| 47 | |
| 88 | 48 # sun mediaLib specific stuff |
| 49 # currently only works when libavcodec is used in mplayer | |
| 50 ifeq ($(HAVE_MLIB),yes) | |
| 51 OBJS += mlib/dsputil_mlib.o | |
| 52 CFLAGS += $(MLIB_INC) | |
| 53 endif | |
| 54 | |
|
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
55 # alpha specific stuff |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
56 ifeq ($(TARGET_ARCH_ALPHA),yes) |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
57 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
|
58 CFLAGS += -Wa,-mpca56 |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
59 endif |
|
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
60 |
| 2 | 61 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) |
| 62 | |
| 0 | 63 LIB= libavcodec.a |
| 136 | 64 ifeq ($(BUILD_SHARED),yes) |
| 65 SLIB= libffmpeg-$(VERSION).so | |
| 66 endif | |
| 74 | 67 TESTS= imgresample-test dct-test motion-test |
| 0 | 68 |
| 136 | 69 all: $(LIB) $(SLIB) |
| 43 | 70 tests: apiexample cpuid_test $(TESTS) |
| 0 | 71 |
| 2 | 72 $(LIB): $(OBJS) $(ASM_OBJS) |
| 0 | 73 rm -f $@ |
|
356
e8ecb4413557
ar -s has portability problems, anyway rc is enough without s -- suggested by Atmosfear
arpi_esp
parents:
348
diff
changeset
|
74 $(AR) rc $@ $(OBJS) $(ASM_OBJS) |
| 0 | 75 |
| 136 | 76 $(SLIB): $(OBJS) $(ASM_OBJS) |
| 77 rm -f $@ | |
| 348 | 78 $(CC) -shared -o $@ $(OBJS) $(ASM_OBJS) $(EXTRALIBS) |
| 136 | 79 ln -sf $@ libffmpeg.so |
| 0 | 80 dsputil.o: dsputil.c dsputil.h |
| 81 | |
| 82 %.o: %.c | |
| 83 $(CC) $(CFLAGS) -c -o $@ $< | |
| 84 | |
| 62 | 85 %.o: %.S |
| 86 $(CC) $(CFLAGS) -c -o $@ $< | |
| 87 | |
| 2 | 88 # depend only used by mplayer now |
| 89 dep: depend | |
| 90 | |
| 91 depend: | |
| 92 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend | |
| 93 | |
| 0 | 94 clean: |
| 343 | 95 rm -f *.o *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ |
| 62 | 96 armv4l/*.o armv4l/*~ \ |
| 88 | 97 mlib/*.o mlib/*~ \ |
|
214
73df666cacc7
Alpha optimizations by Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
nickols_k
parents:
174
diff
changeset
|
98 alpha/*.o alpha/*~ \ |
| 338 | 99 liba52/*.o liba52/*~ \ |
| 100 apiexample $(TESTS) | |
| 0 | 101 |
| 2 | 102 distclean: clean |
| 103 rm -f Makefile.bak .depend | |
| 104 | |
| 0 | 105 # api example program |
| 106 apiexample: apiexample.c $(LIB) | |
| 107 $(CC) $(CFLAGS) -o $@ $< $(LIB) -lm | |
| 108 | |
| 43 | 109 # cpuid test |
| 110 cpuid_test: i386/cputest.c | |
| 111 $(CC) $(CFLAGS) -D__TEST__ -o $@ $< | |
| 112 | |
| 0 | 113 # testing progs |
| 114 | |
| 115 imgresample-test: imgresample.c | |
| 116 $(CC) $(CFLAGS) -DTEST -o $@ $^ | |
| 117 | |
| 74 | 118 dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o \ |
| 32 | 119 fdctref.o jrevdct.o i386/idct_mmx.o |
| 0 | 120 $(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
|
121 |
| 74 | 122 motion-test: motion_test.o $(LIB) |
| 123 $(CC) -o $@ $^ | |
| 124 | |
| 136 | 125 install: all |
| 137 | 126 # install -m 644 $(LIB) $(prefix)/lib |
| 136 | 127 ifeq ($(BUILD_SHARED),yes) |
| 128 install -s -m 755 $(SLIB) $(prefix)/lib | |
| 129 ln -sf $(prefix)/lib/$(SLIB) $(prefix)/lib/libffmpeg.so | |
| 130 ldconfig | |
| 137 | 131 mkdir -p $(prefix)/include/libffmpeg |
| 132 install -m 644 avcodec.h $(prefix)/include/libffmpeg/avcodec.h | |
| 138 | 133 install -m 644 common.h $(prefix)/include/libffmpeg/common.h |
| 136 | 134 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
|
135 # |
|
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
|
136 # 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
|
137 # |
|
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
|
138 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
|
139 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
|
140 endif |
