ldconfig as config.mak variable patch by (Jacob Meuser: jakemsr, jakemsr com)
[libav.git] / libavcodec / libpostproc / Makefile
CommitLineData
bba9b16c
MN
1
2include ../../config.mak
3
9a0a8d42
JM
4VPATH=$(SRC_PATH)/libavcodec/libpostproc
5
bba9b16c 6ifeq ($(SHARED_PP),yes)
91378af4 7SPPLIB = $(SLIBPREF)postproc$(SLIBSUF)
7919d97e
MR
8SPPMAJOR = 0
9SPPVERSION = $(SPPMAJOR).0.1
bba9b16c 10endif
91378af4 11PPLIB = $(LIBPREF)postproc$(LIBSUF)
bba9b16c
MN
12
13PPOBJS=postprocess.o
14SPPOBJS=postprocess_pic.o
15
16CFLAGS = $(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:
9a0a8d42 24 $(CC) -c $(CFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
bba9b16c
MN
25
26all: $(SWSLIB) $(PPLIB) $(SPPLIB)
27
28clean:
91378af4 29 rm -f *.o *.a *~ *.so $(PPLIB) $(SPPLIB)
bba9b16c
MN
30
31distclean:
32 rm -f Makefile.bak *.o *.a *~ *.so .depend
33
34dep: depend
35
36depend:
37 $(CC) -MM $(CFLAGS) postprocess.c 1>.depend
38
39ifeq ($(SHARED_PP),yes)
40postprocess_pic.o: postprocess.c
41 $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
42
43$(SPPLIB): $(SPPOBJS)
7919d97e 44 $(CC) -shared -Wl,-soname,$(SPPLIB).$(SPPMAJOR) \
bba9b16c
MN
45 -o $(SPPLIB) $(SPPOBJS)
46endif
47
48$(PPLIB): $(PPOBJS)
04431ca1
DC
49 rm -f $@
50 $(AR) rc $@ $(PPOBJS)
51 $(RANLIB) $@
bba9b16c
MN
52
53install: all
54ifeq ($(SHARED_PP),yes)
91378af4 55ifeq ($(CONFIG_WIN32),yes)
3e0fdf37 56 install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)"
91378af4 57else
cc973ecb
LB
58 install -d $(libdir)
59 install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION)
60 ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB)
7919d97e 61 ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB).$(SPPMAJOR)
def4272a
AJ
62 install -d $(libdir)/pkgconfig
63 install -m 644 ../../libpostproc.pc $(libdir)/pkgconfig
f39e56a8 64 $(LDCONFIG) || true
06983da7 65endif
91378af4 66endif
bba9b16c 67 mkdir -p $(prefix)/include/postproc
7919d97e 68 install -m 644 $(SRC_PATH)/libavcodec/libpostproc/postprocess.h $(prefix)/include/postproc/postprocess.h
bba9b16c
MN
69
70
71#
72# include dependency files if they exist
73#
74ifneq ($(wildcard .depend),)
75include .depend
76endif