Originally committed as revision 5015 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård authored on 2006/02/13 21:53:25... | ... |
@@ -139,23 +139,15 @@ install-vhook: |
139 | 139 |
|
140 | 140 |
install-libs: |
141 | 141 |
install -d $(libdir) |
142 |
-ifeq ($(BUILD_SHARED),yes) |
|
143 |
- $(MAKE) -C libavutil install-lib-shared |
|
144 |
- $(MAKE) -C libavcodec install-lib-shared |
|
145 |
- $(MAKE) -C libavformat install-lib-shared |
|
142 |
+ $(MAKE) -C libavutil install-libs |
|
143 |
+ $(MAKE) -C libavcodec install-libs |
|
144 |
+ $(MAKE) -C libavformat install-libs |
|
146 | 145 |
ifeq ($(CONFIG_PP),yes) |
147 |
- $(MAKE) -C libavcodec/libpostproc install-lib-shared |
|
146 |
+ $(MAKE) -C libavcodec/libpostproc install-libs |
|
148 | 147 |
endif |
148 |
+ifeq ($(BUILD_SHARED),yes) |
|
149 | 149 |
$(LDCONFIG) || true |
150 | 150 |
endif |
151 |
-ifeq ($(BUILD_STATIC),yes) |
|
152 |
- $(MAKE) -C libavutil install-lib-static |
|
153 |
- $(MAKE) -C libavcodec install-lib-static |
|
154 |
- $(MAKE) -C libavformat install-lib-static |
|
155 |
-ifeq ($(CONFIG_PP),yes) |
|
156 |
- $(MAKE) -C libavcodec/libpostproc install-lib-static |
|
157 |
-endif |
|
158 |
-endif |
|
159 | 151 |
|
160 | 152 |
install-headers: |
161 | 153 |
install -d "$(incdir)" |
162 | 154 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,97 @@ |
0 |
+# |
|
1 |
+# common bits used by all libraries |
|
2 |
+# |
|
3 |
+ |
|
4 |
+SRC_DIR = $(SRC_PATH)/$(SUBDIR) |
|
5 |
+VPATH = $(SRC_DIR) |
|
6 |
+ |
|
7 |
+#FIXME: This should be in configure/config.mak |
|
8 |
+ifeq ($(CONFIG_WIN32),yes) |
|
9 |
+LDFLAGS = -Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a) |
|
10 |
+endif |
|
11 |
+ |
|
12 |
+ifeq ($(TARGET_GPROF),yes) |
|
13 |
+CFLAGS+=-p |
|
14 |
+LDFLAGS+=-p |
|
15 |
+endif |
|
16 |
+ |
|
17 |
+ifeq ($(TARGET_ARCH_SPARC64),yes) |
|
18 |
+CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc |
|
19 |
+endif |
|
20 |
+ |
|
21 |
+SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp) |
|
22 |
+OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS) |
|
23 |
+STATIC_OBJS := $(OBJS) $(STATIC_OBJS) |
|
24 |
+SHARED_OBJS := $(OBJS) $(SHARED_OBJS) |
|
25 |
+ |
|
26 |
+all: $(LIB) $(SLIBNAME) |
|
27 |
+ |
|
28 |
+$(LIB): $(STATIC_OBJS) |
|
29 |
+ rm -f $@ |
|
30 |
+ $(AR) rc $@ $^ $(EXTRAOBJS) |
|
31 |
+ $(RANLIB) $@ |
|
32 |
+ |
|
33 |
+$(SLIBNAME): $(SHARED_OBJS) |
|
34 |
+ $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS) |
|
35 |
+ifeq ($(CONFIG_WIN32),yes) |
|
36 |
+ -lib /machine:i386 /def:$(@:.dll=.def) |
|
37 |
+endif |
|
38 |
+ |
|
39 |
+%.o: %.c |
|
40 |
+ $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
|
41 |
+ |
|
42 |
+%.o: %.S |
|
43 |
+ $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
|
44 |
+ |
|
45 |
+# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings |
|
46 |
+%.o: %.cpp |
|
47 |
+ g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< |
|
48 |
+ |
|
49 |
+depend: $(SRCS) |
|
50 |
+ $(CC) -MM $(CFLAGS) $^ 1>.depend |
|
51 |
+ |
|
52 |
+dep: depend |
|
53 |
+ |
|
54 |
+clean:: |
|
55 |
+ rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \ |
|
56 |
+ *.lib *.def *.dll.a *.exp |
|
57 |
+ |
|
58 |
+distclean: clean |
|
59 |
+ rm -f .depend |
|
60 |
+ |
|
61 |
+ifeq ($(BUILD_SHARED),yes) |
|
62 |
+INSTLIBTARGETS += install-lib-shared |
|
63 |
+endif |
|
64 |
+ifeq ($(BUILD_STATIC),yes) |
|
65 |
+INSTLIBTARGETS += install-lib-static |
|
66 |
+endif |
|
67 |
+ |
|
68 |
+install: install-libs install-headers |
|
69 |
+ |
|
70 |
+install-libs: $(INSTLIBTARGETS) |
|
71 |
+ |
|
72 |
+install-lib-shared: $(SLIBNAME) |
|
73 |
+ifeq ($(CONFIG_WIN32),yes) |
|
74 |
+ install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" |
|
75 |
+else |
|
76 |
+ install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ |
|
77 |
+ $(libdir)/$(SLIBNAME_WITH_VERSION) |
|
78 |
+ ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
79 |
+ $(libdir)/$(SLIBNAME_WITH_MAJOR) |
|
80 |
+ ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
81 |
+ $(libdir)/$(SLIBNAME) |
|
82 |
+endif |
|
83 |
+ |
|
84 |
+install-lib-static: $(LIB) |
|
85 |
+ install -m 644 $(LIB) "$(libdir)" |
|
86 |
+ |
|
87 |
+install-headers: |
|
88 |
+ install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(incdir)" |
|
89 |
+ install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(libdir)/pkgconfig" |
|
90 |
+ |
|
91 |
+# |
|
92 |
+# include dependency files if they exist |
|
93 |
+# |
|
94 |
+ifneq ($(wildcard .depend),) |
|
95 |
+include .depend |
|
96 |
+endif |
... | ... |
@@ -4,16 +4,9 @@ |
4 | 4 |
# |
5 | 5 |
include ../config.mak |
6 | 6 |
|
7 |
-VPATH=$(SRC_PATH)/libavcodec |
|
8 |
- |
|
9 | 7 |
# NOTE: -I.. is needed to include config.h |
10 | 8 |
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS) |
11 | 9 |
|
12 |
-#FIXME: This should be in configure/config.mak |
|
13 |
-ifeq ($(CONFIG_WIN32),yes) |
|
14 |
- LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a) |
|
15 |
-endif |
|
16 |
- |
|
17 | 10 |
OBJS= bitstream.o utils.o mem.o allcodecs.o \ |
18 | 11 |
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\ |
19 | 12 |
mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \ |
... | ... |
@@ -25,6 +18,8 @@ OBJS= bitstream.o utils.o mem.o allcodecs.o \ |
25 | 25 |
vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o \ |
26 | 26 |
opt.o |
27 | 27 |
|
28 |
+HEADERS = avcodec.h dsputil.h |
|
29 |
+ |
|
28 | 30 |
ifeq ($(CONFIG_AASC_DECODER),yes) |
29 | 31 |
OBJS+= aasc.o |
30 | 32 |
endif |
... | ... |
@@ -326,11 +321,6 @@ ifeq ($(CONFIG_LIBGSM),yes) |
326 | 326 |
OBJS += libgsm.o |
327 | 327 |
endif |
328 | 328 |
|
329 |
-ifeq ($(TARGET_GPROF),yes) |
|
330 |
-CFLAGS+=-p |
|
331 |
-LDFLAGS+=-p |
|
332 |
-endif |
|
333 |
- |
|
334 | 329 |
# i386 mmx specific stuff |
335 | 330 |
ifeq ($(TARGET_MMX),yes) |
336 | 331 |
OBJS += i386/fdct_mmx.o i386/cputest.o \ |
... | ... |
@@ -400,14 +390,9 @@ OBJS+=sparc/dsputil_vis.o |
400 | 400 |
sparc/%.o: sparc/%.c |
401 | 401 |
$(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) -c -o $@ $< |
402 | 402 |
endif |
403 |
-ifeq ($(TARGET_ARCH_SPARC64),yes) |
|
404 |
-CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc |
|
405 |
-endif |
|
406 |
- |
|
407 |
-SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) |
|
408 |
-OBJS := $(OBJS) $(ASM_OBJS) |
|
409 | 403 |
|
410 | 404 |
NAME=avcodec |
405 |
+SUBDIR=libavcodec |
|
411 | 406 |
LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF) |
412 | 407 |
ifeq ($(BUILD_SHARED),yes) |
413 | 408 |
LIBVERSION=$(LAVCVERSION) |
... | ... |
@@ -415,40 +400,21 @@ LIBMAJOR=$(LAVCMAJOR) |
415 | 415 |
endif |
416 | 416 |
TESTS= imgresample-test dct-test motion-test fft-test |
417 | 417 |
|
418 |
-all: $(LIB) $(SLIBNAME) |
|
418 |
+EXTRAOBJS = $(AMREXTRALIBS) |
|
419 |
+ |
|
420 |
+include $(SRC_PATH)/common.mak |
|
421 |
+ |
|
422 |
+$(LIB): $(AMRLIBS) |
|
419 | 423 |
|
420 | 424 |
amrlibs: |
421 | 425 |
$(MAKE) -C amr spclib fipoplib |
422 | 426 |
|
423 | 427 |
tests: apiexample cpuid_test $(TESTS) |
424 | 428 |
|
425 |
-$(LIB): $(OBJS) $(AMRLIBS) |
|
426 |
- rm -f $@ |
|
427 |
- $(AR) rc $@ $(OBJS) $(AMREXTRALIBS) |
|
428 |
- $(RANLIB) $@ |
|
429 |
- |
|
430 |
-$(SLIBNAME): $(OBJS) |
|
431 |
- $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) |
|
432 |
-ifeq ($(CONFIG_WIN32),yes) |
|
433 |
- -lib /machine:i386 /def:$(@:.dll=.def) |
|
434 |
-endif |
|
435 |
- |
|
436 | 429 |
dsputil.o: dsputil.c dsputil.h |
437 | 430 |
|
438 |
-%.o: %.c |
|
439 |
- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
|
440 |
- |
|
441 |
-%.o: %.S |
|
442 |
- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
|
443 |
- |
|
444 |
-depend: $(SRCS) |
|
445 |
- $(CC) -MM $(CFLAGS) $^ 1>.depend |
|
446 |
- |
|
447 |
-dep: depend |
|
448 |
- |
|
449 |
-clean: $(CLEANAMR) |
|
450 |
- rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \ |
|
451 |
- *.dll.a *.def *.exp \ |
|
431 |
+clean:: $(CLEANAMR) |
|
432 |
+ rm -f \ |
|
452 | 433 |
i386/*.o i386/*~ \ |
453 | 434 |
armv4l/*.o armv4l/*~ \ |
454 | 435 |
mlib/*.o mlib/*~ \ |
... | ... |
@@ -460,9 +426,6 @@ clean: $(CLEANAMR) |
460 | 460 |
liba52/*.o liba52/*~ \ |
461 | 461 |
apiexample $(TESTS) |
462 | 462 |
|
463 |
-distclean: clean |
|
464 |
- rm -f .depend |
|
465 |
- |
|
466 | 463 |
cleanamr: |
467 | 464 |
$(MAKE) -C amr clean |
468 | 465 |
|
... | ... |
@@ -493,30 +456,3 @@ motion-test: motion_test.o $(LIB) |
493 | 493 |
|
494 | 494 |
fft-test: fft-test.o $(LIB) |
495 | 495 |
$(CC) -o $@ $^ $(LIBAVUTIL) -lm |
496 |
- |
|
497 |
- |
|
498 |
-install-lib-shared: $(SLIBNAME) |
|
499 |
-ifeq ($(CONFIG_WIN32),yes) |
|
500 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" |
|
501 |
-else |
|
502 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ |
|
503 |
- $(libdir)/$(SLIBNAME_WITH_VERSION) |
|
504 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
505 |
- $(libdir)/$(SLIBNAME_WITH_MAJOR) |
|
506 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
507 |
- $(libdir)/$(SLIBNAME) |
|
508 |
-endif |
|
509 |
- |
|
510 |
-install-lib-static: $(LIB) |
|
511 |
- install -m 644 $(LIB) "$(libdir)" |
|
512 |
- |
|
513 |
-install-headers: |
|
514 |
- install -m 644 avcodec.h dsputil.h "$(incdir)" |
|
515 |
- install -m 644 $(SRC_PATH)/libavcodec.pc "$(libdir)/pkgconfig" |
|
516 |
- |
|
517 |
-# |
|
518 |
-# include dependency files if they exist |
|
519 |
-# |
|
520 |
-ifneq ($(wildcard .depend),) |
|
521 |
-include .depend |
|
522 |
-endif |
... | ... |
@@ -1,81 +1,28 @@ |
1 | 1 |
|
2 | 2 |
include ../../config.mak |
3 | 3 |
|
4 |
-VPATH=$(SRC_PATH)/libavcodec/libpostproc |
|
5 |
- |
|
6 | 4 |
# Overload incdir, postproc include files go in a different directory. |
7 | 5 |
incdir=$(prefix)/include/postproc |
8 | 6 |
|
9 | 7 |
NAME=postproc |
8 |
+SUBDIR=libavcodec/libpostproc |
|
10 | 9 |
ifeq ($(BUILD_SHARED),yes) |
11 | 10 |
LIBVERSION=$(SPPVERSION) |
12 | 11 |
LIBMAJOR=$(SPPMAJOR) |
13 | 12 |
endif |
14 | 13 |
|
15 |
-OBJS=postprocess.o |
|
16 |
-SOBJS=postprocess_pic.o |
|
17 |
- |
|
18 |
-CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC) |
|
19 |
-# -I/usr/X11R6/include/ |
|
20 |
- |
|
21 |
-.SUFFIXES: .c .o |
|
22 |
- |
|
23 |
-# .PHONY: all clean |
|
14 |
+STATIC_OBJS=postprocess.o |
|
15 |
+SHARED_OBJS=postprocess_pic.o |
|
24 | 16 |
|
25 |
-.c.o: |
|
26 |
- $(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $< |
|
17 |
+HEADERS = postprocess.h |
|
27 | 18 |
|
28 |
-all: $(SWSLIB) $(LIB) $(SLIBNAME) |
|
29 |
- |
|
30 |
-clean: |
|
31 |
- rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll |
|
32 |
- |
|
33 |
-distclean: clean |
|
34 |
- rm -f .depend |
|
35 |
- |
|
36 |
-dep: depend |
|
19 |
+CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. -I$(SRC_PATH)/libavcodec -I../.. $(EXTRA_INC) |
|
20 |
+# -I/usr/X11R6/include/ |
|
37 | 21 |
|
38 |
-depend: |
|
39 |
- $(CC) -MM $(CFLAGS) postprocess.c 1>.depend |
|
22 |
+include $(SRC_PATH)/common.mak |
|
40 | 23 |
|
41 | 24 |
ifeq ($(BUILD_SHARED),yes) |
42 | 25 |
postprocess_pic.o: postprocess.c |
43 | 26 |
$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $< |
44 |
- |
|
45 |
-$(SLIBNAME): $(SOBJS) |
|
46 |
- $(CC) $(SHFLAGS) -o $(SLIBNAME) $(SOBJS) |
|
47 |
-endif |
|
48 |
- |
|
49 |
-$(LIB): $(OBJS) |
|
50 |
- rm -f $@ |
|
51 |
- $(AR) rc $@ $(OBJS) |
|
52 |
- $(RANLIB) $@ |
|
53 |
- |
|
54 |
- |
|
55 |
-install-lib-shared: $(SLIBNAME) |
|
56 |
-ifeq ($(CONFIG_WIN32),yes) |
|
57 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" |
|
58 |
-else |
|
59 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ |
|
60 |
- $(libdir)/$(SLIBNAME_WITH_VERSION) |
|
61 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
62 |
- $(libdir)/$(SLIBNAME_WITH_MAJOR) |
|
63 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
64 |
- $(libdir)/$(SLIBNAME) |
|
65 | 27 |
endif |
66 | 28 |
|
67 |
-install-lib-static: $(LIB) |
|
68 |
- install -m 644 $(LIB) "$(libdir)" |
|
69 |
- |
|
70 |
-install-headers: |
|
71 |
- install -d "$(incdir)" |
|
72 |
- install -m 644 postprocess.h "$(incdir)/postprocess.h" |
|
73 |
- install -m 644 $(SRC_PATH)/libpostproc.pc "$(libdir)/pkgconfig" |
|
74 |
- |
|
75 |
- |
|
76 |
-# |
|
77 |
-# include dependency files if they exist |
|
78 |
-# |
|
79 |
-ifneq ($(wildcard .depend),) |
|
80 |
-include .depend |
|
81 |
-endif |
... | ... |
@@ -4,17 +4,12 @@ |
4 | 4 |
# |
5 | 5 |
include ../config.mak |
6 | 6 |
|
7 |
-VPATH=$(SRC_PATH)/libavformat |
|
8 |
- |
|
9 | 7 |
CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE |
10 | 8 |
|
11 |
-#FIXME: This should be in configure/config.mak |
|
12 |
-ifeq ($(CONFIG_WIN32),yes) |
|
13 |
- LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a) |
|
14 |
-endif |
|
15 |
- |
|
16 | 9 |
OBJS= utils.o cutils.o os_support.o allformats.o |
17 |
-PPOBJS= |
|
10 |
+CPPOBJS= |
|
11 |
+ |
|
12 |
+HEADERS = avformat.h avio.h rtp.h rtsp.h rtspcodes.h |
|
18 | 13 |
|
19 | 14 |
# demuxers |
20 | 15 |
OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \ |
... | ... |
@@ -71,10 +66,10 @@ ifeq ($(CONFIG_AUDIO_OSS),yes) |
71 | 71 |
OBJS+= audio.o |
72 | 72 |
endif |
73 | 73 |
|
74 |
-EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) |
|
74 |
+EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) -L../libavcodec |
|
75 | 75 |
|
76 | 76 |
ifeq ($(CONFIG_AUDIO_BEOS),yes) |
77 |
-PPOBJS+= beosaudio.o |
|
77 |
+CPPOBJS+= beosaudio.o |
|
78 | 78 |
endif |
79 | 79 |
|
80 | 80 |
# protocols I/O |
... | ... |
@@ -95,72 +90,11 @@ ifeq ($(CONFIG_LIBOGG),yes) |
95 | 95 |
OBJS+= ogg.o |
96 | 96 |
endif |
97 | 97 |
|
98 |
-ifeq ($(TARGET_ARCH_SPARC64),yes) |
|
99 |
-CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc |
|
100 |
-endif |
|
101 |
- |
|
102 | 98 |
NAME=avformat |
99 |
+SUBDIR=libavformat |
|
103 | 100 |
ifeq ($(BUILD_SHARED),yes) |
104 | 101 |
LIBVERSION=$(LAVFVERSION) |
105 | 102 |
LIBMAJOR=$(LAVFMAJOR) |
106 |
-AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil |
|
107 |
-endif |
|
108 |
- |
|
109 |
-SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp) |
|
110 |
- |
|
111 |
-all: $(LIB) $(SLIBNAME) |
|
112 |
- |
|
113 |
-$(LIB): $(OBJS) $(PPOBJS) |
|
114 |
- rm -f $@ |
|
115 |
- $(AR) rc $@ $(OBJS) $(PPOBJS) |
|
116 |
- $(RANLIB) $@ |
|
117 |
- |
|
118 |
-$(SLIBNAME): $(OBJS) |
|
119 |
- $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS) |
|
120 |
-ifeq ($(CONFIG_WIN32),yes) |
|
121 |
- -lib /machine:i386 /def:$(@:.dll=.def) |
|
122 |
-endif |
|
123 |
- |
|
124 |
-depend: $(SRCS) |
|
125 |
- $(CC) -MM $(CFLAGS) $^ 1>.depend |
|
126 |
- |
|
127 |
- |
|
128 |
-install-lib-shared: $(SLIBNAME) |
|
129 |
-ifeq ($(CONFIG_WIN32),yes) |
|
130 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" |
|
131 |
-else |
|
132 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ |
|
133 |
- $(libdir)/$(SLIBNAME_WITH_VERSION) |
|
134 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
135 |
- $(libdir)/$(SLIBNAME_WITH_MAJOR) |
|
136 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
137 |
- $(libdir)/$(SLIBNAME) |
|
138 | 103 |
endif |
139 | 104 |
|
140 |
-install-lib-static: $(LIB) |
|
141 |
- install -m 644 $(LIB) "$(libdir)" |
|
142 |
- |
|
143 |
-install-headers: |
|
144 |
- install -m 644 avformat.h avio.h rtp.h rtsp.h rtspcodes.h "$(incdir)" |
|
145 |
- install -m 644 $(SRC_PATH)/libavformat.pc "$(libdir)/pkgconfig" |
|
146 |
- |
|
147 |
-%.o: %.c |
|
148 |
- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
|
149 |
- |
|
150 |
-# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings |
|
151 |
-%.o: %.cpp |
|
152 |
- g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< |
|
153 |
- |
|
154 |
-clean: |
|
155 |
- rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \ |
|
156 |
- *.lib *.def *.dll.a *.exp |
|
157 |
- |
|
158 |
-distclean: clean |
|
159 |
- rm -f .depend |
|
160 |
- |
|
161 |
-# |
|
162 |
-# include dependency files if they exist |
|
163 |
-# |
|
164 |
-ifneq ($(wildcard .depend),) |
|
165 |
-include .depend |
|
166 |
-endif |
|
105 |
+include $(SRC_PATH)/common.mak |
... | ... |
@@ -3,8 +3,6 @@ |
3 | 3 |
# |
4 | 4 |
include ../config.mak |
5 | 5 |
|
6 |
-VPATH=$(SRC_PATH)/libavutil |
|
7 |
- |
|
8 | 6 |
# NOTE: -I.. is needed to include config.h |
9 | 7 |
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE |
10 | 8 |
|
... | ... |
@@ -18,71 +16,18 @@ OBJS= mathematics.o \ |
18 | 18 |
rational.o \ |
19 | 19 |
intfloat_readwrite.o \ |
20 | 20 |
|
21 |
+HEADERS = avutil.h common.h mathematics.h integer.h rational.h \ |
|
22 |
+ intfloat_readwrite.h |
|
21 | 23 |
|
22 | 24 |
ifeq ($(TARGET_ARCH_SPARC64),yes) |
23 | 25 |
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc |
24 | 26 |
endif |
25 | 27 |
|
26 |
-SRCS := $(OBJS:.o=.c) |
|
27 |
- |
|
28 | 28 |
NAME=avutil |
29 |
+SUBDIR = libavutil |
|
29 | 30 |
ifeq ($(BUILD_SHARED),yes) |
30 | 31 |
LIBVERSION=$(LAVUVERSION) |
31 | 32 |
LIBMAJOR=$(LAVUMAJOR) |
32 | 33 |
endif |
33 | 34 |
|
34 |
-all: $(LIB) $(SLIBNAME) |
|
35 |
- |
|
36 |
-$(LIB): $(OBJS) |
|
37 |
- rm -f $@ |
|
38 |
- $(AR) rc $@ $(OBJS) |
|
39 |
- $(RANLIB) $@ |
|
40 |
- |
|
41 |
-$(SLIBNAME): $(OBJS) |
|
42 |
- $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) |
|
43 |
-ifeq ($(CONFIG_WIN32),yes) |
|
44 |
- -lib /machine:i386 /def:$(@:.dll=.def) |
|
45 |
-endif |
|
46 |
- |
|
47 |
-%.o: %.c |
|
48 |
- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
|
49 |
- |
|
50 |
-depend: $(SRCS) |
|
51 |
- $(CC) -MM $(CFLAGS) $^ 1>.depend |
|
52 |
- |
|
53 |
-dep: depend |
|
54 |
- |
|
55 |
-clean: |
|
56 |
- rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \ |
|
57 |
- *.lib *.def *.dll.a *.exp |
|
58 |
- |
|
59 |
-distclean: clean |
|
60 |
- rm -f .depend |
|
61 |
- |
|
62 |
- |
|
63 |
-install-lib-shared: $(SLIBNAME) |
|
64 |
-ifeq ($(CONFIG_WIN32),yes) |
|
65 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" |
|
66 |
-else |
|
67 |
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ |
|
68 |
- $(libdir)/$(SLIBNAME_WITH_VERSION) |
|
69 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
70 |
- $(libdir)/$(SLIBNAME_WITH_MAJOR) |
|
71 |
- ln -sf $(SLIBNAME_WITH_VERSION) \ |
|
72 |
- $(libdir)/$(SLIBNAME) |
|
73 |
-endif |
|
74 |
- |
|
75 |
-install-lib-static: $(LIB) |
|
76 |
- install -m 644 $(LIB) "$(libdir)" |
|
77 |
- |
|
78 |
-install-headers: |
|
79 |
- install -m 644 avutil.h common.h mathematics.h integer.h \ |
|
80 |
- rational.h intfloat_readwrite.h "$(incdir)" |
|
81 |
- install -m 644 $(SRC_PATH)/libavutil.pc "$(libdir)/pkgconfig" |
|
82 |
- |
|
83 |
-# |
|
84 |
-# include dependency files if they exist |
|
85 |
-# |
|
86 |
-ifneq ($(wildcard .depend),) |
|
87 |
-include .depend |
|
88 |
-endif |
|
35 |
+include $(SRC_PATH)/common.mak |