Mercurial > mplayer.hg
annotate common.mak @ 29315:ee85be05888b
sync with ffmpeg
author | compn |
---|---|
date | Fri, 12 Jun 2009 11:23:22 +0000 |
parents | cfdba9b5abba |
children | bc094de7968e |
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 |
29136 | 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 |
29136 | 21 CFLAGS := -DHAVE_AV_CONFIG_H -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
|
22 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
23 %.o: %.c |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
24 $(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
|
25 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
26 %.o: %.S |
29136 | 27 $(AS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
28 |
24775 | 29 %.ho: %.h |
30 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< | |
31 | |
26403 | 32 %.d: %.c |
33 $(DEPEND_CMD) > $@ | |
34 | |
35 %.d: %.S | |
36 $(DEPEND_CMD) > $@ | |
37 | |
38 %.d: %.cpp | |
39 $(DEPEND_CMD) > $@ | |
40 | |
27868 | 41 %.o: %.d |
42 | |
26671 | 43 %$(EXESUF): %.c |
44 | |
27868 | 45 SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries |
46 ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES)) | |
47 $(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) | |
48 endif | |
49 | |
29136 | 50 $(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh config.mak |
28444 | 51 $< $(SRC_PATH) $@ $(EXTRA_VERSION) |
27868 | 52 |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
53 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
|
54 |
19016 | 55 uninstall: uninstall-libs uninstall-headers |
56 | |
29136 | 57 .PHONY: all depend dep *clean install* uninstall* examples testprogs |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
58 endif |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
59 |
29136 | 60 OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes) |
61 | |
62 CFLAGS += $(CFLAGS-yes) | |
63 OBJS += $(OBJS-yes) | |
64 FFLIBS := $(FFLIBS-yes) $(FFLIBS) | |
65 TESTPROGS += $(TESTPROGS-yes) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
66 |
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
67 FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) |
29136 | 68 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
|
69 |
29136 | 70 EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES))) |
71 OBJS := $(addprefix $(SUBDIR),$(OBJS)) | |
72 TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS))) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
73 |
29136 | 74 DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(BUILD_SHARED:yes=S)LIBNAME)) |
26403 | 75 |
28444 | 76 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
|
77 checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) |
19016 | 78 |
26403 | 79 DEPS := $(OBJS:.o=.d) |
80 depend dep: $(DEPS) | |
26315
a80f0a7d73f4
Sync with FFmpeg's shiny new non-recursive build system.
diego
parents:
26246
diff
changeset
|
81 |
29136 | 82 CLEANSUFFIXES = *.o *~ *.ho |
27868 | 83 DISTCLEANSUFFIXES = *.d *.pc |
29136 | 84 LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map |
26155 | 85 |
26403 | 86 -include $(DEPS) |