diff options
author | Måns Rullgård <mans@mansr.com> | 2010-03-09 14:58:18 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-03-09 14:58:18 +0000 |
commit | 451db9832c5604d02c8c876f9b3180fd7102b0a2 (patch) | |
tree | a1384c879e2c84ec3c2e1eff0c4f8a3407f7f12d /subdir.mak | |
parent | 8c5239b382519a12a74019849cf9d855a9afa2eb (diff) | |
download | ffmpeg-451db9832c5604d02c8c876f9b3180fd7102b0a2.tar.gz |
Simplify static/shared build rules
Originally committed as revision 22394 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'subdir.mak')
-rw-r--r-- | subdir.mak | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/subdir.mak b/subdir.mak index e55189b298..3dd9f43bfb 100644 --- a/subdir.mak +++ b/subdir.mak @@ -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) |