annotate common.mak @ 17981:368ad4d775be

synced with 1.1249
author gpoirier
date Mon, 27 Mar 2006 19:43:46 +0000
parents a0c511c2d0bd
children 6727756ba981
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
5 SRC_DIR = $(SRC_PATH)/$(SUBDIR)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
6 VPATH = $(SRC_DIR)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
7
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
8 #FIXME: This should be in configure/config.mak
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
9 ifeq ($(CONFIG_WIN32),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
10 LDFLAGS = -Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
11 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
12
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
13 ifeq ($(TARGET_GPROF),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
14 CFLAGS+=-p
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
15 LDFLAGS+=-p
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
16 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
17
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
18 ifeq ($(TARGET_ARCH_SPARC64),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
19 CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
20 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
21
17700
a0c511c2d0bd update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents: 17627
diff changeset
22 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
23 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
24 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
25 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
26
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
27 all: $(LIB) $(SLIBNAME)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
28
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
29 $(LIB): $(STATIC_OBJS)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
30 rm -f $@
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
31 $(AR) rc $@ $^ $(EXTRAOBJS)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
32 $(RANLIB) $@
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
33
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
34 $(SLIBNAME): $(SHARED_OBJS)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
35 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
36 ifeq ($(CONFIG_WIN32),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
37 -lib /machine:i386 /def:$(@:.dll=.def)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
38 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
39
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
40 %.o: %.c
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
41 $(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
42
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
43 %.o: %.S
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
44 $(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
45
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
46 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
47 %.o: %.cpp
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
48 g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $<
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
49
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
50 depend: $(SRCS)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
51 $(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
52
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
53 dep: 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 clean::
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
56 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
57 *.lib *.def *.dll.a *.exp
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
58
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
59 distclean: clean
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
60 rm -f .depend
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 ifeq ($(BUILD_SHARED),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
63 INSTLIBTARGETS += install-lib-shared
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
64 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
65 ifeq ($(BUILD_STATIC),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
66 INSTLIBTARGETS += install-lib-static
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
67 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
68
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
69 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
70
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
71 install-libs: $(INSTLIBTARGETS)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
72
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
73 install-lib-shared: $(SLIBNAME)
17700
a0c511c2d0bd update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents: 17627
diff changeset
74 install -d "$(libdir)"
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
75 ifeq ($(CONFIG_WIN32),yes)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
76 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
77 else
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
78 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
79 $(libdir)/$(SLIBNAME_WITH_VERSION)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
80 ln -sf $(SLIBNAME_WITH_VERSION) \
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
81 $(libdir)/$(SLIBNAME_WITH_MAJOR)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
82 ln -sf $(SLIBNAME_WITH_VERSION) \
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
83 $(libdir)/$(SLIBNAME)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
84 endif
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
85
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
86 install-lib-static: $(LIB)
17700
a0c511c2d0bd update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents: 17627
diff changeset
87 install -d "$(libdir)"
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
88 install -m 644 $(LIB) "$(libdir)"
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
89
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
90 install-headers:
17700
a0c511c2d0bd update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents: 17627
diff changeset
91 install -d "$(incdir)"
a0c511c2d0bd update config.mak to match ffmpeg's version (fix alpha compilation)
aurel
parents: 17627
diff changeset
92 install -d "$(libdir)/pkgconfig"
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
93 install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(incdir)"
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
94 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
95
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
96 #
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
97 # include dependency files if they exist
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
98 #
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
99 ifneq ($(wildcard .depend),)
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
100 include .depend
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
101 endif