annotate subdir.mak @ 31603:2b455d7357cc

Check packet size before memmove to avoid crashes e.g. if we recognized the wrong type and subtracted more header bytes than there are overall bytes.
author reimar
date Sat, 10 Jul 2010 16:43:00 +0000
parents 0f9c3f446fc6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
1 SRC_DIR := $(SRC_PATH_BARE)/lib$(NAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
2
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
3 include $(SUBDIR)../common.mak
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
4
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
5 LIBVERSION := $(lib$(NAME)_VERSION)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
6 LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
7 INCINSTDIR := $(INCDIR)/lib$(NAME)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
8 THIS_LIB := $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
9
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
10 all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
11 all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
12
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
13 $(SUBDIR)%-test.o: $(SUBDIR)%.c
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
14 $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
15
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
16 $(SUBDIR)%-test.o: $(SUBDIR)%-test.c
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
17 $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
18
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
19 $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
20 $(YASMDEP) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
21 $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
22
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
23 $(OBJS) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
24
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
25 $(SUBDIR)$(LIBNAME): $(OBJS)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
26 $(RM) $@
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
27 $(AR) rc $@ $^ $(EXTRAOBJS)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
28 $(RANLIB) $@
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
29
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
30 install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
31
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
32 install-libs-$(CONFIG_STATIC): install-lib$(NAME)-static
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
33 install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
34
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
35 define RULES
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
36 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
37 $$(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
38
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
39 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
40 $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
41
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
42 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
43 $(SLIB_CREATE_DEF_CMD)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
44 $$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
45 $(SLIB_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
46
26317
955f4b8ac094 Merge simplifications from FFmpeg r12764.
diego
parents: 26315
diff changeset
47 ifdef SUBDIR
26403
c7c1cc069961 Sync with latest FFmpeg changes.
diego
parents: 26317
diff changeset
48 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
49 endif
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
50
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
51 clean::
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
52 $(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
53 $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) \
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
54 $(HOSTOBJS) $(HOSTPROGS)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
55
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
56 distclean:: clean
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
57 $(RM) $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
58 $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
59
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
60 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
61 $(Q)mkdir -p "$(SHLIBDIR)"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
62 $$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
63 $$(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
64 $(Q)cd "$(SHLIBDIR)" && \
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
65 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
66 $(Q)cd "$(SHLIBDIR)" && \
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
67 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
68 $(SLIB_INSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
69
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
70 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
71 $(Q)mkdir -p "$(LIBDIR)"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
72 $$(INSTALL) -m 644 $$< "$(LIBDIR)"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
73 $(LIB_INSTALL_EXTRA_CMD)
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
74
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
75 install-lib$(NAME)-headers: $(addprefix $(SUBDIR),$(HEADERS) $(BUILT_HEADERS))
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
76 $(Q)mkdir -p "$(INCINSTDIR)"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
77 $$(INSTALL) -m 644 $$^ "$(INCINSTDIR)"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
78
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
79 install-lib$(NAME)-pkgconfig: $(SUBDIR)lib$(NAME).pc
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
80 $(Q)mkdir -p "$(LIBDIR)/pkgconfig"
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
81 $$(INSTALL) -m 644 $$^ "$(LIBDIR)/pkgconfig"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
82
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
83 uninstall-libs::
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
84 -$(RM) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
85 "$(SHLIBDIR)/$(SLIBNAME)" \
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
86 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
87 -$(SLIB_UNINSTALL_EXTRA_CMD)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
88 -$(RM) "$(LIBDIR)/$(LIBNAME)"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
89
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
90 uninstall-headers::
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
91 $(RM) $(addprefix "$(INCINSTDIR)/",$(HEADERS))
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
92 $(RM) "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
93 -rmdir "$(INCDIR)"
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
94 endef
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
95
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
diff changeset
96 $(eval $(RULES))
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
97
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
98 $(EXAMPLES) $(TESTPROGS): $(THIS_LIB) $(DEP_LIBS)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
99
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
100 examples: $(EXAMPLES)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
101 testprogs: $(TESTPROGS)