Mercurial > mplayer.hg
annotate common.mak @ 26157:64654d7bebbc
Remove duplicate conditions in dvdread check.
author | diego |
---|---|
date | Fri, 07 Mar 2008 10:36:31 +0000 |
parents | ba3e34112e47 |
children | 35f930b141ad |
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 |
26155 | 5 LIBSRC = $(SRC_PATH_BARE)/lib$(NAME) |
6 | |
7 vpath %.c $(LIBSRC) | |
8 vpath %.h $(LIBSRC) | |
9 vpath %.S $(LIBSRC) | |
10 | |
11 SRC_DIR = "$(LIBSRC)" | |
12 | |
13 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
|
14 |
21992 | 15 CFLAGS += $(CFLAGS-yes) |
16 OBJS += $(OBJS-yes) | |
17 ASM_OBJS += $(ASM_OBJS-yes) | |
23524 | 18 CPP_OBJS += $(CPP_OBJS-yes) |
26155 | 19 FFLIBS += $(FFLIBS-yes) |
21992 | 20 |
20152 | 21 CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ |
22 -D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \ | |
26155 | 23 $(addprefix -I$(SRC_PATH)/lib,$(ALLFFLIBS)) $(OPTFLAGS) |
24 | |
25 EXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) | |
26 LDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS) | |
23524 | 27 |
17700
a0c511c2d0bd
update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents:
17627
diff
changeset
|
28 SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
29 OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
30 |
24775 | 31 all: $(LIBNAME) $(SLIBNAME) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
32 |
24858 | 33 $(LIBNAME): $(OBJS) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
34 rm -f $@ |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
35 $(AR) rc $@ $^ $(EXTRAOBJS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
36 $(RANLIB) $@ |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
37 |
19016 | 38 $(SLIBNAME): $(SLIBNAME_WITH_MAJOR) |
24775 | 39 $(LN_S) $^ $@ |
19016 | 40 |
24858 | 41 $(SLIBNAME_WITH_MAJOR): $(OBJS) |
26155 | 42 $(SLIB_CREATE_DEF_CMD) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
43 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS) |
19375 | 44 $(SLIB_EXTRA_CMD) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
45 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
46 %.o: %.c |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
47 $(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
|
48 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
49 %.o: %.S |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
50 $(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
|
51 |
24775 | 52 %: %.o $(LIBNAME) |
20068 | 53 $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) |
54 | |
24775 | 55 %.ho: %.h |
56 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< | |
57 | |
26155 | 58 ALLHEADERS = $(subst $(LIBSRC)/,,$(wildcard $(LIBSRC)/*.h)) |
24775 | 59 checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) |
60 | |
20016 | 61 depend dep: $(SRCS) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
62 $(CC) -MM $(CFLAGS) $^ 1>.depend |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
63 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
64 clean:: |
23524 | 65 rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \ |
26155 | 66 *.def *.dll.a *.exp *.ho *.map $(TESTS) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
67 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
68 distclean: clean |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
69 rm -f .depend |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
70 |
24858 | 71 INSTALL_TARGETS-$(BUILD_SHARED) += install-lib-shared |
72 INSTALL_TARGETS-$(BUILD_STATIC) += install-lib-static | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
73 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
74 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
|
75 |
24858 | 76 install-libs: $(INSTALL_TARGETS-yes) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
77 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
78 install-lib-shared: $(SLIBNAME) |
24775 | 79 install -d "$(SHLIBDIR)" |
80 install -m 755 $(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | |
81 $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | |
82 cd "$(SHLIBDIR)" && \ | |
83 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR) | |
84 cd "$(SHLIBDIR)" && \ | |
85 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME) | |
21975 | 86 $(SLIB_INSTALL_EXTRA_CMD) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
87 |
24775 | 88 install-lib-static: $(LIBNAME) |
89 install -d "$(LIBDIR)" | |
90 install -m 644 $(LIBNAME) "$(LIBDIR)" | |
20016 | 91 $(LIB_INSTALL_EXTRA_CMD) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
92 |
26155 | 93 INCINSTDIR = $(INCDIR)/lib$(NAME) |
94 | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
95 install-headers: |
26155 | 96 install -d "$(INCINSTDIR)" |
24775 | 97 install -d "$(LIBDIR)/pkgconfig" |
26155 | 98 install -m 644 $(addprefix $(SRC_DIR)/,$(HEADERS)) "$(INCINSTDIR)" |
24775 | 99 install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(LIBDIR)/pkgconfig" |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
100 |
19016 | 101 uninstall: uninstall-libs uninstall-headers |
102 | |
103 uninstall-libs: | |
24775 | 104 -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \ |
105 "$(SHLIBDIR)/$(SLIBNAME)" \ | |
106 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | |
107 -$(SLIB_UNINSTALL_EXTRA_CMD) | |
108 -rm -f "$(LIBDIR)/$(LIBNAME)" | |
19016 | 109 |
23524 | 110 uninstall-headers:: |
26155 | 111 rm -f $(addprefix "$(INCINSTDIR)/",$(HEADERS)) |
24775 | 112 rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc" |
19016 | 113 |
26155 | 114 tests: $(TESTS) |
115 | |
116 %-test$(EXESUF): %.c $(LIBNAME) | |
117 $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS) | |
118 | |
119 .PHONY: all depend dep clean distclean install* uninstall* tests | |
20016 | 120 |
23524 | 121 -include .depend |