Mercurial > mplayer.hg
annotate common.mak @ 24154:09006821e9d7
Move button variable into the if () where it is actually used.
author | diego |
---|---|
date | Sat, 25 Aug 2007 13:08:49 +0000 |
parents | dd0d8b99192b |
children | 16f77f3eb187 |
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 |
21210 | 5 VPATH = $(SRC_PATH_BARE)/lib$(NAME) |
6 SRC_DIR = "$(VPATH)" | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
7 |
21992 | 8 CFLAGS += $(CFLAGS-yes) |
9 OBJS += $(OBJS-yes) | |
10 ASM_OBJS += $(ASM_OBJS-yes) | |
23524 | 11 CPP_OBJS += $(CPP_OBJS-yes) |
21992 | 12 |
20152 | 13 CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ |
14 -D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \ | |
15 -I$(SRC_PATH)/libavutil $(OPTFLAGS) | |
23524 | 16 |
17700
a0c511c2d0bd
update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents:
17627
diff
changeset
|
17 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
|
18 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
|
19 STATIC_OBJS := $(OBJS) $(STATIC_OBJS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
20 SHARED_OBJS := $(OBJS) $(SHARED_OBJS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
21 |
18311 | 22 all: $(EXTRADEPS) $(LIB) $(SLIBNAME) |
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 $(LIB): $(STATIC_OBJS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
25 rm -f $@ |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
26 $(AR) rc $@ $^ $(EXTRAOBJS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
27 $(RANLIB) $@ |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
28 |
19016 | 29 $(SLIBNAME): $(SLIBNAME_WITH_MAJOR) |
30 ln -sf $^ $@ | |
31 | |
32 $(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS) | |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
33 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS) |
19375 | 34 $(SLIB_EXTRA_CMD) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
35 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
36 %.o: %.c |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
37 $(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
|
38 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
39 %.o: %.S |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
40 $(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
|
41 |
20068 | 42 %: %.o $(LIB) |
43 $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) | |
44 | |
20016 | 45 depend dep: $(SRCS) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
46 $(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
|
47 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
48 clean:: |
23524 | 49 rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \ |
21210 | 50 *.def *.dll.a *.exp |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
51 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
52 distclean: clean |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
53 rm -f .depend |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
54 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
55 ifeq ($(BUILD_SHARED),yes) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
56 INSTLIBTARGETS += install-lib-shared |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
57 endif |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
58 ifeq ($(BUILD_STATIC),yes) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
59 INSTLIBTARGETS += install-lib-static |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
60 endif |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
61 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
62 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
|
63 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
64 install-libs: $(INSTLIBTARGETS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
65 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
66 install-lib-shared: $(SLIBNAME) |
19375 | 67 install -d "$(shlibdir)" |
23524 | 68 install -m 755 $(SLIBNAME) "$(shlibdir)/$(SLIBNAME_WITH_VERSION)" |
69 $(STRIP) "$(shlibdir)/$(SLIBNAME_WITH_VERSION)" | |
19375 | 70 cd "$(shlibdir)" && \ |
71 ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR) | |
72 cd "$(shlibdir)" && \ | |
73 ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME) | |
21975 | 74 $(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
|
75 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
76 install-lib-static: $(LIB) |
17700
a0c511c2d0bd
update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents:
17627
diff
changeset
|
77 install -d "$(libdir)" |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
78 install -m 644 $(LIB) "$(libdir)" |
20016 | 79 $(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
|
80 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
81 install-headers: |
17700
a0c511c2d0bd
update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents:
17627
diff
changeset
|
82 install -d "$(incdir)" |
a0c511c2d0bd
update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents:
17627
diff
changeset
|
83 install -d "$(libdir)/pkgconfig" |
21210 | 84 install -m 644 $(addprefix $(SRC_DIR)/,$(HEADERS)) "$(incdir)" |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
85 install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(libdir)/pkgconfig" |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
86 |
19016 | 87 uninstall: uninstall-libs uninstall-headers |
88 | |
89 uninstall-libs: | |
19375 | 90 -rm -f "$(shlibdir)/$(SLIBNAME_WITH_MAJOR)" \ |
91 "$(shlibdir)/$(SLIBNAME)" \ | |
92 "$(shlibdir)/$(SLIBNAME_WITH_VERSION)" | |
93 -rm -f "$(libdir)/$(LIB)" | |
19016 | 94 |
23524 | 95 uninstall-headers:: |
20152 | 96 rm -f $(addprefix "$(incdir)/",$(HEADERS)) |
19375 | 97 rm -f "$(libdir)/pkgconfig/lib$(NAME).pc" |
19016 | 98 |
20016 | 99 .PHONY: all depend dep clean distclean install* uninstall* |
100 | |
23524 | 101 -include .depend |