958be44a76c25fbb7af3e1085d6ed04f5449749b
[libav.git] / libavcodec / libpostproc / Makefile
1
2 include ../../config.mak
3
4 VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
6 ifeq ($(SHARED_PP),yes)
7 SPPLIB = $(SLIBPREF)postproc$(SLIBSUF)
8 SPPMAJOR = 0
9 SPPVERSION = $(SPPMAJOR).0.1
10 endif
11 PPLIB = $(LIBPREF)postproc$(LIBSUF)
12
13 PPOBJS=postprocess.o
14 SPPOBJS=postprocess_pic.o
15
16 CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
17 # -I/usr/X11R6/include/
18
19 .SUFFIXES: .c .o
20
21 # .PHONY: all clean
22
23 .c.o:
24 $(CC) -c $(CFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
25
26 all: $(SWSLIB) $(PPLIB) $(SPPLIB)
27
28 clean:
29 rm -f *.o *.a *~ *.so $(PPLIB) $(SPPLIB)
30
31 distclean:
32 rm -f Makefile.bak *.o *.a *~ *.so .depend
33
34 dep: depend
35
36 depend:
37 $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
38
39 ifeq ($(SHARED_PP),yes)
40 postprocess_pic.o: postprocess.c
41 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
42
43 $(SPPLIB): $(SPPOBJS)
44 $(CC) -shared -Wl,-soname,$(SPPLIB).$(SPPMAJOR) \
45 -o $(SPPLIB) $(SPPOBJS)
46 endif
47
48 $(PPLIB): $(PPOBJS)
49 rm -f $@
50 $(AR) rc $@ $(PPOBJS)
51 $(RANLIB) $@
52
53 install: all
54 ifeq ($(SHARED_PP),yes)
55 ifeq ($(CONFIG_WIN32),yes)
56 install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)"
57 else
58 install -d $(libdir)
59 install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION)
60 ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB)
61 ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB).$(SPPMAJOR)
62 ldconfig || true
63 endif
64 endif
65 mkdir -p $(prefix)/include/postproc
66 install -m 644 $(SRC_PATH)/libavcodec/libpostproc/postprocess.h $(prefix)/include/postproc/postprocess.h
67
68
69 #
70 # include dependency files if they exist
71 #
72 ifneq ($(wildcard .depend),)
73 include .depend
74 endif