Mercurial > mplayer.hg
annotate common.mak @ 31307:dc6a2cb5e0b4
Add QuantizeBuffer function call to gif test to actually test linking.
author | reimar |
---|---|
date | Sun, 13 Jun 2010 05:32:09 +0000 |
parents | 0f9c3f446fc6 |
children | e061d5d981ba |
rev | line source |
---|---|
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
1 # |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
2 # common bits used by all libraries |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
3 # |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
4 |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
5 # first so "all" becomes default target |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
6 all: all-yes |
26155 | 7 |
26317 | 8 ifndef SUBDIR |
29136 | 9 vpath %.c $(SRC_DIR) |
10 vpath %.h $(SRC_DIR) | |
11 vpath %.S $(SRC_DIR) | |
27868 | 12 vpath %.asm $(SRC_DIR) |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
13 vpath %.v $(SRC_DIR) |
27868 | 14 |
15 ifeq ($(SRC_DIR),$(SRC_PATH_BARE)) | |
16 BUILD_ROOT_REL = . | |
17 else | |
18 BUILD_ROOT_REL = .. | |
19 endif | |
26155 | 20 |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
21 ifndef V |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
22 Q = @ |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
23 ECHO = printf "$(1)\t%s\n" $(2) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
24 BRIEF = CC AS YASM AR LD HOSTCC STRIP CP |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
25 SILENT = DEPCC YASMDEP RM RANLIB |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
26 MSG = $@ |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
27 M = @$(call ECHO,$(TAG),$@); |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
28 $(foreach VAR,$(BRIEF), \ |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
29 $(eval $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
30 $(foreach VAR,$(SILENT),$(eval $(VAR) = @$($(VAR)))) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
31 $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
32 endif |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
33 |
26155 | 34 ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
35 |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
36 CPPFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
37 CFLAGS += $(ECFLAGS) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
38 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
39 %.o: %.c |
29672 | 40 $(CCDEP) |
41 $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $< | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
42 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
43 %.o: %.S |
29672 | 44 $(ASDEP) |
45 $(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $< | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
46 |
24775 | 47 %.ho: %.h |
29672 | 48 $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $< |
27868 | 49 |
26671 | 50 %$(EXESUF): %.c |
51 | |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
52 %.ver: %.v |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
53 $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ |
27868 | 54 |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
55 %.c %.h: TAG = GEN |
27868 | 56 |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
57 install: install-libs install-headers |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
58 install-libs: install-libs-yes |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
59 |
19016 | 60 uninstall: uninstall-libs uninstall-headers |
61 | |
29136 | 62 .PHONY: all depend dep *clean install* uninstall* examples testprogs |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
63 |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
64 # Disable suffix rules. Most of the builtin rules are suffix rules, |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
65 # so this saves some time on slow systems. |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
66 .SUFFIXES: |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
67 |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
68 # Do not delete intermediate files from chains of implicit rules |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
69 $(OBJS): |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
70 endif |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
71 |
29136 | 72 OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes) |
73 | |
74 CFLAGS += $(CFLAGS-yes) | |
75 OBJS += $(OBJS-yes) | |
76 FFLIBS := $(FFLIBS-yes) $(FFLIBS) | |
77 TESTPROGS += $(TESTPROGS-yes) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
78 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
79 FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) |
29136 | 80 FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(ALLFFLIBS)) $(LDFLAGS) |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
81 |
29136 | 82 EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES))) |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
83 OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS))) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
84 TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS)) |
29136 | 85 TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS))) |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
86 HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS))) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
87 HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS))) |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
88 |
29672 | 89 DEP_LIBS := $(foreach NAME,$(FFLIBS),$(BUILD_ROOT_REL)/lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME)) |
26403 | 90 |
28444 | 91 ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
92 SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS)) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
93 SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS)) |
29672 | 94 checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho)) |
19016 | 95 |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
96 $(HOSTOBJS): %.o: %.c |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
97 $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
98 |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
99 $(HOSTPROGS): %$(HOSTEXESUF): %.o |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
100 $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS) |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
101 |
26403 | 102 DEPS := $(OBJS:.o=.d) |
103 depend dep: $(DEPS) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
104 |
31273
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
105 CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver |
0f9c3f446fc6
Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents:
29672
diff
changeset
|
106 DISTCLEANSUFFIXES = *.pc |
29672 | 107 LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp |
26155 | 108 |
29672 | 109 -include $(wildcard $(DEPS)) |