Mercurial > libavutil.hg
annotate Makefile @ 26:254a8d098e95 libavutil
Separate library install into static and shared installation.
author | diego |
---|---|
date | Sat, 11 Feb 2006 18:50:45 +0000 |
parents | d25a948e2019 |
children | 3e908b79ab11 |
rev | line source |
---|---|
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
1 # |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
2 # libavutil Makefile |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
3 # |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
4 include ../config.mak |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
5 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
6 VPATH=$(SRC_PATH)/libavutil |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
7 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
8 # NOTE: -I.. is needed to include config.h |
22
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
21
diff
changeset
|
9 CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
10 |
21 | 11 #FIXME: This should be in configure/config.mak |
12 ifeq ($(CONFIG_WIN32),yes) | |
22
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
21
diff
changeset
|
13 LDFLAGS=-Wl,--output-def,$(@:.dll=.def),--out-implib,lib$(SLIBNAME:$(SLIBSUF)=.dll.a) |
21 | 14 endif |
15 | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
16 OBJS= mathematics.o \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
17 integer.o \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
18 rational.o \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
19 intfloat_readwrite.o \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
20 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
21 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
22 ifeq ($(TARGET_ARCH_SPARC64),yes) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
23 CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
24 endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
25 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
26 SRCS := $(OBJS:.o=.c) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
27 |
17
314e61f57c42
Move library name generation to configure, simplifies build system a bit more.
diego
parents:
16
diff
changeset
|
28 NAME=avutil |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
29 ifeq ($(BUILD_SHARED),yes) |
16
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
30 LIBVERSION=$(LAVUVERSION) |
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
31 LIBMAJOR=$(LAVUMAJOR) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
32 endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
33 |
5 | 34 all: $(LIB) $(SLIBNAME) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
35 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
36 $(LIB): $(OBJS) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
37 rm -f $@ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
38 $(AR) rc $@ $(OBJS) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
39 $(RANLIB) $@ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
40 |
5 | 41 $(SLIBNAME): $(OBJS) |
21 | 42 $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
43 ifeq ($(CONFIG_WIN32),yes) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
44 -lib /machine:i386 /def:$(@:.dll=.def) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
45 endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
46 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
47 %.o: %.c |
12 | 48 $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
49 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
50 depend: $(SRCS) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
51 $(CC) -MM $(CFLAGS) $^ 1>.depend |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
52 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
53 dep: depend |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
54 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
55 clean: |
22
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
21
diff
changeset
|
56 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll \ |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
21
diff
changeset
|
57 *.lib *.def *.dll.a *.exp |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
58 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
59 distclean: clean |
20
56860d9c35c2
Remove obscure Makefile.bak entry from distclean rules.
diego
parents:
18
diff
changeset
|
60 rm -f .depend |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
61 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
62 |
26
254a8d098e95
Separate library install into static and shared installation.
diego
parents:
25
diff
changeset
|
63 install-lib-shared: $(SLIBNAME) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
64 ifeq ($(CONFIG_WIN32),yes) |
5 | 65 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
66 else |
16
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
67 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ |
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
68 $(libdir)/$(SLIBNAME_WITH_VERSION) |
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
69 ln -sf $(SLIBNAME_WITH_VERSION) \ |
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
70 $(libdir)/$(SLIBNAME_WITH_MAJOR) |
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
71 ln -sf $(SLIBNAME_WITH_VERSION) \ |
0e94608e337f
Create symbolic links for all library sonames and clean up Makefiles.
diego
parents:
14
diff
changeset
|
72 $(libdir)/$(SLIBNAME) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
73 endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
74 |
26
254a8d098e95
Separate library install into static and shared installation.
diego
parents:
25
diff
changeset
|
75 install-lib-static: $(LIB) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
76 install -m 644 $(LIB) "$(libdir)" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
77 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
78 install-headers: |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
79 mkdir -p "$(prefix)/include/ffmpeg" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
80 install -m 644 $(SRC_PATH)/libavutil/avutil.h \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
81 $(SRC_PATH)/libavutil/common.h \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
82 $(SRC_PATH)/libavutil/mathematics.h \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
83 $(SRC_PATH)/libavutil/integer.h \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
84 $(SRC_PATH)/libavutil/rational.h \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
85 $(SRC_PATH)/libavutil/intfloat_readwrite.h \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
86 "$(prefix)/include/ffmpeg" |
6
0419cc681610
Put double-quotes around the install path in the "install-headers" section
diego
parents:
5
diff
changeset
|
87 install -d "$(libdir)/pkgconfig" |
0419cc681610
Put double-quotes around the install path in the "install-headers" section
diego
parents:
5
diff
changeset
|
88 install -m 644 ../libavutil.pc "$(libdir)/pkgconfig" |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
89 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
90 # |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
91 # include dependency files if they exist |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
92 # |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
93 ifneq ($(wildcard .depend),) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
94 include .depend |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
95 endif |