Commit fb3d46da authored by Diego Biurrun's avatar Diego Biurrun

Move Darwin shared library build peculiarities to configure.

Originally committed as revision 4838 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 14f0c8e2
...@@ -336,7 +336,7 @@ v4l="no" ...@@ -336,7 +336,7 @@ v4l="no"
audio_oss="no" audio_oss="no"
dv1394="no" dv1394="no"
ffserver="no" ffserver="no"
SHFLAGS="-dynamiclib -Wl,-single_module" SHFLAGS="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(libdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION)"
extralibs="" extralibs=""
darwin="yes" darwin="yes"
strip="strip -x" strip="strip -x"
......
...@@ -392,11 +392,6 @@ ifeq ($(TARGET_ARCH_SPARC64),yes) ...@@ -392,11 +392,6 @@ ifeq ($(TARGET_ARCH_SPARC64),yes)
CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
endif endif
# Darwin specific stuff
ifeq ($(CONFIG_DARWIN),yes)
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBPREF)avcodec$(SLIBSUF),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
endif
SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S)
OBJS := $(OBJS) $(ASM_OBJS) OBJS := $(OBJS) $(ASM_OBJS)
......
#FIXME: This Makefile differs from all the others for no good reason...
include ../../config.mak include ../../config.mak
...@@ -8,11 +9,7 @@ SPPLIBNAME = $(SLIBPREF)postproc$(SLIBSUF) ...@@ -8,11 +9,7 @@ SPPLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
SPPLIBMAJOR = $(SPPLIBNAME).$(SPPMAJOR) SPPLIBMAJOR = $(SPPLIBNAME).$(SPPMAJOR)
SPPLIB = $(SPPLIBNAME).$(SPPVERSION) SPPLIB = $(SPPLIBNAME).$(SPPVERSION)
LIBVERSION = $(SPPLIB) LIBVERSION = $(SPPLIB)
ifeq ($(CONFIG_DARWIN),yes) SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
SPPLIBMAJOR = $(SLIBPREF)postproc.$(SPPMAJOR)$(SLIBSUF)
SPPLIB = $(SLIBPREF)postproc.$(SPPVERSION)$(SLIBSUF)
SHFLAGS += -Wl,-install_name,$(libdir)/$(SPPLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
endif
endif endif
PPLIB = $(LIBPREF)postproc$(LIBSUF) PPLIB = $(LIBPREF)postproc$(LIBSUF)
......
...@@ -83,9 +83,6 @@ ifeq ($(BUILD_SHARED),yes) ...@@ -83,9 +83,6 @@ ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVFMAJOR) LIBVERSION=$(LAVFMAJOR)
SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF) SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
ifeq ($(CONFIG_DARWIN),yes)
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
endif
endif endif
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp) SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
......
...@@ -24,9 +24,6 @@ LIB= $(LIBPREF)avutil$(LIBSUF) ...@@ -24,9 +24,6 @@ LIB= $(LIBPREF)avutil$(LIBSUF)
ifeq ($(BUILD_SHARED),yes) ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVUMAJOR) LIBVERSION=$(LAVUMAJOR)
SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF) SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
ifeq ($(CONFIG_DARWIN),yes)
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
endif
endif endif
all: $(LIB) $(SLIBNAME) all: $(LIB) $(SLIBNAME)
......
...@@ -4,8 +4,9 @@ VPATH=$(SRC_PATH)/vhook ...@@ -4,8 +4,9 @@ VPATH=$(SRC_PATH)/vhook
CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
#FIXME: This needs to be in configure/config.mak
ifeq ($(CONFIG_DARWIN),yes) ifeq ($(CONFIG_DARWIN),yes)
SHFLAGS += -flat_namespace -undefined suppress SHFLAGS = -dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(libdir)/vhook/$@
endif endif
HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF) HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
...@@ -36,11 +37,7 @@ drawtext$(SLIBSUF): drawtext.o ...@@ -36,11 +37,7 @@ drawtext$(SLIBSUF): drawtext.o
$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs` $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
%$(SLIBSUF): %.o %$(SLIBSUF): %.o
ifeq ($(CONFIG_DARWIN),yes)
$(CC) $(LDFLAGS) $(SHFLAGS) -Wl,-install_name,$(libdir)/vhook/$@ -g -o $@ $<
else
$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
endif
clean: clean:
rm -f *.o *.d .depend *$(SLIBSUF) *~ rm -f *.o *.d .depend *$(SLIBSUF) *~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment