summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-02-13 12:53:25 +0000
committerMåns Rullgård <mans@mansr.com>2006-02-13 12:53:25 +0000
commit8b2121e3deeca35121a7c0c4afb5419ca6ce2ccb (patch)
tree0dbac5c10dce56883c71eea5d47c08c0b28fa38c /libavformat
parentf41b1d3541ac8e30a99e6a4bde3fcd84c11ae6f8 (diff)
move common parts of makefiles into common.mak
Originally committed as revision 5015 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/Makefile80
1 files changed, 7 insertions, 73 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 381b04642a..27079df9ca 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -4,17 +4,12 @@
#
include ../config.mak
-VPATH=$(SRC_PATH)/libavformat
-
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
-#FIXME: This should be in configure/config.mak
-ifeq ($(CONFIG_WIN32),yes)
- LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
-endif
-
OBJS= utils.o cutils.o os_support.o allformats.o
-PPOBJS=
+CPPOBJS=
+
+HEADERS = avformat.h avio.h rtp.h rtsp.h rtspcodes.h
# demuxers
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)
OBJS+= audio.o
endif
-EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
+EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) -L../libavcodec
ifeq ($(CONFIG_AUDIO_BEOS),yes)
-PPOBJS+= beosaudio.o
+CPPOBJS+= beosaudio.o
endif
# protocols I/O
@@ -95,72 +90,11 @@ ifeq ($(CONFIG_LIBOGG),yes)
OBJS+= ogg.o
endif
-ifeq ($(TARGET_ARCH_SPARC64),yes)
-CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
-endif
-
NAME=avformat
+SUBDIR=libavformat
ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVFVERSION)
LIBMAJOR=$(LAVFMAJOR)
-AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
-endif
-
-SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
-
-all: $(LIB) $(SLIBNAME)
-
-$(LIB): $(OBJS) $(PPOBJS)
- rm -f $@
- $(AR) rc $@ $(OBJS) $(PPOBJS)
- $(RANLIB) $@
-
-$(SLIBNAME): $(OBJS)
- $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
-ifeq ($(CONFIG_WIN32),yes)
- -lib /machine:i386 /def:$(@:.dll=.def)
-endif
-
-depend: $(SRCS)
- $(CC) -MM $(CFLAGS) $^ 1>.depend
-
-
-install-lib-shared: $(SLIBNAME)
-ifeq ($(CONFIG_WIN32),yes)
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
-else
- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
- $(libdir)/$(SLIBNAME_WITH_VERSION)
- ln -sf $(SLIBNAME_WITH_VERSION) \
- $(libdir)/$(SLIBNAME_WITH_MAJOR)
- ln -sf $(SLIBNAME_WITH_VERSION) \
- $(libdir)/$(SLIBNAME)
endif
-install-lib-static: $(LIB)
- install -m 644 $(LIB) "$(libdir)"
-
-install-headers:
- install -m 644 avformat.h avio.h rtp.h rtsp.h rtspcodes.h "$(incdir)"
- install -m 644 $(SRC_PATH)/libavformat.pc "$(libdir)/pkgconfig"
-
-%.o: %.c
- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
-
-# BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
-%.o: %.cpp
- g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
-
-clean:
- rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
- *.lib *.def *.dll.a *.exp
-
-distclean: clean
- rm -f .depend
-
-#
-# include dependency files if they exist
-#
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include $(SRC_PATH)/common.mak