annotate Makefile @ 21:734ef282845e libavutil

Simplify LDFLAGS handling for MinGW.
author diego
date Sun, 29 Jan 2006 18:32:55 +0000
parents 56860d9c35c2
children 3b56407b3f96
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
9 CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
10
21
734ef282845e Simplify LDFLAGS handling for MinGW.
diego
parents: 20
diff changeset
11 #FIXME: This should be in configure/config.mak
734ef282845e Simplify LDFLAGS handling for MinGW.
diego
parents: 20
diff changeset
12 ifeq ($(CONFIG_WIN32),yes)
734ef282845e Simplify LDFLAGS handling for MinGW.
diego
parents: 20
diff changeset
13 LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
734ef282845e Simplify LDFLAGS handling for MinGW.
diego
parents: 20
diff changeset
14 endif
734ef282845e Simplify LDFLAGS handling for MinGW.
diego
parents: 20
diff changeset
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
4828bcc87c24 support for building dynamic libraries on Mac OS X
diego
parents: 1
diff changeset
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
4828bcc87c24 support for building dynamic libraries on Mac OS X
diego
parents: 1
diff changeset
41 $(SLIBNAME): $(OBJS)
21
734ef282845e Simplify LDFLAGS handling for MinGW.
diego
parents: 20
diff changeset
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
ce8f9f4390c3 COSMETICS: Remove all trailing whitespace.
diego
parents: 9
diff changeset
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:
18
bce77374e1e7 Don't use 'rm -f *$(SLIBSUF)' in a clean rule, $(SLIBSUF) might be empty.
diego
parents: 17
diff changeset
56 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
0
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
57
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
58 distclean: clean
20
56860d9c35c2 Remove obscure Makefile.bak entry from distclean rules.
diego
parents: 18
diff changeset
59 rm -f .depend
0
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
60
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 ifeq ($(BUILD_SHARED),yes)
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
63 install: all install-headers
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
64 ifeq ($(CONFIG_WIN32),yes)
5
4828bcc87c24 support for building dynamic libraries on Mac OS X
diego
parents: 1
diff changeset
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
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
67 install -d $(libdir)
16
0e94608e337f Create symbolic links for all library sonames and clean up Makefiles.
diego
parents: 14
diff changeset
68 install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
0e94608e337f Create symbolic links for all library sonames and clean up Makefiles.
diego
parents: 14
diff changeset
69 $(libdir)/$(SLIBNAME_WITH_VERSION)
0e94608e337f Create symbolic links for all library sonames and clean up Makefiles.
diego
parents: 14
diff changeset
70 ln -sf $(SLIBNAME_WITH_VERSION) \
0e94608e337f Create symbolic links for all library sonames and clean up Makefiles.
diego
parents: 14
diff changeset
71 $(libdir)/$(SLIBNAME_WITH_MAJOR)
0e94608e337f Create symbolic links for all library sonames and clean up Makefiles.
diego
parents: 14
diff changeset
72 ln -sf $(SLIBNAME_WITH_VERSION) \
0e94608e337f Create symbolic links for all library sonames and clean up Makefiles.
diego
parents: 14
diff changeset
73 $(libdir)/$(SLIBNAME)
0
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
74 $(LDCONFIG) || true
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
75 endif
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
76 else
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
77 install:
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
78 endif
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
79
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
80 installlib: all install-headers
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
81 install -m 644 $(LIB) "$(libdir)"
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
82
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
83 install-headers:
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
84 mkdir -p "$(prefix)/include/ffmpeg"
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
85 install -m 644 $(SRC_PATH)/libavutil/avutil.h \
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
86 $(SRC_PATH)/libavutil/common.h \
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
87 $(SRC_PATH)/libavutil/mathematics.h \
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
88 $(SRC_PATH)/libavutil/integer.h \
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
89 $(SRC_PATH)/libavutil/rational.h \
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
90 $(SRC_PATH)/libavutil/intfloat_readwrite.h \
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
91 "$(prefix)/include/ffmpeg"
6
0419cc681610 Put double-quotes around the install path in the "install-headers" section
diego
parents: 5
diff changeset
92 install -d "$(libdir)/pkgconfig"
0419cc681610 Put double-quotes around the install path in the "install-headers" section
diego
parents: 5
diff changeset
93 install -m 644 ../libavutil.pc "$(libdir)/pkgconfig"
0
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
94
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
95 #
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
96 # include dependency files if they exist
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
97 #
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
98 ifneq ($(wildcard .depend),)
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
99 include .depend
ee8f44bb7c4d libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff changeset
100 endif