changeset 19016:837e543350b3

sync with FFmpeg r5718
author diego
date Tue, 11 Jul 2006 22:44:05 +0000
parents 7a1e2e700cff
children 330a11fcdab2
files common.mak
diffstat 1 files changed, 23 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/common.mak	Tue Jul 11 22:36:04 2006 +0000
+++ b/common.mak	Tue Jul 11 22:44:05 2006 +0000
@@ -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 @@
 	$(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-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 -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
 #