summaryrefslogtreecommitdiffstats
path: root/common.mak
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-11 22:44:05 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-07-11 22:44:05 +0000
commit9d466c43262d0b92b8e37dd1a70013461dd8d5bc (patch)
treee9bb271107835ff34e721ad1e0c36d1f933f54d1 /common.mak
parent6cc2563b5cda4dabc70eefde82d24b01f71518c5 (diff)
downloadmpv-9d466c43262d0b92b8e37dd1a70013461dd8d5bc.tar.bz2
mpv-9d466c43262d0b92b8e37dd1a70013461dd8d5bc.tar.xz
sync with FFmpeg r5718
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19021 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'common.mak')
-rw-r--r--common.mak41
1 files changed, 23 insertions, 18 deletions
diff --git a/common.mak b/common.mak
index 24ccaedb82..ea743518f8 100644
--- a/common.mak
+++ b/common.mak
@@ -2,23 +2,9 @@
# common bits used by all libraries
#
-SRC_DIR = $(SRC_PATH)/$(SUBDIR)
+SRC_DIR = $(SRC_PATH)/lib$(NAME)
VPATH = $(SRC_DIR)
-#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
-
-ifeq ($(TARGET_GPROF),yes)
-CFLAGS+=-p
-LDFLAGS+=-p
-endif
-
-ifeq ($(TARGET_ARCH_SPARC64),yes)
-CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
-endif
-
SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp)
OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS)
STATIC_OBJS := $(OBJS) $(STATIC_OBJS)
@@ -31,9 +17,12 @@ $(LIB): $(STATIC_OBJS)
$(AR) rc $@ $^ $(EXTRAOBJS)
$(RANLIB) $@
-$(SLIBNAME): $(SHARED_OBJS)
+$(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
+ ln -sf $^ $@
+
+$(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
-ifeq ($(CONFIG_WIN32),yes)
+ifeq ($(CONFIG_MINGW),yes)
-lib /machine:i386 /def:$(@:.dll=.def)
endif
@@ -72,7 +61,7 @@ install-libs: $(INSTLIBTARGETS)
install-lib-shared: $(SLIBNAME)
install -d "$(libdir)"
-ifeq ($(CONFIG_WIN32),yes)
+ifeq ($(CONFIG_MINGW),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
else
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
@@ -93,6 +82,22 @@ install-headers:
install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(incdir)"
install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(libdir)/pkgconfig"
+uninstall: uninstall-libs uninstall-headers
+
+uninstall-libs:
+ifeq ($(CONFIG_MINGW),yes)
+ -rm -f $(prefix)/$(SLIBNAME)
+else
+ -rm -f $(libdir)/$(SLIBNAME_WITH_MAJOR) \
+ $(libdir)/$(SLIBNAME) \
+ $(libdir)/$(SLIBNAME_WITH_VERSION)
+endif
+ -rm -f $(libdir)/$(LIB)
+
+uninstall-headers:
+ rm -f $(addprefix $(incdir)/,$(HEADERS))
+ rm -f $(libdir)/pkgconfig/lib$(NAME).pc
+
#
# include dependency files if they exist
#