Mercurial > mplayer.hg
annotate common.mak @ 24816:ba929c5ee0bc
Fix input command parser for using only tab to separate the arguments.
author | ulion |
---|---|
date | Tue, 23 Oct 2007 00:44:22 +0000 |
parents | 16f77f3eb187 |
children | ca10b24479ff |
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 |
24775 | 22 all: $(LIBNAME) $(SLIBNAME) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
23 |
24775 | 24 $(LIBNAME): $(STATIC_OBJS) |
17627
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) |
24775 | 30 $(LN_S) $^ $@ |
19016 | 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 |
24775 | 42 %: %.o $(LIBNAME) |
20068 | 43 $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) |
44 | |
24775 | 45 %.ho: %.h |
46 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $< | |
47 | |
48 ALLHEADERS = $(subst $(VPATH)/,,$(wildcard $(VPATH)/*.h)) | |
49 checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho)) | |
50 | |
20016 | 51 depend dep: $(SRCS) |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
52 $(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
|
53 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
54 clean:: |
23524 | 55 rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \ |
24775 | 56 *.def *.dll.a *.exp *.ho |
17627
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
57 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
58 distclean: clean |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
59 rm -f .depend |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
60 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
61 ifeq ($(BUILD_SHARED),yes) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
62 INSTLIBTARGETS += install-lib-shared |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
63 endif |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
64 ifeq ($(BUILD_STATIC),yes) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
65 INSTLIBTARGETS += install-lib-static |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
66 endif |
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 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
|
69 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
70 install-libs: $(INSTLIBTARGETS) |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
71 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
72 install-lib-shared: $(SLIBNAME) |
24775 | 73 install -d "$(SHLIBDIR)" |
74 install -m 755 $(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | |
75 $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | |
76 cd "$(SHLIBDIR)" && \ | |
77 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR) | |
78 cd "$(SHLIBDIR)" && \ | |
79 $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME) | |
21975 | 80 $(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
|
81 |
24775 | 82 install-lib-static: $(LIBNAME) |
83 install -d "$(LIBDIR)" | |
84 install -m 644 $(LIBNAME) "$(LIBDIR)" | |
20016 | 85 $(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
|
86 |
24238abbd150
Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff
changeset
|
87 install-headers: |
24775 | 88 install -d "$(INCDIR)" |
89 install -d "$(LIBDIR)/pkgconfig" | |
90 install -m 644 $(addprefix $(SRC_DIR)/,$(HEADERS)) "$(INCDIR)" | |
91 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
|
92 |
19016 | 93 uninstall: uninstall-libs uninstall-headers |
94 | |
95 uninstall-libs: | |
24775 | 96 -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \ |
97 "$(SHLIBDIR)/$(SLIBNAME)" \ | |
98 "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)" | |
99 -$(SLIB_UNINSTALL_EXTRA_CMD) | |
100 -rm -f "$(LIBDIR)/$(LIBNAME)" | |
19016 | 101 |
23524 | 102 uninstall-headers:: |
24775 | 103 rm -f $(addprefix "$(INCDIR)/",$(HEADERS)) |
104 rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc" | |
19016 | 105 |
20016 | 106 .PHONY: all depend dep clean distclean install* uninstall* |
107 | |
23524 | 108 -include .depend |