[FFmpeg-cvslog] r22394 - in trunk: common.mak subdir.mak

mru subversion
Tue Mar 9 15:58:19 CET 2010


Author: mru
Date: Tue Mar  9 15:58:18 2010
New Revision: 22394

Log:
Simplify static/shared build rules

Modified:
   trunk/common.mak
   trunk/subdir.mak

Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak	Tue Mar  9 15:58:15 2010	(r22393)
+++ trunk/common.mak	Tue Mar  9 15:58:18 2010	(r22394)
@@ -2,7 +2,8 @@
 # common bits used by all libraries
 #
 
-all: # make "all" default target
+# first so "all" becomes default target
+all: all-yes
 
 ifndef SUBDIR
 vpath %.c   $(SRC_DIR)
@@ -59,6 +60,7 @@ $(BUILD_ROOT_REL)/version.h: $(SRC_PATH_
 	$< $(SRC_PATH) $@ $(EXTRA_VERSION)
 
 install: install-libs install-headers
+install-libs: install-libs-yes
 
 uninstall: uninstall-libs uninstall-headers
 

Modified: trunk/subdir.mak
==============================================================================
--- trunk/subdir.mak	Tue Mar  9 15:58:15 2010	(r22393)
+++ trunk/subdir.mak	Tue Mar  9 15:58:18 2010	(r22394)
@@ -7,6 +7,9 @@ LIBMAJOR   := $(lib$(NAME)_VERSION_MAJOR
 INCINSTDIR := $(INCDIR)/lib$(NAME)
 THIS_LIB   := $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME)
 
+all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
+all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
+
 $(SUBDIR)%-test.o: $(SUBDIR)%.c
 	$(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
 
@@ -20,10 +23,6 @@ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
 $(OBJS) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
 
 ifdef CONFIG_STATIC
-all: $(SUBDIR)$(LIBNAME)
-
-install-libs: install-lib$(NAME)-static
-
 $(SUBDIR)$(LIBNAME): $(OBJS)
 	$(RM) $@
 	$(AR) rc $@ $^ $(EXTRAOBJS)
@@ -32,6 +31,9 @@ endif
 
 install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
 
+install-libs-$(CONFIG_STATIC): install-lib$(NAME)-static
+install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
+
 define RULES
 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
 	$$(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
@@ -46,10 +48,6 @@ distclean:: clean
             $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
 
 ifdef CONFIG_SHARED
-all: $(SUBDIR)$(SLIBNAME)
-
-install-libs: install-lib$(NAME)-shared
-
 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
 	$(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
 



More information about the ffmpeg-cvslog mailing list