Mercurial > mplayer.hg
comparison subdir.mak @ 29136:cfdba9b5abba
Sync with latest FFmpeg changes.
author | diego |
---|---|
date | Mon, 13 Apr 2009 08:55:20 +0000 |
parents | 10d81013bb5f |
children | 3f5e7b22b2a6 |
comparison
equal
deleted
inserted
replaced
29135:628596ce7d8c | 29136:cfdba9b5abba |
---|---|
16 $(RANLIB) $@ | 16 $(RANLIB) $@ |
17 endif | 17 endif |
18 | 18 |
19 INCINSTDIR := $(INCDIR)/lib$(NAME) | 19 INCINSTDIR := $(INCDIR)/lib$(NAME) |
20 | 20 |
21 THIS_LIB := $(SUBDIR)$($(BUILD_SHARED:yes=S)LIBNAME) | |
22 | |
21 define RULES | 23 define RULES |
24 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o | |
25 $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) | |
26 | |
27 $(SUBDIR)%-test.o: $(SUBDIR)%.c | |
28 $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ | |
29 | |
30 $(SUBDIR)%-test.o: $(SUBDIR)%-test.c | |
31 $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ | |
32 | |
33 $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm | |
34 $(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$< | |
35 | |
36 $(SUBDIR)x86/%.d: $(SUBDIR)x86/%.asm | |
37 $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@ | |
38 | |
39 clean:: | |
40 rm -f $(EXAMPLES) $(addprefix $(SUBDIR),*-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ | |
41 $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) | |
42 | |
43 distclean:: clean | |
44 rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \ | |
45 $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) | |
46 | |
22 ifdef BUILD_SHARED | 47 ifdef BUILD_SHARED |
23 all: $(SUBDIR)$(SLIBNAME) | 48 all: $(SUBDIR)$(SLIBNAME) |
24 | 49 |
25 install-libs: install-lib$(NAME)-shared | 50 install-libs: install-lib$(NAME)-shared |
26 | 51 |
37 endif | 62 endif |
38 endif | 63 endif |
39 | 64 |
40 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) | 65 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) |
41 install -d "$(SHLIBDIR)" | 66 install -d "$(SHLIBDIR)" |
42 install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | 67 install -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" |
43 $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | 68 $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" |
44 cd "$(SHLIBDIR)" && \ | 69 cd "$(SHLIBDIR)" && \ |
45 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR) | 70 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR) |
46 cd "$(SHLIBDIR)" && \ | 71 cd "$(SHLIBDIR)" && \ |
47 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME) | 72 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME) |
48 $(SLIB_INSTALL_EXTRA_CMD) | 73 $(SLIB_INSTALL_EXTRA_CMD) |
49 | 74 |
50 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME) | 75 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME) |
51 install -d "$(LIBDIR)" | 76 install -d "$(LIBDIR)" |
52 install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)" | 77 install -m 644 $$< "$(LIBDIR)" |
53 $(LIB_INSTALL_EXTRA_CMD) | 78 $(LIB_INSTALL_EXTRA_CMD) |
54 | 79 |
55 install-headers:: | 80 install-headers:: |
56 install -d "$(INCINSTDIR)" | 81 install -d "$(INCINSTDIR)" |
57 install -d "$(LIBDIR)/pkgconfig" | 82 install -d "$(LIBDIR)/pkgconfig" |
70 rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc" | 95 rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc" |
71 -rmdir "$(INCDIR)" | 96 -rmdir "$(INCDIR)" |
72 endef | 97 endef |
73 | 98 |
74 $(eval $(RULES)) | 99 $(eval $(RULES)) |
100 | |
101 $(EXAMPLES) $(TESTPROGS): $(THIS_LIB) $(DEP_LIBS) | |
102 | |
103 examples: $(EXAMPLES) | |
104 testprogs: $(TESTPROGS) |