Mercurial > mplayer.hg
annotate common.mak @ 28804:5ccdec6c14f0
Draw EOSD with VOCTRL_DRAW_EOSD instead of along with OSD.
author | greg |
---|---|
date | Fri, 06 Mar 2009 10:38:27 +0000 |
parents | bffc31262b0e |
children | cfdba9b5abba |
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 |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
5 all: # make "all" default target |
26155 | 6 |
26317 | 7 ifndef SUBDIR |
26246 | 8 vpath %.c $(SRC_DIR) |
9 vpath %.h $(SRC_DIR) | |
10 vpath %.S $(SRC_DIR) | |
27868 | 11 vpath %.asm $(SRC_DIR) |
12 | |
13 ifeq ($(SRC_DIR),$(SRC_PATH_BARE)) | |
14 BUILD_ROOT_REL = . | |
15 else | |
16 BUILD_ROOT_REL = .. | |
17 endif | |
26155 | 18 |
19 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
|
20 |
27868 | 21 CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ |
22 -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS) | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
23 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
24 %.o: %.c |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
25 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
26 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
27 %.o: %.S |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
28 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
29 |
24775 | 30 %.ho: %.h |
31 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< | |
32 | |
26403 | 33 %.d: %.c |
34 $(DEPEND_CMD) > $@ | |
35 | |
36 %.d: %.S | |
37 $(DEPEND_CMD) > $@ | |
38 | |
39 %.d: %.cpp | |
40 $(DEPEND_CMD) > $@ | |
41 | |
27868 | 42 %.o: %.d |
43 | |
26671 | 44 %$(EXESUF): %.c |
45 | |
27868 | 46 SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries |
47 ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES)) | |
48 $(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) | |
49 endif | |
50 | |
28444 | 51 $(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh |
52 $< $(SRC_PATH) $@ $(EXTRA_VERSION) | |
27868 | 53 |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
54 install: install-libs install-headers |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
55 |
19016 | 56 uninstall: uninstall-libs uninstall-headers |
57 | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
58 .PHONY: all depend dep clean distclean install* uninstall* tests |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
59 endif |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
60 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
61 CFLAGS += $(CFLAGS-yes) |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
62 OBJS += $(OBJS-yes) |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
63 FFLIBS := $(FFLIBS-yes) $(FFLIBS) |
26317 | 64 TESTS += $(TESTS-yes) |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
65 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
66 FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
67 FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS) |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
68 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
69 OBJS := $(addprefix $(SUBDIR),$(OBJS)) |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
70 TESTS := $(addprefix $(SUBDIR),$(TESTS)) |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
71 |
26403 | 72 DEP_LIBS:=$(foreach NAME,$(FFLIBS),lib$(NAME)/$($(BUILD_SHARED:yes=S)LIBNAME)) |
73 | |
28444 | 74 ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
75 checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) |
19016 | 76 |
26403 | 77 DEPS := $(OBJS:.o=.d) |
78 depend dep: $(DEPS) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
79 |
26403 | 80 CLEANSUFFIXES = *.o *~ *.ho |
81 LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map | |
27868 | 82 DISTCLEANSUFFIXES = *.d *.pc |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
83 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
84 define RULES |
26671 | 85 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o |
86 $(CC) $(FFLDFLAGS) -o $$@ $$^ $(SUBDIR)$(LIBNAME) $(FFEXTRALIBS) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
87 |
26671 | 88 $(SUBDIR)%-test.o: $(SUBDIR)%.c |
89 $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ | |
90 | |
91 $(SUBDIR)%-test.o: $(SUBDIR)%-test.c | |
92 $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
93 |
28143 | 94 $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm |
27868 | 95 $(YASM) $(YASMFLAGS) -I $$(<D)/ -o $$@ $$< |
96 | |
28143 | 97 $(SUBDIR)x86/%.d: $(SUBDIR)x86/%.asm |
27868 | 98 $(YASM) $(YASMFLAGS) -I $$(<D)/ -M -o $$(@:%.d=%.o) $$< > $$@ |
99 | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
100 clean:: |
26403 | 101 rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ |
102 $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
103 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
104 distclean:: clean |
26403 | 105 rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \ |
106 $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS)))) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
107 endef |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
108 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
109 $(eval $(RULES)) |
19016 | 110 |
26155 | 111 tests: $(TESTS) |
112 | |
26403 | 113 -include $(DEPS) |