]> git.sesse.net Git - ffmpeg/blob - libavcodec/libpostproc/Makefile
Create symbolic links for all library sonames and clean up Makefiles.
[ffmpeg] / libavcodec / libpostproc / Makefile
1
2 include ../../config.mak
3
4 VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
6 LIB = $(LIBPREF)postproc$(LIBSUF)
7 ifeq ($(SHARED_PP),yes)
8 LIBVERSION=$(SPPVERSION)
9 LIBMAJOR=$(SPPMAJOR)
10 NAME=postproc
11 SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
12 endif
13
14 OBJS=postprocess.o
15 SOBJS=postprocess_pic.o
16
17 CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
18 # -I/usr/X11R6/include/
19
20 .SUFFIXES: .c .o
21
22 # .PHONY: all clean
23
24 .c.o:
25         $(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
26
27 all:    $(SWSLIB) $(LIB) $(SLIBNAME)
28
29 clean:
30         rm -f *.o *.a *~ *$(SLIBSUF) $(LIB) $(SLIBNAME)
31
32 distclean:
33         rm -f Makefile.bak *.o *.a *~ *$(SLIBSUF) .depend
34
35 dep:    depend
36
37 depend:
38         $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
39
40 ifeq ($(SHARED_PP),yes)
41 postprocess_pic.o: postprocess.c
42         $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
43
44 $(SLIBNAME): $(SOBJS)
45         $(CC) $(SHFLAGS) -o $(SLIBNAME) $(SOBJS)
46 endif
47
48 $(LIB): $(OBJS)
49         rm -f $@
50         $(AR) rc $@ $(OBJS)
51         $(RANLIB) $@
52
53 install: all
54 ifeq ($(SHARED_PP),yes)
55 ifeq ($(CONFIG_WIN32),yes)
56         install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
57 else
58         install -d $(libdir)
59         install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
60                 $(libdir)/$(SLIBNAME_WITH_VERSION)
61         ln -sf $(SLIBNAME_WITH_VERSION) \
62                 $(libdir)/$(SLIBNAME_WITH_MAJOR)
63         ln -sf $(SLIBNAME_WITH_VERSION) \
64                 $(libdir)/$(SLIBNAME)
65         $(LDCONFIG) || true
66 endif
67 endif
68         mkdir -p $(prefix)/include/postproc
69         install -m 644 $(SRC_PATH)/libavcodec/libpostproc/postprocess.h $(prefix)/include/postproc/postprocess.h
70         install -d $(libdir)/pkgconfig
71         install -m 644 ../../libpostproc.pc $(libdir)/pkgconfig
72
73
74 #
75 # include dependency files if they exist
76 #
77 ifneq ($(wildcard .depend),)
78 include .depend
79 endif